Package htsjdk.tribble.index
Class AbstractIndex
- java.lang.Object
-
- htsjdk.tribble.index.AbstractIndex
-
- All Implemented Interfaces:
Index,MutableIndex
- Direct Known Subclasses:
IntervalTreeIndex,LinearIndex
public abstract class AbstractIndex extends Object implements MutableIndex
An abstract implementation of the index class. This class takes care of the basics that are common to all of the current indexing classes; including the version information, common header properties, and reading and writing the header to disk.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractIndex.BlockStatsstatic classAbstractIndex.IndexType
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashMap<String,ChrIndex>chrIndicesthe map of our chromosome binsprotected intflagsprotected StringindexedFileMD5protected longindexedFileSizeprotected longindexedFileTSprotected PathindexedPathprotected Logloggerstatic intMAGIC_NUMBERprotected intversionstatic intVERSION
-
Constructor Summary
Constructors Constructor Description AbstractIndex()create an abstract index, with defaults for the version value, and empty properties and chromosome listsAbstractIndex(AbstractIndex parent)AbstractIndex(File featureFile)AbstractIndex(String featureFile)create an index file from the target feature fileAbstractIndex(Path featurePath)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddProperties(Map<String,String> properties)voidaddProperty(String key, String value)booleancontainsChromosome(String chr)booleanequalsIgnoreProperties(Object obj)Returns true if this and obj are 'effectively' equivalent indices.voidfinalizeIndex()List<Block>getBlocks(String chr)List<Block>getBlocks(String chr, int start, int end)Query the index.protected AbstractIndex.BlockStatsgetBlockStats(boolean logDetails)abstract ClassgetChrIndexClass()returns the class for the index typeintgetFlags()FilegetIndexedFile()Deprecated.on 03/2017.StringgetIndexedFileMD5()longgetIndexedFileSize()longgetIndexedFileTS()PathgetIndexedPath()Map<String,String>getProperties()return a mapping of name to property valueList<String>getSequenceNames()protected abstract intgetType()get the index typeintgetVersion()booleanhasFileSize()booleanhasMD5()booleanhasTimestamp()booleanisCurrentVersion()check the current version against the version we read inprotected voidprintIndexInfo()voidread(LittleEndianInputStream dis)voidsetMD5(String md5)protected StringstatsSummary()protected voidvalidateIndexHeader(int indexType, LittleEndianInputStream dis) 
-