Package htsjdk.tribble.index.linear
Class LinearIndex.ChrIndex
java.lang.Object
htsjdk.tribble.index.linear.LinearIndex.ChrIndex
- All Implemented Interfaces:
ChrIndex
- Enclosing class:
- LinearIndex
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
double
getBlocks
(int start, int end) double
getName()
int
int
long
int
hashCode()
void
optimize
(double threshold) void
void
updateLongestFeature
(int featureLength) void
-
Constructor Details
-
ChrIndex
public ChrIndex()Default constructor needed for factory methods -- DO NOT REMOVE
-
-
Method Details
-
getName
-
getNBlocks
public int getNBlocks() -
getBlocks
-
getBlocks
-
updateLongestFeature
public void updateLongestFeature(int featureLength) -
getNFeatures
public int getNFeatures() -
incrementFeatureCount
public void incrementFeatureCount() -
write
- Specified by:
write
in interfaceChrIndex
- Throws:
IOException
-
read
- Specified by:
read
in interfaceChrIndex
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
getTotalSize
public long getTotalSize()- Returns:
- Total size of all blocks
-
getAverageFeatureSize
public double getAverageFeatureSize() -
getFeaturesPerBlock
public double getFeaturesPerBlock() -
optimize
-