Skip to content

feat(vrs_map): add VRS mapping support for reference-identical variants#94

Open
bencap wants to merge 2 commits intomavedb-devfrom
feature/bencap/53/reference-identical-vrs
Open

feat(vrs_map): add VRS mapping support for reference-identical variants#94
bencap wants to merge 2 commits intomavedb-devfrom
feature/bencap/53/reference-identical-vrs

Conversation

@bencap
Copy link
Copy Markdown
Collaborator

@bencap bencap commented Apr 15, 2026

  • Add build_ref_identical_allele and translate_ref_identical_to_vrs to lookup.py to represent HGVS .= variants as VRS Alleles with a ReferenceLengthExpression state
  • Handle .= variants explicitly in _construct_vrs_allele and _create_post_mapped_hgvs_strings instead of silently skipping them
  • Remove len(hgvs) == 3 guards from validity predicates and early-exit checks; the reference-identical case is now handled directly
  • Fix is_intronic_variant to return False for position-less variants
  • Skip vrs_ref_allele_seq annotation for ReferenceLengthExpression alleles to avoid redundant and expensive full-sequence lookups

Opens #93 for us to decide on how to move forward with these sorts of ambiguous strings. See ga4gh/vrs#656 for additional discussion and context.

- Add `build_ref_identical_allele` and `translate_ref_identical_to_vrs`
  to `lookup.py` to represent HGVS `.=` variants as VRS Alleles with a
  `ReferenceLengthExpression` state
- Handle `.=` variants explicitly in `_construct_vrs_allele` and
  `_create_post_mapped_hgvs_strings` instead of silently skipping them
- Remove `len(hgvs) == 3` guards from validity predicates and early-exit
  checks; the reference-identical case is now handled directly
- Fix `is_intronic_variant` to return False for position-less variants
- Skip `vrs_ref_allele_seq` annotation for `ReferenceLengthExpression`
  alleles to avoid redundant and expensive full-sequence lookups
@bencap bencap requested review from jstone-dev and sallybg April 15, 2026 23:02
@bencap bencap linked an issue Apr 15, 2026 that may be closed by this pull request
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.

Mapping Output for Reference Identical WT Variants

1 participant