The String Is Not The Variant
Variant callers preserve different amounts of surrounding sequence. Two VCF rows can look different while describing the same molecular edit, which breaks joins across cohorts, annotations, and knowledge bases.
vrsbridge parses sequence-resolved SNVs and indels, expands multiallelic records, removes redundant prefix and suffix context, and converts the result from one-based VCF positions into inter-residue coordinates.
Bridge VCF To A Shared Model
Each normalized record becomes a GA4GH VRS 1.3 Allele with a SequenceLocation and LiteralSequenceExpression. A deterministic local digest groups equivalent structures for inspection in the CLI, JSON API, and browser workbench.
The repository ships the translator, equivalence engine, responsive workbench, API, CLI, Docker image, four regression tests, and a two-version GitHub Actions matrix.
The Demo
Four VCF records encode two molecular changes. One context-rich substitution and its minimal form collapse into one allele; two valid deletion encodings collapse into the other. Four strings become two computable representations.
The scope is explicit. Minimal normalization removes shared context, while full justification across repeats needs a reference-sequence service. The local digest is an equivalence key, not a GA4GH computed identifier.
A Real Bug: Malformed Input, Silently Wrong Output
The VCF parser fell back to splitting on any whitespace whenever a tab-delimited line came up short on tab-separated columns. That was meant to tolerate genuinely space-delimited VCF-like exports, but it also silently reinterpreted a truncated tab-delimited record — a missing ALT column with a stray internal space, exactly what a tab-to-space conversion accident produces — into a different, wrong variant instead of raising an error.
Verified directly: a line with a missing ALT column (four tab fields, not five) parsed cleanly into a plausible-looking but entirely wrong variant, no error raised anywhere. Fixed so the whitespace fallback only fires when a line has no tabs at all; a genuinely short tab-delimited line is now rejected as malformed, which is the correct behavior for a tool whose entire job is translating variant coordinates correctly.
Standards Basis
Built against the GA4GH VRS 1.3 model and its normalization guidance.