hgvs icon indicating copy to clipboard operation
hgvs copied to clipboard

Consider exposing a utility for converting between g. variants by leveraging pyliftover

Open mihaitodor opened this issue 1 year ago • 6 comments

Workaround using the existing functionality: If I have, say var_g = hgvs.parser.Parser().parse_hgvs_variant('NC_000005.9:g.112090651A>G') and I want to do liftover between assemblies, one way that seems to work is to call vm.relevant_transcripts(var_g) and pick a random relevant transcript (that starts with NM_) using the GRCh38 AssemblyMapper, then do var_c = vm.g_to_c(parsed_variant, relevant_transcript) and then use the AssemblyMapper associated with GRCh37 to call c_to_g(var_c). However, it feels clunky and I'm not sure if picking a random "relevant transcript" makes sense in the general case.

Thank you @rhdolin for figuring out this workaround!

mihaitodor avatar Nov 17 '23 02:11 mihaitodor