How can I convert VCF to HGVS format?
3
2
Entering edit mode
6.5 years ago

Is there any library that I can use to convert VCF format to HGVS format?

I'm using a python module called myvariant, but this module only allows me to input HGVS formats.

But all I have is VCFs, so I'm wondering if there are any each methods (preferably a python module) for me to use to convert a VCF format to a HGVS format.

It would be best if I could convert mixed indel variants to HGVS format. For example something like (not real coordinates/variants): [VCF] chr1 112 AAAAAA TG --> convert to [HGVS] chr1:g.112_117delinsTG

Thank you in advance!

next-gen genome • 5.8k views
ADD COMMENT
3
Entering edit mode
6.5 years ago

You can use tools such as VEP, SnpEff and Annovar to annotate your vcf file, which will also include HGVS notation of variants.

ADD COMMENT
1
Entering edit mode
6.5 years ago
Ram 44k

Take a look at the well named hgvs module: https://github.com/biocommons/hgvs

ADD COMMENT
0
Entering edit mode

Yes, I've looked up hgvs and pyhgvs. However, it doesn't seem to give any functionality about simple coordinate-alternation (chromosome : position : ref : var) to HGVS format (chr1.g.2919391C>T) conversion. If it had given it, I would've definitely used it.

ADD REPLY
0
Entering edit mode

There is no hgvs_g_to_c method that does exactly what you want? Maybe things have changed in the past couple of years, but I don't know if they'd remove a functionality.

EDIT: It does exist. See http://hgvs.readthedocs.io/en/stable/modules/mapping.html?highlight=g_to_c

ADD REPLY
0
Entering edit mode

anyway to use hgvs on a custom reference? i want to get the hgvs representation convention, without relying on a public reference or external database.

ADD REPLY
1
Entering edit mode

You'll need to craft it manually. It would not be HGVS per se, but you could use the conventions to show position and edit on your custom sequence. The important part would be establishing context - identifiers are global and point to the sequence being used, so you'd need to give your sequence an identifier and use it with all the notations, along with explaining that the identifier you are using is local to the context you're using it in.

ADD REPLY
0
Entering edit mode
6.5 years ago
bdolin ▴ 100

You may also be interested in this: https://batch.variantvalidator.org/vcf2hgvs/

From what I've seen, there are a number of VCF to HGVS converters, and they generally only look at a few VCF fields (e.g. Chr, Pos, Ref, Alt), so have some limitations.

ADD COMMENT
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 1606 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6