Package htsjdk.beta.codecs.reads.sam
Class SAMEncoder
java.lang.Object
htsjdk.beta.codecs.reads.sam.SAMEncoder
- All Implemented Interfaces:
HtsEncoder<SAMFileHeader,,SAMRecord> ReadsEncoder,Closeable,AutoCloseable
- Direct Known Subclasses:
SAMEncoderV1_0
InternalAPI
Base class for
BundleResourceType.FMT_READS_SAM encoders.-
Constructor Summary
ConstructorsConstructorDescriptionSAMEncoder(Bundle outputBundle, ReadsEncoderOptions readsEncoderOptions) InternalAPI Create a SAM encoder for the given output bundle. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGet a user-friendly display name for this encoder.final StringGet the name of the file format supported by this encoder.Get the outputBundlefor this encoder.Get theReadsEncoderOptionsfor this encoder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.beta.plugin.HtsEncoder
close, getVersion, setHeader, write
-
Constructor Details
-
SAMEncoder
InternalAPI Create a SAM encoder for the given output bundle. The primary resource in the bundle must have content typeBundleResourceType.CT_ALIGNED_READS(to find a decoder for a bundle, seeReadsResolver). NOTE: callers that provide an output stream resource should provide a buffered output stream if buffering is desired, since the encoder does not provide an additional buffering layer.- Parameters:
outputBundle- outputBundleto encodereadsEncoderOptions-ReadsEncoderOptionsto use
-
-
Method Details
-
getFileFormat
Description copied from interface:HtsEncoderGet the name of the file format supported by this encoder. The format name defines the underlying format handled by this encoder, and also corresponds to the format of the primary bundle resource that is required when encoding (seeBundleResourceTypeandBundleResource.getFileFormat()).- Specified by:
getFileFormatin interfaceHtsEncoder<SAMFileHeader,SAMRecord> - Returns:
- the name of the underlying file format handled by this encoder
-
getDisplayName
Description copied from interface:HtsEncoderGet a user-friendly display name for this encoder.- Specified by:
getDisplayNamein interfaceHtsEncoder<SAMFileHeader,SAMRecord> - Returns:
- a user-friendly display name for this encoder for use in error and warning messages
-
getOutputBundle
Get the outputBundlefor this encoder.- Returns:
- the output
Bundlefor this encoder
-
getReadsEncoderOptions
Get theReadsEncoderOptionsfor this encoder.- Returns:
- the
ReadsEncoderOptionsfor this encoder.
-