Class BAMEncoderV1_0
java.lang.Object
htsjdk.beta.codecs.reads.bam.BAMEncoder
htsjdk.beta.codecs.reads.bam.bamV1_0.BAMEncoderV1_0
- All Implemented Interfaces:
HtsEncoder<SAMFileHeader,
,SAMRecord> ReadsEncoder
,Closeable
,AutoCloseable
BAM v1.0 encoder.
-
Constructor Summary
ConstructorDescriptionBAMEncoderV1_0
(Bundle outputBundle, ReadsEncoderOptions readsEncoderOptions) Create a V1.0 BAM encoder for the given output bundle. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close any resources associated with this decoder.Get the version of the file format supported by this encoder.void
setHeader
(SAMFileHeader samFileHeader) Set the file format header for this decoder, of typeHtsEncoder
.void
Write a single record to the underlying output.Methods inherited from class htsjdk.beta.codecs.reads.bam.BAMEncoder
getDisplayName, getFileFormat, getOutputBundle, getReadsEncoderOptions
-
Constructor Details
-
BAMEncoderV1_0
Create a V1.0 BAM encoder for the given output bundle. The primary resource in the bundle must have content typeBundleResourceType.ALIGNED_READS
(to find a decoder for a bundle, seeReadsResolver
).- Parameters:
outputBundle
- bundle to encodereadsEncoderOptions
- options to use
-
-
Method Details
-
getVersion
Description copied from interface:HtsEncoder
Get the version of the file format supported by this encoder. -
setHeader
Description copied from interface:HtsEncoder
Set the file format header for this decoder, of typeHtsEncoder
.HtsEncoder.setHeader(HtsHeader)
must be called beforeHtsEncoder.write(HtsRecord)
can be called.- Parameters:
samFileHeader
- to use
-
write
Description copied from interface:HtsEncoder
Write a single record to the underlying output.HtsEncoder.write(HtsRecord)
may only called afterHtsEncoder.setHeader(HtsHeader)
has been called.- Parameters:
record
- record to write
-
close
public void close()Description copied from interface:HtsEncoder
Close any resources associated with this decoder.
-