samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

*CramCompressionRecord getAlignmentSpan() and getAlignmentEnd() don't reflect changed state #1301

Closed jmthibault79 closed 4 years ago

jmthibault79 commented 5 years ago

Subject of the issue

getAlignmentSpan() / getAlignmentEnd() only calculate their values once, via initializeAlignmentBoundaries(). If the underlying data changes, callers will see stale span and end values.

My preferred solution would be to make CramCompressionRecord immutable.

Noticed in #1284 but the problem existed prior to that.

cmnbroad commented 5 years ago

Fixed in refactoring branch. (CramCompressionRecord, now CRAMRecord, is immutable).

cmnbroad commented 4 years ago

Closed via https://github.com/samtools/htsjdk/pull/1440.