Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get hgvs official name from "15-49716528-A-G"? #743

Open
shizipo opened this issue Jun 21, 2024 · 1 comment
Open

Is it possible to get hgvs official name from "15-49716528-A-G"? #743

shizipo opened this issue Jun 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@shizipo
Copy link

shizipo commented Jun 21, 2024

like "https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg19/15-49716528-A-G/mane_select/" ?

get "NC_000015.9(NM_001330293.1):c.911-1617T>C"

@shizipo shizipo added the enhancement New feature or request label Jun 21, 2024
@jsstevenson
Copy link
Contributor

Hey @shizipo!

I don't think this is possible with out-of-the-box with HGVS. However, the VRS-Python library (which is biocommons-adjacent) does include a translator module that can ingest gnomAD-style variation descriptions and output them as HGVS strings (making use of the HGVS library under the hood). See https://github.com/ga4gh/vrs-python/blob/main/notebooks/getting_started/4_Exploring_the_AlleleTranslator.ipynb for more.

code snippet from @korikuzma

from biocommons.seqrepo import SeqRepo
from ga4gh.vrs.extras.translator import AlleleTranslator
from ga4gh.vrs.dataproxy import SeqRepoDataProxy

sr = SeqRepo(root_dir="/usr/local/share/seqrepo/latest")
seqrepo_dataproxy = SeqRepoDataProxy(sr)
allele_translator = AlleleTranslator(data_proxy=seqrepo_dataproxy)

gnomad_vcf = "15-49716528-A-G"
vo = allele_translator.translate_from(gnomad_vcf)
print(allele_translator.translate_to(vo, "hgvs"))
# ['NC_000015.10:g.49716528A>G']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants