tinyhgvs 0.1.0

Lightweight Rust library for parsing HGVS variants.
Documentation
  • Coverage
  • 46.24%
    43 out of 93 items documented14 out of 14 items with examples
  • Size
  • Source code size: 83.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.36 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 34s Average build duration of successful builds.
  • all releases: 35s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • svm-zhang/tinyhgvs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • svm-zhang

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:

pip install tinyhgvs

Quick start

  • An splicing-site substitution crossing exon/intron boundary:
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:
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:

Citation

If you use tinyhgvs in your project, please kindly cite the github repository.

License

tinyhgvs is licensed under MIT license.