Skip to main content

No project description provided

Project description

PORI Python Adaptor

build codecov

This repository is part of the Platform for Oncogenomic Reporting and Interpretation (PORI).

This is a python adaptor package for querying the GraphKB API and IPR API.

This python tool takes in variant inputs as tab-delimited files and annotates them using GraphKB. The resulting output is uploaded to IPR as a report. Additional report content such as images and metadata can be passed to be included in the report upload.

For documentation on how to create reports using the IPR adaptor, see the main documentation site for the platform. For the GraphKB adaptor, see the user manual.

Getting Started

Install (For developers)

clone this repository

git clone https://github.com/bcgsc/pori_python.git
cd pori_python

create a virtual environment

python3 -m venv venv
source venv/bin/activate

install the package and its development dependencies

pip install -U pip setuptools
pip install -e .[dev]

Run the tests:

Export usernames, passwords, and set test options.

Note that IPR tests will try to use the BCGSC production GraphKB API by default. If you want to test interaction with a different instance, you will need to set the GraphKB variables.

Set EXCLUDE vars to 1 if you don't want to run these tests. ONCOKB and BCGSC tests are enabled by default.

export IPR_USER='pori_admin'
export IPR_PASS='pori_admin'
export IPR_URL='http://localhost:8081/api'
export GRAPHKB_USER='pori_admin'
export GRAPHKB_PASS='pori_admin'
export GRAPHKB_URL='http://localhost:8080/api'
EXCLUDE_BCGSC_TESTS = 1
EXCLUDE_ONCOKB_TESTS = 1

If you want to run tests that upload reports to a live IPR instance, specify the url of the IPR API you want to use and set the test var to 1. These tests are disabled by default.

export IPR_TEST_URL='http://localhost:8081/api'
INCLUDE_UPLOAD_TESTS = 1
pytest tests

Documentation

The user documentation for this tool is hosted with the main documentation site.

Developers: Any updates to this tool should be edited and reflected in the main site documentation as well.

Deployment (Publishing)

Install the deployment dependencies

pip install .[deploy]

Build the distribution files

python setup.py install sdist bdist_wheel

Upload the distibutions to the package server (-r is defined in your pypirc)

twine upload -r bcgsc dist/*

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

pori_python-0.1.0.tar.gz (82.2 kB view details)

Uploaded Source

Built Distribution

pori_python-0.1.0-py3-none-any.whl (97.1 kB view details)

Uploaded Python 3

File details

Details for the file pori_python-0.1.0.tar.gz.

File metadata

  • Download URL: pori_python-0.1.0.tar.gz
  • Upload date:
  • Size: 82.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pori_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d34f95ac6b2d17b7a15464da328c8acef04f0aeab1ba222d3a693a865da4f41a
MD5 64502a7e6f60cee5921f518f7340c908
BLAKE2b-256 8a4c6cdfc6c2a83a0b56e8a76bcc6b14598242dd00e3e379f4eb33b8a1a2d841

See more details on using hashes here.

File details

Details for the file pori_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pori_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 97.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pori_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef0ae66a60f28a1a5b49e7916df26484ab989308fe4f0fc25a1f835d3c80c82
MD5 b45dad0471a0e0ec9857acab39051f40
BLAKE2b-256 042817274ac5337c455b64dd87fe328f0acd7199fedb86df97b58586807d441b

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