public interface Index
Modifier and Type | Method and Description |
---|---|
boolean |
containsChromosome(java.lang.String chr) |
boolean |
equalsIgnoreProperties(java.lang.Object obj)
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.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
java.util.List<java.lang.String> |
getSequenceNames() |
boolean |
isCurrentVersion() |
default void |
write(java.io.File idxFile)
Writes the index into a file.
|
void |
write(LittleEndianOutputStream stream)
all indexes are writable to disk
|
void |
write(java.nio.file.Path indexPath)
Writes the index into a path.
|
default void |
writeBasedOnFeatureFile(java.io.File featureFile)
Write an appropriately named and located Index file based on the name and location of the featureFile.
|
void |
writeBasedOnFeaturePath(java.nio.file.Path featurePath)
Write an appropriately named and located Index file based on the name and location of the featureFile.
|
java.util.List<Block> getBlocks(java.lang.String chr, int start, int end)
chr
- the chromosomestart
- the start positionend
- the end positionjava.lang.IllegalArgumentException
- of chr isn't part of this indexboolean isCurrentVersion()
java.util.List<java.lang.String> getSequenceNames()
boolean containsChromosome(java.lang.String chr)
chr
- the chromosome (or contig) namevoid write(LittleEndianOutputStream stream) throws java.io.IOException
stream
- the stream to write the index to. Caller must close after invocation.java.io.IOException
- if the index is unable to write to the specified locationdefault void write(java.io.File idxFile) throws java.io.IOException
write(Path)
idxFile
- Where to write the index.java.io.IOException
- if the index is unable to write to the specified filevoid write(java.nio.file.Path indexPath) throws java.io.IOException
indexPath
- Where to write the index.java.io.IOException
- if the index is unable to write to the specified path.default void writeBasedOnFeatureFile(java.io.File featureFile) throws java.io.IOException
writeBasedOnFeaturePath(Path)
featureFile
- java.io.IOException
- if featureFile is not a normal file.void writeBasedOnFeaturePath(java.nio.file.Path featurePath) throws java.io.IOException
featurePath
- java.io.IOException
- if featureFile is not a normal file.java.util.Map<java.lang.String,java.lang.String> getProperties()
boolean equalsIgnoreProperties(java.lang.Object obj)
obj
-