Registry / data / hgvs
library1.5.7pypypi✓ verified 84d ago

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.

pip install hgvs
INSTALL
IMPORT
SIG · HGVS
H
hgvs
datapythonv1.5.7
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parser
import hgvs.parser
variantmapper
import hgvs.variantmapper
SequenceVariant
from hgvs.sequencevariant import SequenceVariant
import hgvs.SequenceVariant
SequenceVariant is in a submodule, not top-level.

Parse an HGVS variant string using the default parser.

import hgvs.parser import hgvs.dataproviders.uta # Initialize parser hp = hgvs.parser.Parser() # Parse an HGVS variant string var = hp.parse_hgvs_variant('NM_000551.3:c.101T>A') print(var) # SequenceVariant(...) # For mapping, need a data provider (e.g., UTA) # hdp = hgvs.dataproviders.uta.connect() # vm = hgvs.variantmapper.VariantMapper(hdp) # t_vm = vm.c_to_t(var) # print(t_vm)
Debug
Known issues
deprecatedhgvs.dataproviders.uta.connect() uses an environment-based connection string; UTA_DB_URL must be set.
fix
Set environment variable UTA_DB_URL or use hgvs.dataproviders.uta.connect(url='postgresql://...')
affects: >=1.5.0
breakingIn 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.
fix
Review and update expected protein variant strings for transcripts with selenocysteine.
affects: >=1.5.7
gotchahgvs requires a sequence data provider (e.g., UTA or seqrepo) for mapping operations. Without one, c_to_t, etc. will fail.
fix
Ensure a data provider is configured via environment variables or explicitly passed.
affects: all
gotchaUTA 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.
fix
Upgrade to 1.5.8rc1 or pass raw (non-encoded) credentials.
affects: 1.5.0 - 1.5.7
Errors
Common errors & fixes
AttributeError: 'UTA_postgresql' object has no attribute '_pool'
Outdated psycopg2 or missing pool module; fixed in 1.5.5.
fix
Upgrade hgvs to >=1.5.5 or install psycopg2-binary.
ValueError: Could not find a data provider; set UTA_DB_URL or provide connection
No database connection configured.
fix
Set environment variable UTA_DB_URL or pass url to hgvs.dataproviders.uta.connect().
hgvs.exceptions.HGVSParseError: Expected '>' at position ...
Malformed variant string (e.g., missing allele after '>').
fix
Verify the variant string conforms to HGVS syntax; e.g., 'NM_000551.3:c.101T>A'.
Upgrade
Version history
1.5.7latest on PyPI · released Mar 17, 2026
Audit
Dependencies
bioutilsrequiredRequired for sequence utilities
parsleyrequiredRequired for grammar parsing
psycopg2-binaryoptionalRequired for UTA database connection
seqrepooptionalRequired for local sequence retrieval
Agent activity
12 hits · last 30 days
node
12
Resources
hgvs — pip install hgvs · libregistry