No project description provided
Project description
PORI Python Adaptor
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 test options.
IPR_URL and GRAPHKB_URL values must also be set.
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 INCLUDE_UPLOAD_TESTS 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.
export IPR_TEST_URL='http://localhost:8081/api'
export INCLUDE_UPLOAD_TESTS=1
export DELETE_UPLOAD_TEST_REPORTS=0
pytest tests
JSON Validate and Upload to IPR
An IPR_URL must be provided either as an environment variable or an arg.
If you only want to validate the json content, use
ipr --password $IPR_PASS -c 'path/to/content.json' --validate_json --ipr_url $IPR_URL
If you only want to upload the json directly to ipr and skip all the preprocessing, use
ipr --password $IPR_PASS -c 'path/to/content.json' --upload_json --ipr_url $IPR_URL
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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pori_python-1.4.0.tar.gz.
File metadata
- Download URL: pori_python-1.4.0.tar.gz
- Upload date:
- Size: 104.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07d3b12550ecfe7ce0c36c517c130da03733cf1d49ffd2e7629ce1ac0472729
|
|
| MD5 |
4cf16f77ad8a1ef3a06c22715c5c7fd4
|
|
| BLAKE2b-256 |
1c82989f6a3fa0939e30e2b47fea3f5aa31871289922882df6fbfc071faa666d
|
File details
Details for the file pori_python-1.4.0-py3-none-any.whl.
File metadata
- Download URL: pori_python-1.4.0-py3-none-any.whl
- Upload date:
- Size: 119.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f50b7cc3f956e737e73d02e325191da10b38b2aa9eea0778e9f76db068227fb
|
|
| MD5 |
43539a2e28e71ab5545f85a2b7bb5eab
|
|
| BLAKE2b-256 |
428cd408926b35a2ad3386e7c53e9929d1e8e1f97de7b3d32322b5edd5211a9b
|