Package htsjdk.tribble.index.interval
Class IntervalTreeIndex
java.lang.Object
htsjdk.tribble.index.AbstractIndex
htsjdk.tribble.index.interval.IntervalTreeIndex
- All Implemented Interfaces:
Index
,MutableIndex
Index based on an interval tree
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class htsjdk.tribble.index.AbstractIndex
AbstractIndex.BlockStats, AbstractIndex.IndexType
-
Field Summary
Fields inherited from class htsjdk.tribble.index.AbstractIndex
chrIndices, flags, indexedFileMD5, indexedFileSize, indexedFileTS, indexedPath, logger, MAGIC_NUMBER, version, VERSION
-
Constructor Summary
ConstructorDescriptionIntervalTreeIndex
(InputStream inputStream) Load from file.IntervalTreeIndex
(String featureFile) Prepare to build an index.IntervalTreeIndex
(Path featureFile) Prepare to build an index. -
Method Summary
Modifier and TypeMethodDescriptionreturns the class for the index typeprotected int
getType()
get the index typevoid
Add a new interval to this indexvoid
protected void
setChrIndex
(List<IntervalTreeIndex.ChrIndex> indicies) Methods inherited from class htsjdk.tribble.index.AbstractIndex
addProperties, addProperty, containsChromosome, equalsIgnoreProperties, finalizeIndex, getBlocks, getBlocks, getBlockStats, getFlags, getIndexedFile, getIndexedFileMD5, getIndexedFileSize, getIndexedFileTS, getIndexedPath, getProperties, getSequenceNames, getVersion, hasFileSize, hasMD5, hasTimestamp, isCurrentVersion, printIndexInfo, read, setMD5, statsSummary, validateIndexHeader, write, write, writeBasedOnFeaturePath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface htsjdk.tribble.index.Index
write, writeBasedOnFeatureFile
-
Field Details
-
INDEX_TYPE
public static final int INDEX_TYPE
-
-
Constructor Details
-
IntervalTreeIndex
Load from file.- Parameters:
inputStream
- This method assumes that the input stream is already buffered as appropriate. Caller should close after this object is constructed.- Throws:
IOException
-
IntervalTreeIndex
Prepare to build an index.- Parameters:
featureFile
- File which we are indexing
-
IntervalTreeIndex
Prepare to build an index.- Parameters:
featureFile
- File which we are indexing
-
-
Method Details
-
getChrIndexClass
Description copied from class:AbstractIndex
returns the class for the index type- Specified by:
getChrIndexClass
in classAbstractIndex
- Returns:
- a Class, from which a new instance can be created
-
getType
protected int getType()Description copied from class:AbstractIndex
get the index type- Specified by:
getType
in classAbstractIndex
- Returns:
- The index type
-
insert
Add a new interval to this index- Parameters:
chr
- Chromosomeinterval
-
-
setChrIndex
-
printTree
public void printTree()
-