Package htsjdk.samtools
Interface BAMIndex
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
BrowseableBAMIndex
- All Known Implementing Classes:
AbstractBAMFileIndex,CSIIndex,DiskBasedBAMFileIndex,SRAIndex
A basic interface for querying BAM indices.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.static final StringDeprecated.since June 2019 UseFileExtensions.CSIinstead. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the index and release any associated resources.getMetaData(int reference) Gets meta data for the given reference including information about number of aligned, unaligned, and noCoordinate recordsgetSpanOverlapping(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.longGets the start of the last linear bin in the index.
-
Field Details
-
BAMIndexSuffix
Deprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.- See Also:
-
BAI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.BAI_INDEXinstead.- See Also:
-
CSI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.CSIinstead.- See Also:
-
-
Method Details
-
getSpanOverlapping
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
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
-
FileExtensions.BAI_INDEXinstead.