SeqLib icon indicating copy to clipboard operation
SeqLib copied to clipboard

Add LastFlag() to BamRecord

Open nathanweeks opened this issue 4 years ago • 0 comments

Currently, BamRecord objects have a FirstRead() method that returns true if the 0x40 bit of the FLAG field is set. This PR proposes adding a corresponding LastRead() method that returns true if the 0x80 bit is set.

Per the SAM spec:

Bits 0x40 and 0x80 reflect the read ordering within each template inherent in the sequencing technology used.13 If 0x40 and 0x80 are both set, the read is part of a linear template, but it is neither the first nor the last read. If both 0x40 and 0x80 are unset, the index of the read in the template is unknown. This may happen for a non-linear template or when this information is lost during data processing.

nathanweeks avatar May 05 '21 22:05 nathanweeks