This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HGVS to VCF conversion

hi everyone,

I have a very large data set of genomic variants in hgvs format and I want to convert it into vcf format.

I've tried ensembl VEP tool. It works great for SNVs but in indels I need to get the Ref/Alt alleles because the next tool I use doesn't deal with N's

Input example:

NM_000059.3:c.8332-1603delT

VEP output:

#CHROM    POS    ID    REF    ALT
13    32368798    NM_000059.3:c.8332-1603delT    NT    N

Desired output:

#CHROM    POS    ID    REF    ALT
13    32368798    NM_000059.3:c.8332-1603delT    GT    G

Please let me know if there is any tool which allows this conversion or provide me some guidance to do it manually by scripting.

Thank you in advance

hgvs vcf format-conversion variant

thank you guys for your kind replies!

I also found the hgvs library googling the internet.

I'll give it a chance. Wish me luck!

Thanks again!

3 answers

There is a python library that does that. You can check that out. It is very straight forward to use and install.

https://github.com/counsyl/hgvs

VEP will add the preceding bases to indels if you use the --database flag (in place of --cache which I assume you are currently using).

If you update your VEP installation (re-run the INSTALL.pl script to grab the latest API code), then it should now also work with --cache. Performance will also be improved if you have a FASTA file set up for sequence retrieval (the INSTALL.pl script can fetch this for you, or see http://www.ensembl.org/info/docs/tools/vep/script/vep_cache.html#fasta)

thanks for sharing! so far I've used VEP via web interface but now I'm encouraged to install the API and test it in depth

Seems like you just need reference bases?

http://genome.ucsc.edu/cgi-bin/das/hg19/dna?segment=chr13:32368798,32368798

Log in to answer this question.