@InternalAPI public abstract class CRAMEncoder extends java.lang.Object implements ReadsEncoder
BundleResourceType.READS_CRAM decoders.| Constructor and Description |
|---|
CRAMEncoder(Bundle outputBundle,
ReadsEncoderOptions readsEncoderOptions)
InternalAPI
Create a CRAM encoder for the given output bundle.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources associated with this decoder.
|
static CRAMReferenceSource |
getCRAMReferenceSource(CRAMEncoderOptions cramEncoderOptions)
Return a
CRAMReferenceSource using the ReadsEncoderOptions, or a default source. |
java.lang.String |
getDisplayName()
Get a user-friendly display name for this encoder.
|
java.lang.String |
getFileFormat()
Get the name of the file format supported by this encoder.
|
Bundle |
getOutputBundle()
Get the output
Bundle for this encoder. |
ReadsEncoderOptions |
getReadsEncoderOptions()
Get the
ReadsEncoderOptions for this encoder. |
void |
setHeader(SAMFileHeader samFileHeader)
Set the file format header for this decoder, of type
H. |
void |
write(SAMRecord record)
Write a single record to the underlying output.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVersion@InternalAPI public CRAMEncoder(Bundle outputBundle, ReadsEncoderOptions readsEncoderOptions)
BundleResourceType.ALIGNED_READS (to find a decoder for a bundle,
see ReadsResolver).outputBundle - bundle to encodereadsEncoderOptions - options to usepublic final java.lang.String getFileFormat()
HtsEncoderBundleResourceType
and BundleResource.getFileFormat()).getFileFormat in interface HtsEncoder<SAMFileHeader,SAMRecord>public final java.lang.String getDisplayName()
HtsEncodergetDisplayName in interface HtsEncoder<SAMFileHeader,SAMRecord>public void setHeader(SAMFileHeader samFileHeader)
HtsEncoderH. HtsEncoder.setHeader(HtsHeader) must be
called before HtsEncoder.write(HtsRecord) can be called.setHeader in interface HtsEncoder<SAMFileHeader,SAMRecord>samFileHeader - to usepublic void write(SAMRecord record)
HtsEncoderHtsEncoder.write(HtsRecord) may only called after
HtsEncoder.setHeader(HtsHeader) has been called.write in interface HtsEncoder<SAMFileHeader,SAMRecord>record - record to writepublic void close()
HtsEncoderclose in interface HtsEncoder<SAMFileHeader,SAMRecord>close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic Bundle getOutputBundle()
Bundle for this encoder.Bundle for this encoderpublic ReadsEncoderOptions getReadsEncoderOptions()
ReadsEncoderOptions for this encoder.ReadsEncoderOptions for this encoder.@InternalAPI public static CRAMReferenceSource getCRAMReferenceSource(CRAMEncoderOptions cramEncoderOptions)
CRAMReferenceSource using the ReadsEncoderOptions, or a default source.cramEncoderOptions - CRAMEncoderOptions options to useCRAMReferenceSource