public class BAMDecoderV1_0 extends BAMDecoder
Constructor and Description |
---|
BAMDecoderV1_0(Bundle inputBundle,
ReadsDecoderOptions readsDecoderOptions)
Create a V1.0 BAM decoder for the given input bundle.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any resources associated with this decoder.
|
SAMFileHeader |
getHeader()
Get the file header for this decoder.
|
HtsVersion |
getVersion()
Get the version of the file format supported by this decoder.
|
boolean |
hasIndex()
Return true if the underlying resource has an index.
|
boolean |
isQueryable()
Gte true if the underlying resource is queryable.
|
CloseableIterator<SAMRecord> |
iterator()
Get an iterator of all records in the underlying resource.
|
CloseableIterator<SAMRecord> |
query(java.util.List<HtsInterval> intervals,
HtsQueryRule queryRule)
Get an iterator over all records from the underlying resource that match the query arguments.
|
java.util.Optional<SAMRecord> |
queryMate(SAMRecord samRecord)
Fetch the mate for the given read.
|
CloseableIterator<SAMRecord> |
queryStart(java.lang.String queryName,
long start)
Get an iterator over all records from the underlying resource that overlap the start position
|
CloseableIterator<SAMRecord> |
queryUnmapped()
Get an iterator of unmapped reads.
|
getDisplayName, getFileFormat, getInputBundle, getReadsDecoderOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query, query, query, queryContained, queryContained, queryContained, queryOverlapping, queryOverlapping, queryOverlapping
public BAMDecoderV1_0(Bundle inputBundle, ReadsDecoderOptions readsDecoderOptions)
BundleResourceType.ALIGNED_READS
, and the resource must be an
appropriate format and version for this encoder (to find an encoder for a bundle, see
ReadsResolver
.inputBundle
- bundle to decoderreadsDecoderOptions
- options to usepublic HtsVersion getVersion()
HtsDecoder
public SAMFileHeader getHeader()
HtsDecoder
H
public CloseableIterator<SAMRecord> iterator()
HtsQuery
public boolean isQueryable()
HtsQuery
HtsQuery.hasIndex()
public boolean hasIndex()
HtsQuery
public CloseableIterator<SAMRecord> query(java.util.List<HtsInterval> intervals, HtsQueryRule queryRule)
HtsQuery
intervals
- list of intervals to matchqueryRule
- query rule to use, from HtsQueryRule
public CloseableIterator<SAMRecord> queryStart(java.lang.String queryName, long start)
HtsQuery
queryName
- name to matchstart
- start position to overlappublic CloseableIterator<SAMRecord> queryUnmapped()
ReadsDecoder
Bundle
.public java.util.Optional<SAMRecord> queryMate(SAMRecord samRecord)
ReadsDecoder
Bundle
.samRecord
- the source recordpublic void close()
HtsDecoder