Skip to content

gvl.write does not validate left-alignment of variants #200

@d-laub

Description

@d-laub

gvl.write documents that variant input must be left-aligned, but performs no check in the write/genotype path. Non-left-aligned indels are silently assumed canonical, which can misplace variants relative to the reference during haplotype reconstruction.

It should raise a clear ValueError (mirroring the multi-allelic guard at python/genvarloader/_dataset/_write.py:389) instructing the user to left-align (bcftools norm -f ref.fa).

Found via property-based testing (Phase 2 test overhaul). A clean-rejection test (tests/integration/dataset/test_haps_property.py) is marked xfail pending this validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions