Package htsjdk.tribble.index.linear
Class LinearIndex.ChrIndex
- java.lang.Object
-
- htsjdk.tribble.index.linear.LinearIndex.ChrIndex
-
- All Implemented Interfaces:
ChrIndex
- Enclosing class:
- LinearIndex
public static class LinearIndex.ChrIndex extends Object implements ChrIndex
Blocks are organized as a simple flat list: Block 0 Block 1 Block 2 There's a constant bin width, so that each block corresponds to a specific interval over the genome based on its index, as in: Block 0: (0 - binWidth] Block 1: (binWidth - 2 * binWidth] Block 2: (2 * binWidth - 3 * binWidth] Note that covered regions are open on the left ( and closed on the right ]. In general, if block i is the ith block (starting from 0), then block i contains all records that have starting position > (i * binWidth) and <= ((i + 1) * binWidth))
-
-
Constructor Summary
Constructors Constructor Description ChrIndex()Default constructor needed for factory methods -- DO NOT REMOVE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)doublegetAverageFeatureSize()List<Block>getBlocks()List<Block>getBlocks(int start, int end)doublegetFeaturesPerBlock()StringgetName()intgetNBlocks()intgetNFeatures()longgetTotalSize()inthashCode()voidincrementFeatureCount()LinearIndex.ChrIndexoptimize(double threshold)voidread(LittleEndianInputStream dis)voidupdateLongestFeature(int featureLength)voidwrite(LittleEndianOutputStream dos)
-
-
-
Method Detail
-
getNBlocks
public int getNBlocks()
-
updateLongestFeature
public void updateLongestFeature(int featureLength)
-
getNFeatures
public int getNFeatures()
-
incrementFeatureCount
public void incrementFeatureCount()
-
write
public void write(LittleEndianOutputStream dos) throws IOException
- Specified by:
writein interfaceChrIndex- Throws:
IOException
-
read
public void read(LittleEndianInputStream dis) throws IOException
- Specified by:
readin interfaceChrIndex- Throws:
IOException
-
getTotalSize
public long getTotalSize()
- Returns:
- Total size of all blocks
-
getAverageFeatureSize
public double getAverageFeatureSize()
-
getFeaturesPerBlock
public double getFeaturesPerBlock()
-
optimize
public LinearIndex.ChrIndex optimize(double threshold)
-
-