{"id":23850,"library":"hgvs","title":"HGVS","description":"HGVS (Human Genome Variation Society) nomenclature parser, formatter, validator, and mapper. Version 1.5.7 supports Python >=3.10. Released irregularly, with recent focus on selenocysteine support and bug fixes.","status":"active","version":"1.5.7","language":"python","source_language":"en","source_url":"https://github.com/biocommons/hgvs","tags":["hgvs","bioinformatics","genomics","variant","nomenclature"],"install":[{"cmd":"pip install hgvs","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for sequence utilities","package":"bioutils","optional":false},{"reason":"Required for grammar parsing","package":"parsley","optional":false},{"reason":"Required for UTA database connection","package":"psycopg2-binary","optional":true},{"reason":"Required for local sequence retrieval","package":"seqrepo","optional":true}],"imports":[{"note":"","wrong":null,"symbol":"parser","correct":"import hgvs.parser"},{"note":"","wrong":null,"symbol":"variantmapper","correct":"import hgvs.variantmapper"},{"note":"SequenceVariant is in a submodule, not top-level.","wrong":"import hgvs.SequenceVariant","symbol":"SequenceVariant","correct":"from hgvs.sequencevariant import SequenceVariant"}],"quickstart":{"code":"import hgvs.parser\nimport hgvs.dataproviders.uta\n\n# Initialize parser\nhp = hgvs.parser.Parser()\n\n# Parse an HGVS variant string\nvar = hp.parse_hgvs_variant('NM_000551.3:c.101T>A')\nprint(var)  # SequenceVariant(...)\n\n# For mapping, need a data provider (e.g., UTA)\n# hdp = hgvs.dataproviders.uta.connect()\n# vm = hgvs.variantmapper.VariantMapper(hdp)\n# t_vm = vm.c_to_t(var)\n# print(t_vm)","lang":"python","description":"Parse an HGVS variant string using the default parser."},"warnings":[{"fix":"Set environment variable UTA_DB_URL or use hgvs.dataproviders.uta.connect(url='postgresql://...')","message":"hgvs.dataproviders.uta.connect() uses an environment-based connection string; UTA_DB_URL must be set.","severity":"deprecated","affected_versions":">=1.5.0"},{"fix":"Review and update expected protein variant strings for transcripts with selenocysteine.","message":"In version 1.5.7, selenocysteine support changed protein translation for variants in selenocysteine-encoding transcripts (UGA codon). Existing code relying on prior behavior may produce different protein HGVS strings.","severity":"breaking","affected_versions":">=1.5.7"},{"fix":"Ensure a data provider is configured via environment variables or explicitly passed.","message":"hgvs requires a sequence data provider (e.g., UTA or seqrepo) for mapping operations. Without one, c_to_t, etc. will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to 1.5.8rc1 or pass raw (non-encoded) credentials.","message":"UTA database credentials may be URL-encoded; decoding is fixed in 1.5.8rc1, but 1.5.7 may fail if UTA_DB_URL contains percent-encoded characters.","severity":"gotcha","affected_versions":"1.5.0 - 1.5.7"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade hgvs to >=1.5.5 or install psycopg2-binary.","cause":"Outdated psycopg2 or missing pool module; fixed in 1.5.5.","error":"AttributeError: 'UTA_postgresql' object has no attribute '_pool'"},{"fix":"Set environment variable UTA_DB_URL or pass url to hgvs.dataproviders.uta.connect().","cause":"No database connection configured.","error":"ValueError: Could not find a data provider; set UTA_DB_URL or provide connection"},{"fix":"Verify the variant string conforms to HGVS syntax; e.g., 'NM_000551.3:c.101T>A'.","cause":"Malformed variant string (e.g., missing allele after '>').","error":"hgvs.exceptions.HGVSParseError: Expected '>' at position ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}