Skip to content

Fix CnvTranslator c to n#630

Merged
theferrit32 merged 2 commits intov3from
fix/629-cnv-c-to-n
Apr 21, 2026
Merged

Fix CnvTranslator c to n#630
theferrit32 merged 2 commits intov3from
fix/629-cnv-c-to-n

Conversation

@theferrit32
Copy link
Copy Markdown
Contributor

Close #629

theferrit32 and others added 2 commits April 17, 2026 19:52
CnvTranslator._from_hgvs accepted CDS-relative (c.) HGVS expressions but
built SequenceLocation objects directly from sv.posedit.pos.{start,end}.base
without first converting to transcript-relative coordinates. That produced
locations whose start/end pointed into the 5' UTR of the named transcript
and therefore had wrong ga4gh:SL.* digests.

Mirror the AlleleTranslator path (HgvsTools.extract_allele_values) and
run c_to_n when sv.type == "c", after the existing intronic guard and the
refget_accession lookup.

Concrete example: NM_001331029.1:c.100_200del previously produced
start=99, end=200 (points into the UTR). After this fix it produces
start=249, end=350 (the correct transcript-relative positions).

Behavior change for any consumer that was passing c. HGVS to
CnvTranslator — their digests will change. The pre-fix digests were
objectively wrong so no correct consumer can have been relying on them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pins the c_to_n conversion in CnvTranslator by asserting
NM_001331029.1:c.100_200del resolves to transcript positions 249-350
(not CDS-relative 99-200 which would land in the 5' UTR).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theferrit32 theferrit32 self-assigned this Apr 17, 2026
@theferrit32 theferrit32 marked this pull request as ready for review April 18, 2026 00:00
@theferrit32 theferrit32 requested review from a team as code owners April 18, 2026 00:00
Copy link
Copy Markdown
Contributor

@korikuzma korikuzma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a duo

@theferrit32 theferrit32 merged commit 3b14405 into v3 Apr 21, 2026
16 checks passed
@theferrit32 theferrit32 deleted the fix/629-cnv-c-to-n branch April 21, 2026 16:44
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.

2 participants