Giter VIP home page Giter VIP logo

pori_ipr_python's Introduction

IPR

build PyPi codecov PyPI - Downloads DOI

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

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 this adaptor, see the main documentation site for the platform.

Getting Started

Install (For developers)

clone this repository

git clone https://github.com/bcgsc/pori_ipr_python.git
cd pori_ipr_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

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.

pori_ipr_python's People

Contributors

creisle avatar dustinbleile avatar elewis2 avatar mathieulemieux avatar mattdoug604 avatar nithriel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

faruqsandi

pori_ipr_python's Issues

Missing required expression comparators

When running pori ipr python adapter using expression data as input I receive the following error:

Traceback (most recent call last):
File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/venv/bin/ipr", line 11, in
load_entry_point('ipr', 'console_scripts', 'ipr')()
File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/main.py", line 133, in command_interface
generate_therapeutics=args.therapeutics,
File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/main.py", line 219, in create_report
check_comparators(optional_content or {}, expression_variants)
File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/inputs.py", line 551, in check_comparators
raise ValueError(f'missing required comparator definitions ({missing})')
ValueError: missing required comparator definitions (expression (biopsy site); expression (disease); expression (primary site))

Command:
ipr --username 'cgrisdale' --password 'myPass' -e tests/test_data/expression.tab --patient_id 'ExpTest02' -d 'colorectal cancer' -o ./ExpTest02_output.json

OS: centos7
Python: 3.6.9

Missing property 'template' error

I tried running the pori ipr python adapter using provided small mutation test data and received the following error message:

Traceback (most recent call last): File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/main.py", line 331, in create_report ipr_result = ipr_conn.upload_report(output) File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/connection.py", line 66, in upload_report return self.post('/reports', content) File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/connection.py", line 62, in post **kwargs, File "/projects/cgrisdale_prj/POG/GraphKB/PORI_python_adapter/pori_ipr_python/ipr/connection.py", line 53, in request raise requests.exceptions.HTTPError(message) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://iprstaging-api.bcgsc.ca/api//reports There was an error validating the report content Error: should have required property 'template' [missingProperty: template]

Command run:
ipr --username 'cgrisdale' --password 'myPass' -m tests/test_data/small_mutations_probe.tab --patient_id 'SmMuTest02' -d 'colorectal cancer' -o ./SmMutTest02_output.json

OS: centos7
Python: 3.6.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.