Package htsjdk.samtools
Class DiskBasedBAMFileIndex
java.lang.Object
htsjdk.samtools.AbstractBAMFileIndex
htsjdk.samtools.DiskBasedBAMFileIndex
- All Implemented Interfaces:
BAMIndex
,Closeable
,AutoCloseable
A class for reading BAM file indices, hitting the disk once per query.
-
Field Summary
Fields inherited from interface htsjdk.samtools.BAMIndex
BAI_INDEX_SUFFIX, BAMIndexSuffix, CSI_INDEX_SUFFIX
-
Constructor Summary
ConstructorDescriptionDiskBasedBAMFileIndex
(SeekableStream stream, SAMSequenceDictionary dictionary) DiskBasedBAMFileIndex
(File file, SAMSequenceDictionary dictionary) DiskBasedBAMFileIndex
(File file, SAMSequenceDictionary dictionary, boolean useMemoryMapping) -
Method Summary
Modifier and TypeMethodDescriptionprotected htsjdk.samtools.BAMIndexContent
getQueryResults
(int reference) getSpanOverlapping
(int referenceIndex, int startPos, int endPos) Get list of regions of BAM file that may contain SAMRecords for the given rangeMethods inherited from class htsjdk.samtools.AbstractBAMFileIndex
close, getBamDictionary, getFirstBinInLevel, getFirstLocusInBin, getLastLocusInBin, getLevelForBin, getLevelSize, getMaxAddressibleGenomicLocation, getMetaData, getNoCoordinateCount, getNumberOfReferences, getNumIndexLevels, getStartOfLastLinearBin, initParameters, optimizeChunkList, position, query, readBytes, readChunks, readInteger, readLong, regionToBins, seek, setSequenceIndexes, skipBytes, skipToSequence, verifyIndexMagicNumber
-
Constructor Details
-
DiskBasedBAMFileIndex
-
DiskBasedBAMFileIndex
-
DiskBasedBAMFileIndex
-
-
Method Details
-
getSpanOverlapping
Get list of regions of BAM file that may contain SAMRecords for the given range- Parameters:
referenceIndex
- sequence of desired SAMRecordsstartPos
- 1-based start of the desired interval, inclusiveendPos
- 1-based end of the desired interval, inclusive- Returns:
- array of pairs of virtual file positions. Each pair is the first and last virtual file position in a range that can be scanned to find SAMRecords that overlap the given positions. The last position in each pair is a virtual file pointer to the first SAMRecord beyond the range that may contain the indicated SAMRecords.
-
getQueryResults
protected htsjdk.samtools.BAMIndexContent getQueryResults(int reference) - Specified by:
getQueryResults
in classAbstractBAMFileIndex
-