biocommons / hgvs

Python library to parse, format, validate, normalize, and map sequence variants. `pip install hgvs`
https://hgvs.readthedocs.io/
Apache License 2.0
233 stars 94 forks source link

babelfish VCF to g.HGVS fails when contig accession used as chromosome name #744

Closed davmlaw closed 1 week ago

davmlaw commented 1 week ago

Many VCFs use contig accessions, ie "NC_000006.12" instead of "6"

These currently fail:

    hgvs_g = babelfish38.vcf_to_g_hgvs("NC_000006.12", 49949409, "GAA", "G")
>       ac = self.name_to_ac_map[chrom]
E       KeyError: 'NC_000006.12'

Will make pull request shortly