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 String
BAI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.BAI_INDEX
instead.static String
BAMIndexSuffix
Deprecated.since June 2019 UseFileExtensions.BAI_INDEX
instead.static String
CSI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.CSI
instead.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the index and release any associated resources.BAMIndexMetaData
getMetaData(int reference)
Gets meta data for the given reference including information about number of aligned, unaligned, and noCoordinate recordsBAMFileSpan
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.long
getStartOfLastLinearBin()
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_INDEX
instead.- See Also:
- Constant Field Values
-
BAI_INDEX_SUFFIX
@Deprecated static final String BAI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.BAI_INDEX
instead.- See Also:
- Constant Field Values
-
CSI_INDEX_SUFFIX
@Deprecated static final String CSI_INDEX_SUFFIX
Deprecated.since June 2019 UseFileExtensions.CSI
instead.- 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-