@InternalAPI public abstract class CRAMDecoder extends java.lang.Object implements ReadsDecoder
BundleResourceType.READS_CRAM decoders.| Constructor and Description |
|---|
CRAMDecoder(Bundle inputBundle,
ReadsDecoderOptions readsDecoderOptions)
InternalAPI
Common constructor for CRAM decoders.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources associated with this decoder.
|
static CRAMReferenceSource |
getCRAMReferenceSource(CRAMDecoderOptions cramDecoderOptions) |
java.lang.String |
getDisplayName()
Get a user-friendly display name for this decoder.
|
java.lang.String |
getFileFormat()
Get the name of the file format supported by this decoder.The format name defines the underlying
format handled by this decoder, and also corresponds to the format of the primary bundle
resource that is required when decoding (see
BundleResourceType
and BundleResource.getFileFormat()). |
SAMFileHeader |
getHeader()
Get the file header for this decoder.
|
Bundle |
getInputBundle()
Get the input
Bundle for this decoder. |
ReadsDecoderOptions |
getReadsDecoderOptions()
Get the
ReadsDecoderOptions for 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 rec)
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVersionquery, query, query, queryContained, queryContained, queryContained, queryOverlapping, queryOverlapping, queryOverlapping@InternalAPI public CRAMDecoder(Bundle inputBundle, ReadsDecoderOptions readsDecoderOptions)
inputBundle - an Bundle containing cram resourcereadsDecoderOptions - ReadsDecoderOptions to use.public final java.lang.String getFileFormat()
HtsDecoderBundleResourceType
and BundleResource.getFileFormat()).getFileFormat in interface HtsDecoder<SAMFileHeader,SAMRecord>public final java.lang.String getDisplayName()
HtsDecodergetDisplayName in interface HtsDecoder<SAMFileHeader,SAMRecord>public SAMFileHeader getHeader()
HtsDecodergetHeader in interface HtsDecoder<SAMFileHeader,SAMRecord>Hpublic void close()
HtsDecoderclose in interface HtsDecoder<SAMFileHeader,SAMRecord>close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic CloseableIterator<SAMRecord> iterator()
HtsQuerypublic boolean isQueryable()
HtsQueryisQueryable in interface HtsQuery<SAMRecord>HtsQuery.hasIndex()public boolean hasIndex()
HtsQuerypublic CloseableIterator<SAMRecord> query(java.util.List<HtsInterval> intervals, HtsQueryRule queryRule)
HtsQueryquery in interface HtsQuery<SAMRecord>intervals - list of intervals to matchqueryRule - query rule to use, from HtsQueryRulepublic CloseableIterator<SAMRecord> queryStart(java.lang.String queryName, long start)
HtsQueryqueryStart in interface HtsQuery<SAMRecord>queryName - name to matchstart - start position to overlappublic CloseableIterator<SAMRecord> queryUnmapped()
ReadsDecoderBundle.queryUnmapped in interface ReadsDecoderqueryUnmapped in interface ReadsQuery<SAMRecord>public java.util.Optional<SAMRecord> queryMate(SAMRecord rec)
ReadsDecoderBundle.queryMate in interface ReadsDecoderqueryMate in interface ReadsQuery<SAMRecord>rec - the source recordpublic Bundle getInputBundle()
Bundle for this decoder.Bundle for this decoderpublic ReadsDecoderOptions getReadsDecoderOptions()
ReadsDecoderOptions for this decoder.ReadsDecoderOptions for this decoder.@InternalAPI public static CRAMReferenceSource getCRAMReferenceSource(CRAMDecoderOptions cramDecoderOptions)