Package htsjdk.samtools
Class DiskBasedBAMFileIndex
- java.lang.Object
-
- htsjdk.samtools.AbstractBAMFileIndex
-
- htsjdk.samtools.DiskBasedBAMFileIndex
-
- All Implemented Interfaces:
BAMIndex
,Closeable
,AutoCloseable
public class DiskBasedBAMFileIndex extends AbstractBAMFileIndex
A class for reading BAM file indices, hitting the disk once per query.
-
-
Field Summary
-
Fields inherited from interface htsjdk.samtools.BAMIndex
BAMIndexSuffix
-
-
Constructor Summary
Constructors Constructor Description DiskBasedBAMFileIndex(SeekableStream stream, SAMSequenceDictionary dictionary)
DiskBasedBAMFileIndex(File file, SAMSequenceDictionary dictionary)
DiskBasedBAMFileIndex(File file, SAMSequenceDictionary dictionary, boolean useMemoryMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected htsjdk.samtools.BAMIndexContent
getQueryResults(int reference)
BAMFileSpan
getSpanOverlapping(int referenceIndex, int startPos, int endPos)
Get list of regions of BAM file that may contain SAMRecords for the given range-
Methods inherited from class htsjdk.samtools.AbstractBAMFileIndex
close, getFirstBinInLevel, getFirstLocusInBin, getLastLocusInBin, getLevelForBin, getLevelSize, getMaxAddressibleGenomicLocation, getMetaData, getNoCoordinateCount, getNumberOfReferences, getNumIndexLevels, getStartOfLastLinearBin, optimizeChunkList, query, regionToBins
-
-
-
-
Constructor Detail
-
DiskBasedBAMFileIndex
public DiskBasedBAMFileIndex(File file, SAMSequenceDictionary dictionary)
-
DiskBasedBAMFileIndex
public DiskBasedBAMFileIndex(SeekableStream stream, SAMSequenceDictionary dictionary)
-
DiskBasedBAMFileIndex
public DiskBasedBAMFileIndex(File file, SAMSequenceDictionary dictionary, boolean useMemoryMapping)
-
-
Method Detail
-
getSpanOverlapping
public BAMFileSpan getSpanOverlapping(int referenceIndex, int startPos, int endPos)
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
-
-