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'
export EXCLUDE_BCGSC_TESTS=1
export 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.

The created reports are deleted by default. If you want to keep them, set DELETE_UPLOAD_TEST_REPORTS to 0 in the env.

export IPR_TEST_URL='http://localhost:8081/api'
export INCLUDE_UPLOAD_TESTS=1
export DELETE_UPLOAD_TEST_REPORTS=0
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-1.1.0.tar.gz (99.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pori_python-1.1.0-py3-none-any.whl (114.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pori_python-1.1.0.tar.gz
  • Upload date:
  • Size: 99.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pori_python-1.1.0.tar.gz
Algorithm Hash digest
SHA256 eaa1c247b5e80fe1bc605ac2ed223ccfe3357aadd542a6d4682c41390e8d127c
MD5 b469f043fd5dc7483a0a2d419203267d
BLAKE2b-256 be52b2ba49782ed6a26b6bc0a5ed09a74fd60b5d7a15e2d3de47d96930168258

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pori_python-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 114.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pori_python-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0505e8bd5353bce7d61d0217ab78f0fc08ac66572821227d31e0f35a647ddce3
MD5 22788a39c09eaa068b8773f7506e2428
BLAKE2b-256 9bb17c3a3c94a7ef91523d43b2ef4132ea6d02b14f788496739dbd70ed889838

See more details on using hashes here.

Supported by

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