Package htsjdk.beta.plugin
Interface HtsEncoder<H extends HtsHeader,R extends HtsRecord>
- Type Parameters:
H
- type param for the header for this encoder's format (i.e. SAMFileHeader)R
- type param for the record for this encoder's format (i.e. SAMRecord)
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
HaploidReferenceEncoder
,ReadsEncoder
,VariantsEncoder
- All Known Implementing Classes:
BAMEncoder
,BAMEncoderV1_0
,CRAMEncoder
,CRAMEncoderV2_1
,CRAMEncoderV3_0
,SAMEncoder
,SAMEncoderV1_0
,VCFEncoder
,VCFEncoderV3_2
,VCFEncoderV3_3
,VCFEncoderV4_0
,VCFEncoderV4_1
,VCFEncoderV4_2
Base interface for encoders.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close any resources associated with this decoder.Get a user-friendly display name for this encoder.Get the name of the file format supported by this encoder.Get the version of the file format supported by this encoder.void
Set the file format header for this decoder, of typeHtsEncoder
.void
Write a single record to the underlying output.
-
Method Details
-
getFileFormat
String getFileFormat()Get 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 (seeBundleResourceType
andBundleResource.getFileFormat()
).- Returns:
- the name of the underlying file format handled by this encoder
-
getVersion
HtsVersion getVersion()Get the version of the file format supported by this encoder. -
getDisplayName
String getDisplayName()Get a user-friendly display name for this encoder.- Returns:
- a user-friendly display name for this encoder for use in error and warning messages
-
setHeader
Set the file format header for this decoder, of typeHtsEncoder
.setHeader(HtsHeader)
must be called beforewrite(HtsRecord)
can be called.- Parameters:
header
- to use
-
write
Write a single record to the underlying output.write(HtsRecord)
may only called aftersetHeader(HtsHeader)
has been called.- Parameters:
record
- record to write
-
close
void close()Close any resources associated with this decoder.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-