You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fuse read base restoration, CIGAR building, and NM/MD computation into single pass.
Previously CRAM decode performed 3-4 separate passes over each record's features:
restoreReadBases (2 sub-passes), getCigarForReadFeatures, and calculateMdAndNm
(via a separately-derived CIGAR). The new restoreBasesAndTags method in
CRAMRecordReadFeatures does all of this in a single iteration, simultaneously
filling bases, building CIGAR elements, and accumulating the MD string and NM
count. Base normalization (toBamReadBasesInPlace) is also folded in.
The CIGAR is cached on CRAMCompressionRecord so toSAMRecord() doesn't need
to recompute it. Handles edge cases: reads extending beyond the reference
boundary, unmapped reads, and the no-features fast path.
Made SequenceUtil.bamReadBaseLookup public for use by the fused method.
Benchmarked: 38% cumulative decode speedup (180s -> 111s on 51.7M records).
0 commit comments