tinyhgvs
tinyhgvs is a lightweight HGVS parsing library with a Rust core and a Python
API. The project focuses on a small but expandable data model, clear error
diagnostics for unsupported syntax, and parity between the Rust and Python
surfaces.
Installation
tinyhgvs can be installed directly from PyPI:
Local deployment
For local development of the Python package:
Quick Examples
Parse a coding DNA substitution:
from tinyhgvs import parse_hgvs
variant = parse_hgvs("NM_004006.2:c.357+1G>A")
print(variant.coordinate_system.value)
print(variant.description.edit)
Parse an exact repeat:
from tinyhgvs import parse_hgvs
variant = parse_hgvs("NM_004006.3:r.-124_-123[14]")
print(variant.description.edit.blocks[0].count)
Inspect an unsupported syntax error: