Package htsjdk.samtools
Interface BrowseableBAMIndex
- All Superinterfaces:
AutoCloseable
,BAMIndex
,Closeable
An index interface with additional functionality for querying and inspecting the structure of a BAM index.
-
Field Summary
Fields inherited from interface htsjdk.samtools.BAMIndex
BAI_INDEX_SUFFIX, BAMIndexSuffix, CSI_INDEX_SUFFIX
-
Method Summary
Modifier and TypeMethodDescriptiongetBinsOverlapping
(int referenceIndex, int startPos, int endPos) Get a list of bins in the BAM file that may contain SAMRecords for the given range.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) Gets the size (number of bins in) a given level of a BAM index.getSpanOverlapping
(Bin bin) Perform an overlapping query of all bins bounding the given location.Methods inherited from interface htsjdk.samtools.BAMIndex
close, getMetaData, getSpanOverlapping, getStartOfLastLinearBin
-
Method Details
-
getLevelSize
int getLevelSize(int levelNumber) Gets the size (number of bins in) a given level of a BAM index.- Parameters:
levelNumber
- Level for which to inspect the size.- Returns:
- Size of the given level.
-
getLevelForBin
Gets the level associated with the given bin number.- Parameters:
bin
- The bin for which to determine the level.- Returns:
- the level associated with the given bin number.
-
getFirstLocusInBin
Gets the first locus that this bin can index into.- Parameters:
bin
- The bin to test.- Returns:
- The last position that the given bin can represent.
-
getLastLocusInBin
Gets the last locus that this bin can index into.- Parameters:
bin
- The bin to test.- Returns:
- The last position that the given bin can represent.
-
getBinsOverlapping
Get a list of bins in the 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:
- a list of bins that contain relevant data.
-
getSpanOverlapping
Perform an overlapping query of all bins bounding the given location.- Parameters:
bin
- The bin over which to perform an overlapping query.- Returns:
- The file pointers
-