| Modifier and Type | Field and Description |
|---|---|
static int |
MAGIC_NUMBER |
| Constructor and Description |
|---|
TabixIndex(java.io.File tabixFile)
Convenient ctor that opens the file, wraps with with BGZF reader, and closes after reading index.
|
TabixIndex(java.io.InputStream inputStream) |
TabixIndex(java.nio.file.Path tabixPath)
Convenient ctor that opens the path, wraps with with BGZF reader, and closes after reading index.
|
TabixIndex(TabixFormat formatSpec,
java.util.List<java.lang.String> sequenceNames,
BinningIndexContent[] indices) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsChromosome(java.lang.String chr) |
boolean |
equals(java.lang.Object o) |
boolean |
equalsIgnoreProperties(java.lang.Object o)
Returns true if this and obj are 'effectively' equivalent indices.
|
java.util.List<Block> |
getBlocks(java.lang.String chr,
int start,
int end)
Query the index.
|
TabixFormat |
getFormatSpec() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
No arbitrary properties in Tabix
|
java.util.List<java.lang.String> |
getSequenceNames() |
int |
hashCode() |
boolean |
isCurrentVersion() |
void |
write(LittleEndianOutputStream los)
all indexes are writable to disk
|
void |
write(java.nio.file.Path tabixPath)
Writes the index with BGZF.
|
void |
writeBasedOnFeaturePath(java.nio.file.Path featurePath)
Writes to a path with appropriate name and directory based on feature path.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitwrite, writeBasedOnFeatureFilepublic TabixIndex(TabixFormat formatSpec, java.util.List<java.lang.String> sequenceNames, BinningIndexContent[] indices)
formatSpec - Information about how to interpret the file being indexed. Unused by this class other than
written to an output file.sequenceNames - Sequences in the file being indexed, in the order they appear in the file.indices - One for each element of sequenceNamespublic TabixIndex(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - This is expected to be buffered and be gzip-decompressing as appropriate. Caller
should close input stream after ctor returns.java.io.IOExceptionpublic TabixIndex(java.io.File tabixFile)
throws java.io.IOException
java.io.IOExceptionpublic TabixIndex(java.nio.file.Path tabixPath)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<Block> getBlocks(java.lang.String chr, int start, int end)
IndexgetBlocks in interface Indexchr - the chromosomestart - the start position, one-based, inclusive.end - the end position, one-based, inclusive.public boolean isCurrentVersion()
isCurrentVersion in interface Indexpublic java.util.List<java.lang.String> getSequenceNames()
getSequenceNames in interface Indexpublic boolean containsChromosome(java.lang.String chr)
containsChromosome in interface Indexchr - the chromosome (or contig) namepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
getProperties in interface Indexpublic boolean equalsIgnoreProperties(java.lang.Object o)
IndexequalsIgnoreProperties in interface Indexpublic TabixFormat getFormatSpec()
public void write(java.nio.file.Path tabixPath)
throws java.io.IOException
public void writeBasedOnFeaturePath(java.nio.file.Path featurePath)
throws java.io.IOException
writeBasedOnFeaturePath in interface IndexfeaturePath - Path being indexed.java.io.IOException - if featureFile is not a normal file.public void write(LittleEndianOutputStream los) throws java.io.IOException
Indexpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object