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.
  • Constructor Details

  • Method Details

    • 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 SAMRecords
      startPos - 1-based start of the desired interval, inclusive
      endPos - 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 class AbstractBAMFileIndex