Package htsjdk.samtools
Interface BAMIndex
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
BrowseableBAMIndex
- All Known Implementing Classes:
AbstractBAMFileIndex,CSIIndex,DiskBasedBAMFileIndex,SRAIndex
public interface BAMIndex extends Closeable
A basic interface for querying BAM indices.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBAI_INDEX_SUFFIXDeprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.static StringBAMIndexSuffixDeprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.static StringCSI_INDEX_SUFFIXDeprecated.since June 2019 UseFileExtensions.CSIinstead.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the index and release any associated resources.BAMIndexMetaDatagetMetaData(int reference)Gets meta data for the given reference including information about number of aligned, unaligned, and noCoordinate recordsBAMFileSpangetSpanOverlapping(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.longgetStartOfLastLinearBin()Gets the start of the last linear bin in the index.
-
-
-
Field Detail
-
BAMIndexSuffix
@Deprecated static final String BAMIndexSuffix
Deprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.- See Also:
- Constant Field Values
-
BAI_INDEX_SUFFIX
@Deprecated static final String BAI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.- See Also:
- Constant Field Values
-
CSI_INDEX_SUFFIX
@Deprecated static final String CSI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.CSIinstead.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSpanOverlapping
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. See the BAM spec for more information on how a chunk is represented.- Parameters:
referenceIndex- The contig.startPos- Genomic start of query.endPos- Genomic end of query.- Returns:
- A file span listing the chunks in the BAM file.
-
getStartOfLastLinearBin
long getStartOfLastLinearBin()
Gets the start of the last linear bin in the index.- Returns:
- The chunk indicating the start of the last bin in the linear index.
-
getMetaData
BAMIndexMetaData getMetaData(int reference)
Gets meta data for the given reference including information about number of aligned, unaligned, and noCoordinate records- Parameters:
reference- the reference of interest- Returns:
- meta data for the reference
-
close
void close()
Close the index and release any associated resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-