Difference between revisions of "Pharmacolyzer"

(Examples of use)
(Example of how access to the Pharmacolyzer through a REST API could look like)
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
In order to get personalized medication recommendations for a patient that has been sequenced, the Pharmacolyzer does multiple queries to the [[Pharmacoracle]].  
 
In order to get personalized medication recommendations for a patient that has been sequenced, the Pharmacolyzer does multiple queries to the [[Pharmacoracle]].  
  
The starting point is a representation of the patient VCF in Manchester syntax provided by the [[Pharmacotyper]].
+
The starting point is a JSON file with a representation of the patient VCF in Manchester syntax provided by the [[Pharmacotyper]].
  
 
We have coined the verb ''to pharmacolyze'' for the action of the Pharmacolyzer
 
We have coined the verb ''to pharmacolyze'' for the action of the Pharmacolyzer
  
===Examples of use===
+
===Getting access to pharmacolyzis of sensitive data===
We have downloaded a VCF with samples from the [http://grch37.ensembl.org/Homo_sapiens/Tools/DataSlicer?db=core 1000 genomes project]. Four samples from the VCF was then [[Pharmacotyper|pharmacotyped]] and stored in a JSON file called ''merged_patient.json''. Pharmacolysis can be performed for the following drugs and patient samples:
+
Patient VCFs are sensitive data, and storage of VCF data and [[Pharmacotyper|pharmacotyping]] are preformed on secure servers. It may also be sensible to run the pharmacolyzer in a facility for sensitive data, and only export the final ''pharmacolysis''. Access to the final PGx analysis could be given through a REST API, and we describe one approach in the section below.
 +
 
 +
===Example of how access to the Pharmacolyzer through a REST API could look like===
 +
We have downloaded a VCF with samples from the [http://grch37.ensembl.org/Homo_sapiens/Tools/DataSlicer?db=core 1000 genomes project]. Four samples from the VCF was then [[Pharmacotyper|pharmacotyped]] and stored in a JSON file called ''merged_patient.json'' which is now accessible to the Pharmacolyzer at pgx.no. Pharmacolysis can be performed for the following drugs and patient samples:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 15: Line 18:
 
|| NA19461 <br> NA19068 <br> NA20754 <br> NA21137
 
|| NA19461 <br> NA19068 <br> NA20754 <br> NA21137
 
|}
 
|}
running the following command from the command line
+
by running commands on the form
<pre>curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461"</pre>
+
<pre>curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461&samples=NA21137"</pre>
 +
from the command line.
 
For pretty printing, the following can be used:
 
For pretty printing, the following can be used:
 
<pre>curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461"  | python -m json.tool </pre>
 
<pre>curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461"  | python -m json.tool </pre>
 +
Note that this is quite slow (20-30 seconds, especially the first query, when the OWL reasoner process is being set up, later queries may become as little as 4-5 seconds, which is still a bit slow for such a simple program)

Latest revision as of 12:50, 28 August 2018

Pharmacolyzer - Personalizing the PGx recommendations

In order to get personalized medication recommendations for a patient that has been sequenced, the Pharmacolyzer does multiple queries to the Pharmacoracle.

The starting point is a JSON file with a representation of the patient VCF in Manchester syntax provided by the Pharmacotyper.

We have coined the verb to pharmacolyze for the action of the Pharmacolyzer

Getting access to pharmacolyzis of sensitive data

Patient VCFs are sensitive data, and storage of VCF data and pharmacotyping are preformed on secure servers. It may also be sensible to run the pharmacolyzer in a facility for sensitive data, and only export the final pharmacolysis. Access to the final PGx analysis could be given through a REST API, and we describe one approach in the section below.

Example of how access to the Pharmacolyzer through a REST API could look like

We have downloaded a VCF with samples from the 1000 genomes project. Four samples from the VCF was then pharmacotyped and stored in a JSON file called merged_patient.json which is now accessible to the Pharmacolyzer at pgx.no. Pharmacolysis can be performed for the following drugs and patient samples:

Drugs Samples
azathioprine
clopidogrel
NA19461
NA19068
NA20754
NA21137

by running commands on the form

curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461&samples=NA21137"

from the command line. For pretty printing, the following can be used:

curl https://www.pgx.no/api/pharmacolyzer -d "patient_name=merged_patient&drugs=azathioprine&samples=NA19461"  | python -m json.tool 

Note that this is quite slow (20-30 seconds, especially the first query, when the OWL reasoner process is being set up, later queries may become as little as 4-5 seconds, which is still a bit slow for such a simple program)