Skip to content
/ hgvs Public
forked from biocommons/hgvs

Python library to parse, format, validate, normalize, and map sequence variants. `pip install hgvs`

License

Notifications You must be signed in to change notification settings

davmlaw/hgvs

This branch is 3 commits ahead of, 54 commits behind biocommons/hgvs:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

48f8350 · Dec 12, 2023
Dec 8, 2023
Nov 12, 2022
Sep 18, 2023
Sep 18, 2023
Nov 12, 2022
Jul 17, 2023
Sep 18, 2023
Sep 18, 2023
May 4, 2019
Jun 27, 2019
May 13, 2019
Dec 18, 2021
Apr 18, 2019
Dec 18, 2021
Mar 17, 2020
Mar 17, 2020
Sep 17, 2023
Mar 9, 2017
Nov 16, 2022
Sep 18, 2023
Dec 11, 2023
Dec 18, 2021
Dec 11, 2023
Nov 11, 2022
Dec 18, 2021

Repository files navigation

hgvs - manipulate biological sequence variants according to Human Genome Variation Society recommendations

Important: biocommons packages require Python 3.8+. More

The hgvs package provides a Python library to parse, format, validate, normalize, and map sequence variants according to Variation Nomenclature (aka Human Genome Variation Society) recommendations.

Specifically, the hgvs package focuses on the subset of the HGVS recommendations that precisely describe sequence-level variation relevant to the application of high-throughput sequencing to clinical diagnostics. The package does not attempt to cover the full scope of HGVS recommendations. Please refer to issues for limitations.

Information

rtd changelog getting_help GitHub license binder

Latest Release

GitHub tag pypi_rel

Development

coveralls issues GitHub Open Pull Requests GitHub license GitHub stars GitHub forks

Features

  • Parsing is based on formal grammar.
  • An easy-to-use object model that represents most variant types (SNVs, indels, dups, inversions, etc) and concepts (intronic offsets, uncertain positions, intervals)
  • A variant normalizer that rewrites variants in canonical forms and substitutes reference sequences (if reference and transcript sequences differ)
  • Formatters that generate HGVS strings from internal representations
  • Tools to map variants between genome, transcript, and protein sequences
  • Reliable handling of regions genome-transcript discrepancies
  • Pluggable data providers support alternative sources of transcript mapping data
  • Extensive automated tests, including those for all variant types and "problematic" transcripts
  • Easily installed using remote data sources. Installation with local data sources is straightforward and completely obviates network access

Important Notes

  • You are encouraged to browse issues. All known issues are listed there. Please report any issues you find.
  • Use a pip package specification to stay within minor releases. For example, hgvs>=1.5,<1.6. hgvs uses Semantic Versioning.

Installing HGVS Locally

Important: For more detailed installation and configuration instructions, see the HGVS readthedocs

Prerequisites

libpq
python3
postgresql

Examples for installation:

MacOS :

brew install libpq
brew install python3
brew install postgresql@14

Ubuntu :

sudo apt install gcc libpq-dev python3-dev

Installation Steps

By default, hgvs uses remote data sources, which makes installation easy. If you would like to use local instances of the data sources, see the readthedocs.

  1. Create a virtual environment using your preferred method.

    Example:

     python3 -m venv venv
    
  2. Run the following commands in your virtual environment:

     source venv/bin/activate
     pip install --upgrade setuptools
     pip install hgvs
    

See Installation instructions for details, including instructions for installing Universal Transcript Archive (UTA) and SeqRepo locally.

Examples and Usage

See examples and readthedocs for usage.

Contributing

The hgvs package is intended to be a community project. Please see Contributing to get started in submitting source code, tests, or documentation. Thanks for getting involved!

See Also

Other packages that manipulate HGVS variants:

About

Python library to parse, format, validate, normalize, and map sequence variants. `pip install hgvs`

Resources

License

Citation

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.9%
  • HTML 22.5%
  • Other 1.6%