Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

biocommons/hgvs

Repository files navigation

Important: biocommons packages require Python 3.10+.More

Thehgvs package provides a Python library to parse, format, validate,normalize, and map sequence variants according toVariationNomenclature (aka Human Genome VariationSociety) recommendations.

Specifically, the hgvs package focuses on the subset of the HGVSrecommendations that precisely describe sequence-level variationrelevant to the application of high-throughput sequencing to clinicaldiagnostics. The package does not attempt to cover the full scope ofHGVS recommendations. Please refer toissues for limitations.

Information

rtdchangeloggetting_helpGitHub licensebinder

Latest Release

GitHub tagpypi_rel

Development

coverallsissuesGitHub Open Pull RequestsGitHub licenseGitHub starsGitHub 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 (intronicoffsets, uncertain positions, intervals)
  • A variant normalizer that rewrites variants in canonical forms andsubstitutes reference sequences (if reference and transcriptsequences differ)
  • Formatters that generate HGVS strings from internal representations
  • Tools to map variants between genome, transcript, and proteinsequences
  • Reliable handling of regions genome-transcript discrepancies
  • Pluggable data providers support alternative sources of transcriptmapping data
  • Extensive automated tests, including those for all variant types and"problematic" transcripts
  • Easily installed using remote data sources. Installation with localdata sources is straightforward and completely obviates networkaccess

Important Notes

  • You are encouraged tobrowseissues. All known issuesare 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 usesSemanticVersioning.

Installing HGVS Locally

Important: For more detailed installation and configurationinstructions, see theHGVS readthedocs

Prerequisites

libpqpython3postgresql

Examples for installation:

MacOS :

brew install libpqbrew install python3brew install postgresql@14

Ubuntu :

sudo apt install gcc libpq-dev python3-dev

Installation Steps

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

  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

SeeInstallationinstructionsfor details, including instructions for installingUniversal TranscriptArchive (UTA) andSeqRepo locally.

Examples and Usage

Seeexamples andreadthedocs for usage.

Contributing

The hgvs package is a community effort. Please seeContributing to getstarted in submitting source code, tests, or documentation. Thanks for gettinginvolved!

Testing

Existing tests use a cache that is committed with the repo to ensure that tests do not require external networking. To develop new tests, which requires loading the cache, you should install UTA and Seqrepo (and the rest service) locally.

docker compose --project-name biocommons -f $PWD/misc/docker-compose.yml up

IMPORTANT: Loading the test caches is currently hampered b#551,#760, and#761. To load reliably, usemake test-relearn-iteratively for now.

See Also

Other packages that manipulate HGVS variants:

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp