Related Experiment Videos
VarSim: A Python Toolkit for HGVS Variant Description Validation, Normalization, and Representation Conversion
Liu Sun1,2, Rongshu Wang1,2, Jian Yang1,2
1Department of Computer Science School of Engineering Yuxi Normal University Yuxi China yxnu.net.
Abstract:
Accurate and reproducible representation of genetic variants is essential for clinical genomics, variant databases, and genomic research. The Human Genome Variation Society (HGVS) recommendations provide a standardized framework for describing sequence variants, but practical HGVS processing commonly involves multiple interdependent tasks, including parsing, validation, normalization, coordinate transformation, protein consequence inference, and conversion between variant representation formats. We developed VarSim, a lightweight Python toolkit that integrates these operations within a reference-aware workflow based on version-pinned Matched Annotation from NCBI and EMBL-EBI (MANE) transcripts retrieved from NCBI Entrez. VarSim provides programmatic functions for HGVS parsing, syntactic and semantic validation, normalization, sequence extraction, backtranslation, coordinate mapping, protein consequence prediction, genome-assembly liftover, and conversion between HGVS, VCF, and SPDI representations. We benchmarked the toolkit using 1458 HGVS descriptions across five MANE transcripts, comprising 500 coding single-nucleotide variants, 250 frameshift insertions/deletions, and 708 intronic splice-site substitutions. All 1458 descriptions passed VarSim syntactic validation, and all 750 coding descriptions passed semantic validation against the corresponding reference sequences. VariantValidator accepted all 1458 descriptions, whereas the Mutalyzer normalization endpoint processed the 750 coding descriptions. VarSim normalization agreed with Mutalyzer for all 750 coding variants and with VariantValidator for 749 of 750 variants. Protein consequence predictions agreed with VariantValidator for all 500 coding single-nucleotide variants. Format conversion between HGVS, VCF, and SPDI was exact for the tested variants, whereas transcript-to-genome projection showed substantial discrepancies relative to VariantValidator and therefore remains a limitation of the current implementation. VarSim provides a complementary, programmatic framework for reproducible HGVS processing and variant representation interoperability.