public class CSIIndex extends AbstractBAMFileIndex implements BrowseableBAMIndex
BAI_INDEX_SUFFIX, BAMIndexSuffix, CSI_INDEX_SUFFIX| Constructor and Description |
|---|
CSIIndex(java.io.File file,
boolean enableMemoryMapping,
SAMSequenceDictionary dictionary) |
CSIIndex(java.nio.file.Path path,
SAMSequenceDictionary dictionary) |
CSIIndex(SeekableStream stream,
SAMSequenceDictionary dictionary)
Constructors
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getAuxData() |
int |
getBinDepth()
Bin depth is the number of levels of the index.
|
BinList |
getBinsOverlapping(int referenceIndex,
int startPos,
int endPos)
Get a list of bins in the BAM file that may contain SAMRecords for the given range.
|
int |
getFirstBinInLevelForCSI(int levelNumber)
Extends the functionality of
AbstractBAMFileIndex.getFirstBinInLevel(int) ,
which cannot be overridden due to its static nature. |
int |
getFirstLocusInBin(Bin bin)
Gets the first locus that this bin can index into.
|
int |
getLastLocusInBin(Bin bin)
Gets the last locus that this bin can index into.
|
int |
getLevelForBin(Bin bin)
Gets the level associated with the given bin number.
|
int |
getLevelSize(int levelNumber)
Computes the number of bins on the given level.
|
int |
getMaxBins() |
int |
getMaxSpan() |
BAMIndexMetaData |
getMetaData(int reference)
Return meta data for the given reference including information about number of aligned, unaligned, and noCoordinate records
|
int |
getMinShift()
2^(min shift) is the smallest width of a bin
|
java.lang.Long |
getNoCoordinateCount()
Returns count of records unassociated with any reference.
|
int |
getNumberOfReferences() |
int |
getParentBinNumber(Bin bin) |
int |
getParentBinNumber(int binNumber) |
htsjdk.samtools.BAMIndexContent |
getQueryResults(int referenceSequence) |
BAMFileSpan |
getSpanOverlapping(Bin bin)
Perform an overlapping query of all bins bounding the given location.
|
BAMFileSpan |
getSpanOverlapping(int referenceIndex,
int startPos,
int endPos)
Gets the compressed chunks which should be searched for the contents of records contained by the span
referenceIndex:startPos-endPos, inclusive.
|
long |
getStartOfLastLinearBin()
Use to get close to the unmapped reads at the end of a BAM file.
|
protected void |
initParameters()
Initialization method used for simplifying the constructor
hierarchy.
|
protected htsjdk.samtools.BAMIndexContent |
query(int referenceSequence,
int startPos,
int endPos) |
protected void |
skipToSequence(int sequenceIndex) |
protected void |
verifyIndexMagicNumber(java.lang.String sourceName) |
close, getBamDictionary, getFirstBinInLevel, getMaxAddressibleGenomicLocation, getNumIndexLevels, optimizeChunkList, position, readBytes, readChunks, readInteger, readLong, regionToBins, seek, setSequenceIndexes, skipBytespublic CSIIndex(SeekableStream stream, SAMSequenceDictionary dictionary)
public CSIIndex(java.nio.file.Path path,
SAMSequenceDictionary dictionary)
throws java.io.IOException
java.io.IOExceptionpublic CSIIndex(java.io.File file,
boolean enableMemoryMapping,
SAMSequenceDictionary dictionary)
public int getBinDepth()
public int getMinShift()
public int getMaxBins()
public int getMaxSpan()
public byte[] getAuxData()
public int getNumberOfReferences()
getNumberOfReferences in class AbstractBAMFileIndexpublic int getLevelSize(int levelNumber)
getLevelSize in interface BrowseableBAMIndexgetLevelSize in class AbstractBAMFileIndexlevelNumber - Level for which to compute the size.public int getFirstBinInLevelForCSI(int levelNumber)
AbstractBAMFileIndex.getFirstBinInLevel(int) ,
which cannot be overridden due to its static nature.public int getLevelForBin(Bin bin)
AbstractBAMFileIndexgetLevelForBin in interface BrowseableBAMIndexgetLevelForBin in class AbstractBAMFileIndexbin - The bin for which to determine the level.public int getFirstLocusInBin(Bin bin)
AbstractBAMFileIndexgetFirstLocusInBin in interface BrowseableBAMIndexgetFirstLocusInBin in class AbstractBAMFileIndexbin - The bin to test.public int getLastLocusInBin(Bin bin)
AbstractBAMFileIndexgetLastLocusInBin in interface BrowseableBAMIndexgetLastLocusInBin in class AbstractBAMFileIndexbin - The bin to test.public BinList getBinsOverlapping(int referenceIndex, int startPos, int endPos)
BrowseableBAMIndexgetBinsOverlapping in interface BrowseableBAMIndexreferenceIndex - sequence of desired SAMRecordsstartPos - 1-based start of the desired interval, inclusiveendPos - 1-based end of the desired interval, inclusivepublic BAMFileSpan getSpanOverlapping(int referenceIndex, int startPos, int endPos)
BAMIndexgetSpanOverlapping in interface BAMIndexreferenceIndex - The contig.startPos - Genomic start of query.endPos - Genomic end of query.public BAMFileSpan getSpanOverlapping(Bin bin)
BrowseableBAMIndexgetSpanOverlapping in interface BrowseableBAMIndexbin - The bin over which to perform an overlapping query.public long getStartOfLastLinearBin()
AbstractBAMFileIndexgetStartOfLastLinearBin in interface BAMIndexgetStartOfLastLinearBin in class AbstractBAMFileIndexprotected void verifyIndexMagicNumber(java.lang.String sourceName)
verifyIndexMagicNumber in class AbstractBAMFileIndexprotected final void initParameters()
AbstractBAMFileIndexinitParameters in class AbstractBAMFileIndexpublic int getParentBinNumber(int binNumber)
public int getParentBinNumber(Bin bin)
protected htsjdk.samtools.BAMIndexContent query(int referenceSequence,
int startPos,
int endPos)
query in class AbstractBAMFileIndexpublic BAMIndexMetaData getMetaData(int reference)
getMetaData in interface BAMIndexgetMetaData in class AbstractBAMFileIndexreference - the reference of interestpublic java.lang.Long getNoCoordinateCount()
getNoCoordinateCount in class AbstractBAMFileIndexpublic htsjdk.samtools.BAMIndexContent getQueryResults(int referenceSequence)
getQueryResults in class AbstractBAMFileIndexprotected void skipToSequence(int sequenceIndex)
skipToSequence in class AbstractBAMFileIndex