clinical-variant-ark

A Python client for the Clinical Variant Ark


Keywords
CVA, pyark, clinical, variant, ark, Genomics, England
License
Apache-2.0
Install
pip install clinical-variant-ark==5.0.1

Documentation

pyark

pyark is a python client to the Clinical Variant Ark (CVA) REST API https://github.com/genomicsengland/clinical_variant_ark. pyark primary aim is to facilitate access to CVA knowledge base hiding the complexity using the REST API. Also by integrating with major Python data analysis libraries it aims at enabling an analytical framework on CVA.

Getting Started

Prerequisites

pyark works with python 2.7 up to python 3.6.

Installing

Install with pip:

pip install clinical-variant-ark

or to enable the optional as_data_frame methods:

pip install clinical-variant-ark[pandas]

You will need a CVA server up and running and you will need credentials with the right authorisation permissions.

Initialise the client:

from pyark.cva_client import CvaClient

cva = CvaClient(url_base="https://your.cva", user="you", password="your_secret")
cases_client = cva.cases()
entities_client = cva.entities()
variants_client = cva.variants()
report_events_client = cva.report_events()
transactions_client = cva.transactions()

Query CVA's knowledge base:

cases_client.count()

Check the version of the client you are using:

import pyark

print("pyark version {}".format(pyark.VERSION))

See the documentation for further usage at https://genomicsengland.github.io/pyark/.

Running the tests

Set the following environment variables:

export CVA_URL="https://your.cva"
export GEL_USER="you"
export GEL_PASSWORD="your_secret"

You may need to do something like this to install the gel report models:

pip install gelreportmodels==7.2.6 --index-url=https://pypi.gel.zone/genomics/dev

Then run unit tests:

python -m unittest discover

These tests rely on a working CVA server with some data in it.

Versioning

We use semantic versioning. The major and minor versions are aligned with the CVA backend versioning.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache v2.0 license - see the LICENSE.md file for details

Acknowledgments

  • Genomics England bioinformatics team as an infinite source of requirements
  • Katherine Smith and Augusto Rendon for spending their time playing with pyark!
  • Antonio Rueda Martin for listening to us