Skip to main content

"GA4GH Variation Representation Specification (VRS) reference implementation (https://github.com/ga4gh/vrs-python/)"

Project description

vrs-python

ci_rel | cov | pypi_rel

vrs-python provides Python language support for the [GA4GH Variation Representation Specification (VRS)](https://github.com/ga4gh/vr-spec).

This repository contains several related components:

  • ga4gh.vrs package Python language support for the spec.

  • ga4gh.vrs.extras package Python language support for additional functionality, including translating from and to other variant formats and a REST service to similar functionality. ga4gh.vrs.extras requires access to supporting data, as described below.

  • Jupyter notebooks Demonstrations of the functionality of ga4gh.vrs and ga4gh.vrs.extras in the form of easy-to-read notebooks.

Installing ga4gh.vrs

Installing with pip

$ pip install ga4gh.vrs[extras]

The [extras] argument tells pip to install packages to fullfill the dependencies of the ga4gh.vrs.extras package.

Installing for development

The following instructions are for Ubuntu 18.04+ and MacOS. vrs-python is unlikely to work on Windows due to dependencies.

$ git clone --recurse-submodules https://github.com/ga4gh/vrs-python.git
$ cd vrs-python
$ make devready

(Python 3.5 and 3.6 should also work.)

Installing Dependencies for ga4gh.vrs.extras

The ga4gh.vrs.extras modules are not part of the VR spec per se. They are bundled with ga4gh.vrs for development and installation convenience. These modules depend directly and indrectly on external data sources of sequences, transcripts, and genome-transcript alignments. This section recommends one way to install the biocommons tools that provide these data.

$ docker volume create --name=uta_vol
$ docker volume create --name=seqrepo_vol
$ docker-compose -f misc/stack/docker-compose.yml up

This should start three containers: * [seqrepo](https://github.com/biocommons/seqrepo): a non-redundant archive of sequences * [seqrepo-rest-service](https://github.com/biocommons/seqrepo-rest-service): a REST service on seqrepo (localhost:5000) * [uta](https://github.com/biocommons/uta): a database of transcripts and alignments (localhost:5432)

The seqrepo container will exit as soon as the data are downloaded.

$ docker ps
CONTAINER ID        IMAGE                                    //  NAMES
86e872ab0c69        biocommons/seqrepo-rest-service:latest   //  stack_seqrepo-rest-service_1
a40576b8cf1f        biocommons/uta:uta_20180821              //  stack_uta_1

Running the Notebooks

Once installed as described above, type:

$ source venv/3.7/bin/activate
$ jupyter notebook --notebook-dir notebooks/

The following jupyter extensions are recommended but not required:

$ pip install jupyter_contrib_nbextensions
$ jupyter contrib nbextension install --user
$ jupyter nbextension enable toc2/main

Security Note (from the GA4GH Security Team)

A stand-alone security review has been performed on the specification itself. This implementation is offered as-is, and without any security guarantees. It will need an independent security review before it can be considered ready for use in security-critical applications. If you integrate this code into your application it is AT YOUR OWN RISK AND RESPONSIBILITY to arrange for a security audit.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ga4gh.vrs-0.6.4rc0-py3.7.egg (51.0 kB view details)

Uploaded Source

ga4gh.vrs-0.6.4rc0-py2.py3-none-any.whl (28.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ga4gh.vrs-0.6.4rc0-py3.7.egg.

File metadata

  • Download URL: ga4gh.vrs-0.6.4rc0-py3.7.egg
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.1

File hashes

Hashes for ga4gh.vrs-0.6.4rc0-py3.7.egg
Algorithm Hash digest
SHA256 2e069896c7cf5e98d22497a6349e173c9da5899c15dd20de2ebd6950d35283a3
MD5 87f55e8252bae3c098ba13748ab00b0c
BLAKE2b-256 7faf677b13591a9542ccc1b8702805b060b34e2d24141056dde29348b7d704be

See more details on using hashes here.

File details

Details for the file ga4gh.vrs-0.6.4rc0-py2.py3-none-any.whl.

File metadata

  • Download URL: ga4gh.vrs-0.6.4rc0-py2.py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.1

File hashes

Hashes for ga4gh.vrs-0.6.4rc0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d9c8c38ece4f691efc6ae95a2bb3843732d9e65dd006a3860db7b224154a09fb
MD5 6b51b12ef8ac18428d3d2351a2e218d5
BLAKE2b-256 8e470cec3122fbbf55437d2d74168b569d427a0097d341717392876188bf3dbf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page