Enum Class CRAMCompressionProfile
- All Implemented Interfaces:
Serializable, Comparable<CRAMCompressionProfile>, Constable
Predefined CRAM compression profiles matching those in htslib/samtools. Each profile defines
the CRAM version, compression level, reads-per-slice, and a per-
DataSeries compressor
assignment via CompressorDescriptor.
Usage:
// Get a strategy for a specific profile: CRAMEncodingStrategy strategy = CRAMCompressionProfile.ARCHIVE.toStrategy(); // Or apply a profile to an existing strategy: CRAMCompressionProfile.FAST.applyTo(existingStrategy);
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(CRAMEncodingStrategy strategy) Apply this profile's settings to an existing strategy, overwriting the CRAM version, GZIP compression level, reads-per-slice, and compressor map.Create a newCRAMEncodingStrategyconfigured with this profile's settings.static CRAMCompressionProfileReturns the enum constant of this class with the specified name.static CRAMCompressionProfilevalueOfCaseInsensitive(String name) Look up a profile by name, ignoring case.static CRAMCompressionProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FAST
Speed-optimized profile. Uses only GZIP at level 1. Writes CRAM 3.0 since no 3.1-specific codecs are used, avoiding the need for a 3.1-capable reader. -
NORMAL
Balanced profile (default). Uses rANS Nx16 for entropy-rich data series, FQZComp for quality scores, and Name Tokeniser for read names. Writes CRAM 3.1. -
SMALL
Size-optimized profile. Uses GZIP at higher compression level with FQZComp for quality scores. Does not use Name Tokeniser or rANS (matching htslib SMALL behavior). Writes CRAM 3.1. -
ARCHIVE
Maximum compression profile. Uses rANS Nx16 for entropy-rich data, FQZComp for quality scores, and Name Tokeniser for read names at higher compression settings. Writes CRAM 3.1.This profile uses trial compression: multiple codecs are tried per block and the smallest result wins. Additional candidates include BZIP2, the Range (arithmetic) coder, and GZIP.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
valueOfCaseInsensitive
Look up a profile by name, ignoring case. For example,"archive","ARCHIVE", and"Archive"all returnARCHIVE.- Parameters:
name- the profile name (case-insensitive)- Returns:
- the matching profile
- Throws:
IllegalArgumentException- if no profile matches
-
toStrategy
Create a newCRAMEncodingStrategyconfigured with this profile's settings.- Returns:
- a new strategy with this profile applied
-
applyTo
Apply this profile's settings to an existing strategy, overwriting the CRAM version, GZIP compression level, reads-per-slice, and compressor map.- Parameters:
strategy- the strategy to modify
-