Skip to content

norm: left-align <DUP> with INFO/END but no INFO/SVLEN - #2602

Merged
pd3 merged 1 commit into
samtools:developfrom
davmlaw:norm_symbolic_dup_end
Oct 16, 2026
Merged

pd3 merged 1 commit into
samtools:developfrom
davmlaw:norm_symbolic_dup_end

Conversation

@davmlaw

@davmlaw davmlaw commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Human Summary

Fixes #2601 - this makes <DUP> behave the same as <DEL>. Added new tests, old tests still pass

AI Summary

realign() read a <DUP>'s length only from INFO/SVLEN, so a <DUP> with INFO/END but no SVLEN came back as ERR_SYMBOLIC and was not left-aligned. A <DEL> with only END already was, because the <DEL> branch takes its length from line->rlen, and htslib's get_rlen() derives rlen from INFO/END or INFO/SVLEN for both <DEL> and <DUP>. This makes the <DUP> branch use rlen the same way and drops the separate SVLEN lookup.

Test norm.symbolic.4 (reusing the norm.symbolic.3 reference) has the explicit dup, the END-only <DUP> and the SVLEN+END <DUP>; all three now normalize to position 11 with END=18. Output is unchanged for <DUP> with SVLEN, <DEL>, and the other symbolic types (<INV>, <INS>, <CNV>, <*>, breakends), which are still passed through. test/test.pl passes.

Assisted-by: Claude:claude-fable-5-1

A <DUP> took its length only from INFO/SVLEN, so one described by
INFO/END alone was returned unchanged rather than realigned. The <DEL>
branch uses line->rlen, which htslib already derives from INFO/END or
INFO/SVLEN for both types, so do the same for <DUP>.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Dave Lawrence <davmlaw@gmail.com>
@davmlaw
davmlaw force-pushed the norm_symbolic_dup_end branch from 7037580 to e57a6c6 Compare October 12, 2026 07:02
@pd3
pd3 merged commit 1661708 into samtools:develop Oct 16, 2026
@pd3

pd3 commented Oct 16, 2026

Copy link
Copy Markdown
Member

With some modification, this is now merged. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

norm does not left-align <DUP> that has INFO/END but no INFO/SVLEN

2 participants