Skip to main content

hgvs dataproviders based on UTA and SeqRepo REST Interfaces

Project description

hgvs-dataproviders-rest

Rest interface for UTA and SeqRepo, which combined make up an hgvs data provider.

The uta and seqrepo databases are used by hgvs to perform many of its sequence manipulation functions. The hgvs library includes tools to normalize, validate, and map sequence variants (among other functionalities). In order for hgvs to access info needed for such work, it uses the uta data provider to fetch transcripts and sequences.

This package includes a REST api (restapi.py) for uta that stands between hgvs and uta/seqrepo databases, along with a data provider for hgvs (restclient.py) that acts as its client.

Installing the Rest Interface Locally

Install docker.

$ docker pull biocommons/uta-rest:uta-rest
$ docker volume create --name=uta-rest
$ docker run -p 8000:8000 biocommons/uta-rest:uta-rest

Or without docker:

$ make devready
$ source venv/bin/activate
$ uvicorn restapi:app

Using with hgvs

Simply pass the result of utarest's connect() function as an argument into any hgvs tool, e.g. Assembly Mapper.

>>> import hgvs_dataproviders_rest
>>> import hgvs.assemblymapper
>>> hdp = hgvs_dataproviders_rest.connect()

>>> am = hgvs.assemblymapper.AssemblyMapper(hdp,
...     assembly_name='GRCh37', alt_aln_method='splign',
...     replace_reference=True)

Instead of calling connect() from hgvs.dataproviders.uta, you are using .hgvs_dataproviders_rest. Both implement the hgvs data providers interface.

Using with hgvs (2.0+)

A second version of hgvs is planned, which allows for selecting a data provider out of several supported options: uta, hgvs_dataproviders_rest, cdot, and possibly a future Ensembl interface implementation. See utaclients for more info on each data provider.

Developer Installation

$ make devready
$ source venv/bin/activate
$ uvicorn restapi:app --reload

Project details


Download files

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

Source Distribution

hgvs_dataproviders_rest-0.0.2.tar.gz (32.3 kB view hashes)

Uploaded Source

Built Distribution

hgvs_dataproviders_rest-0.0.2-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

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