Class HtsgetBAMDecoderV1_2

java.lang.Object
htsjdk.beta.codecs.reads.htsget.HtsgetBAMDecoder
htsjdk.beta.codecs.reads.htsget.htsgetBAMV1_2.HtsgetBAMDecoderV1_2
All Implemented Interfaces:
HtsDecoder<SAMFileHeader,SAMRecord>, HtsQuery<SAMRecord>, ReadsDecoder, ReadsQuery<SAMRecord>, Closeable, AutoCloseable, Iterable<SAMRecord>

public class HtsgetBAMDecoderV1_2 extends HtsgetBAMDecoder
Version 1.2 of BundleResourceType.READS_HTSGET_BAM decoder.
  • Constructor Details

  • Method Details

    • getHeader

      public SAMFileHeader getHeader()
      Description copied from interface: HtsDecoder
      Get the file header for this decoder.
      Returns:
      the file header for this decoder, of type H
    • close

      public void close()
      Description copied from interface: HtsDecoder
      Close any resources associated with this decoder.
    • iterator

      public CloseableIterator<SAMRecord> iterator()
      Description copied from interface: HtsQuery
      Get an iterator of all records in the underlying resource.
      Returns:
      an iterator of all records in the underlying resource
    • isQueryable

      public boolean isQueryable()
      Description copied from interface: HtsQuery
      Gte true if the underlying resource is queryable.
      Returns:
      true if the underlying resource is queryable. this may be true even if the underlying resource returns false for HtsQuery.hasIndex()
    • hasIndex

      public boolean hasIndex()
      Description copied from interface: HtsQuery
      Return true if the underlying resource has an index.
      Returns:
      true if the underlying resource has an index
    • query

      public CloseableIterator<SAMRecord> query(String queryString)
      Description copied from interface: HtsQuery
      Get an iterator over all records from the underlying resource that match the query string
      Parameters:
      queryString - decoder specific query string
      Returns:
      an iterator over all records from the underlying resource that match the query string
    • query

      public CloseableIterator<SAMRecord> query(List<HtsInterval> intervals, HtsQueryRule queryRule)
      Description copied from interface: HtsQuery
      Get an iterator over all records from the underlying resource that match the query arguments. Callers much ensure that the intervals are in increasing order and do not overlap or abut.
      Parameters:
      intervals - list of intervals to match
      queryRule - query rule to use, from HtsQueryRule
      Returns:
      an iterator over all records from the underlying resource that match the query arguments
    • queryStart

      public CloseableIterator<SAMRecord> queryStart(String queryName, long start)
      Description copied from interface: HtsQuery
      Get an iterator over all records from the underlying resource that overlap the start position
      Parameters:
      queryName - name to match
      start - start position to overlap
      Returns:
      an iterator over all records from the underlying resource that overlap the start position
    • queryUnmapped

      public CloseableIterator<SAMRecord> queryUnmapped()
      Description copied from interface: ReadsDecoder
      Get an iterator of unmapped reads. Requires an index resource to be included in the input Bundle.
    • queryMate

      public Optional<SAMRecord> queryMate(SAMRecord rec)
      Description copied from interface: ReadsDecoder
      Fetch the mate for the given read. Requires an index resource to be included in the input Bundle.
      Parameters:
      rec - the source record
      Returns:
      the source record's mate, or Optional.empty() if the source record has no mate