Metadata-Version: 2.4
Name: tinyhgvs
Version: 0.5.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Summary: Hybrid Rust/Python library for parsing HGVS variants.
Keywords: bioinformatics,genomics,hgvs,parser,variants
Home-Page: https://github.com/svm-zhang/tinyhgvs
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://svm-zhang.github.io/tinyhgvs
Project-URL: Homepage, https://github.com/svm-zhang/tinyhgvs
Project-URL: Issues, https://github.com/svm-zhang/tinyhgvs/issues
Project-URL: Repository, https://github.com/svm-zhang/tinyhgvs

# tinyhgvs

`tinyhgvs` is a lightweight HGVS parsing Python library backed by a core parser and
structured data and error model implemented in Rust.

## Installation

`tinyhgvs` can be installed directly from PyPI:

```bash
pip install tinyhgvs
```

## Quick start

- A splicing-site substitution crossing exon/intron boundary:

```python
from tinyhgvs import parse_hgvs

variant = parse_hgvs("NM_004006.2:c.357+1G>A")
print(variant.reference.primary.id)
print(variant.coordinate_system.value)
print(variant.description.location.start.coordinate)
print(variant.description.location.start.offset)
```

- Known but unsupported HGVS syntax raises `TINYHGVSError` with diagnostic code:

```python
from tinyhgvs import TinyHGVSError, parse_hgvs

try:
    parse_hgvs("NC_000001.11:g.[123G>A;345del]")
except TinyHGVSError as error:
    print(error.code)
```

## Documentation

Please refer to official documents for details about both Python and Rust APIs:

- [Python API and project docs](https://svm-zhang.github.io/tinyhgvs)
- [Rust API docs](https://docs.rs/tinyhgvs)


