Skip to content

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

Description

@davmlaw

🤖 Written by Claude

bcftools norm left-aligns a symbolic <DEL> whether its length comes from INFO/SVLEN or INFO/END, and a <DUP> when INFO/SVLEN is present. A <DUP> described only by INFO/END, though, is left where it is. Follow-up to #2145.

Using the norm.symbolic.3.fa test reference (ACTCACAAAGGGATTACAGATTACAGATTACAGGGGATCCAGAT):

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
1	26	.	G	GATTACAG	.	PASS	SVTYPE=DUP
1	26	.	G	<DUP>	.	PASS	SVTYPE=DUP;END=33
1	26	.	G	<DUP>	.	PASS	SVTYPE=DUP;SVLEN=7;END=33

bcftools norm -f norm.symbolic.3.fa (1.24, and develop at 347c273):

1	11	.	G	GGATTACA	.	PASS	SVTYPE=DUP
1	11	.	G	<DUP>	.	PASS	SVTYPE=DUP;SVLEN=7;END=18
1	26	.	G	<DUP>	.	PASS	SVTYPE=DUP;END=33

The explicit allele and the SVLEN <DUP> move to position 11, but the END-only <DUP> stays at 26. The same happens on real data (GRCh37 NC_000003.11:128200306, SVTYPE=DUP;END=128201507), whereas the equivalent <DEL> with only END is realigned.

In realign(), a <DUP> takes its length only from INFO/SVLEN; without it sv_len is 0 and the record returns ERR_SYMBOLIC unchanged. VCF 4.2/4.3 callers commonly write END without SVLEN.

Activity

  1. davmlaw commented on Oct 7, 2026

    @davmlaw
    Author

    🤖 Written by Claude

    For reference, this follows the spec's backwards-compatibility rule. SVLEN is optional in VCF 4.2/4.3, where END gives a symbolic allele's span, so END-only <DUP> records are valid there. VCF 4.4 makes SVLEN mandatory for symbolic SV alleles but says:

    For backwards compatibility, a missing SVLEN should be inferred from the END field of VCF records whose ALT field contains a single symbolic allele.

    VCF 4.5 deprecates END and keeps the same rule ("a missing SVLEN should be inferred from the END field"). norm already does this for <DEL>, via rlen, but not for <DUP>. #2602 fixes that.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions