Skip to content

genomic / cdna coord conversion of upstream/downstream regions on NR transcripts#43

Open
rolfschr wants to merge 3 commits intocounsyl:masterfrom
rolfschr:master
Open

genomic / cdna coord conversion of upstream/downstream regions on NR transcripts#43
rolfschr wants to merge 3 commits intocounsyl:masterfrom
rolfschr:master

Conversation

@rolfschr
Copy link

Hi,

I found some issues with the genomic / cdna coord conversion for NR transcripts. I base my findings on comparing the results from pyhgvs with Alamut Visual (which in turn is consistent with https://mutalyzer.nl/position-converter). Specifically, I saw that upstream (befor first exon) and downstream (after last exon) cdna coords were copmletely off for non-coding (NR) transcripts. Exonic and intronic regions are fine. I believe the issue stems from trying to use the (non-existing) start (or end) position of the cds regions as an offset. I have added some unittests which fail.

I have also supplied a patch which makes the unittests pass. However, I believe this is not the way one would implement genomic_to_cdna_coord(). It's more like a hint. I also added a crappy hack for a very specific scenario in cdna_to_genomic_coord() where I did not find how to do it "more" correctly.

As an example:

chr13:g.70681018del on ATXN8OS NR_002717.2 (upstream) is coded as NR_002717.2:n.-327 by Alamut/Mutalyzer but pygvs.genomic_to_cdna_coord('NR_002717.2', 70681018) returns -326. chr13:g.70714013del (same tx, downstream) should be *128 but is 1600.

@davmlaw
Copy link

davmlaw commented May 28, 2021

I think "NR_002717.2:n.-327" violates the HGVS spec:

https://varnomen.hgvs.org/bg-material/numbering/

non-coding DNA reference sequences

It is not allowed to describe variants in nucleotides which are not covered by the transcript using a non-coding DNA reference sequence

g-b-f added a commit to g-b-f/pyhgvs2 that referenced this pull request May 26, 2025
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