Class CRAMCodecModelContext
java.lang.Object
htsjdk.samtools.cram.structure.CRAMCodecModelContext
Context model data for use by CRAM 3.1 codec write implementations that need per-record metadata
beyond the raw byte stream. Populated during slice construction from the list of CRAM records,
then passed through to
ExternalCompressor.compress(byte[], CRAMCodecModelContext) calls.
Currently used by FQZComp, which needs per-record quality score lengths and BAM flags to
properly compress quality scores with context modeling.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]intint[]voidpopulateFromRecords(List<CRAMCompressionRecord> records) Populate this context from the records in a slice.
-
Constructor Details
-
CRAMCodecModelContext
public CRAMCodecModelContext()
-
-
Method Details
-
populateFromRecords
Populate this context from the records in a slice. Should be called during slice construction before records are written to blocks.- Parameters:
records- the CRAM records for this slice
-
getQualityScoreLengths
public int[] getQualityScoreLengths()- Returns:
- per-record quality score lengths (one per record in the slice), or null if not populated
-
getBamFlags
public int[] getBamFlags()- Returns:
- per-record BAM flags (one per record in the slice), or null if not populated
-
getNumRecords
public int getNumRecords()- Returns:
- number of records, or 0 if not populated
-