Class CramRecordReader


  • public final class CramRecordReader
    extends Object
    A reader used to consume and populate encoded CRAMCompressionRecords from a set of streams representing data series/blocks in a Slice. This is essentially a bridge between the various data series streams associated in a Slice and the corresponding CRAMCompressionRecord fields.
    • Constructor Detail

      • CramRecordReader

        public CramRecordReader​(Slice slice,
                                CompressorCache compressorCache,
                                ValidationStringency validationStringency)
        Initialize a Cram Record Reader
        Parameters:
        slice - the slice into which the records should be read
        validationStringency - how strict to be when reading this CRAM record
    • Method Detail

      • readCRAMRecord

        public CRAMCompressionRecord readCRAMRecord​(long sequentialIndex,
                                                    int prevAlignmentStart)
        Read a CRAMCompressionRecord, using this reader's data series readers.
        Parameters:
        prevAlignmentStart - the alignmentStart of the previous record, for position delta calculation
        Returns:
        the newly-read CRAMCompressionRecord