Parses your PharmCAT results (step 7) to extract gene diplotypes and metabolizer phenotypes, then maps them against CPIC (Clinical Pharmacogenetics Implementation Consortium) guidelines to produce a plain-text report of medications that may require dosing adjustments based on your pharmacogenomic profile.
PharmCAT produces detailed JSON and HTML reports, but digging through them to find actionable drug recommendations takes time. This step distills the clinically relevant parts into a simple, readable report: for each gene where you are NOT a normal metabolizer, it lists the affected medications and points you to the corresponding CPIC guideline.
python:3.11-slim
${GENOME_DIR}/${SAMPLE}/pharmcat/${SAMPLE}.report.json${GENOME_DIR}/${SAMPLE}/vcf/${SAMPLE}.report.json${GENOME_DIR}/${SAMPLE}/pharmcat/report.json.json file in the pharmcat/ or vcf/ directories./scripts/27-cpic-lookup.sh your_name
The script includes CPIC-level gene-drug pairs for 16 pharmacogenes:
| Gene | Example affected drugs |
|---|---|
| CYP2C19 | Clopidogrel, escitalopram, omeprazole, sertraline |
| CYP2C9 | Warfarin, phenytoin, celecoxib, ibuprofen |
| CYP2D6 | Codeine, tramadol, tamoxifen, paroxetine, ondansetron |
| CYP3A5 | Tacrolimus |
| CYP2B6 | Efavirenz |
| DPYD | Fluorouracil, capecitabine |
| TPMT / NUDT15 | Azathioprine, mercaptopurine, thioguanine |
| UGT1A1 | Atazanavir, irinotecan |
| SLCO1B1 | Simvastatin, atorvastatin, rosuvastatin |
| VKORC1 | Warfarin |
| HLA-A / HLA-B | Carbamazepine, abacavir, allopurinol, phenytoin |
| IFNL3 | Peginterferon alfa |
| RYR1 / CACNA1S | Volatile anesthetics, succinylcholine |
| G6PD | Rasburicase |
| MT-RNR1 | Aminoglycosides |
| File | Contents |
|---|---|
${SAMPLE}_cpic_recommendations.txt |
Human-readable report with gene results and drug recommendations |
${SAMPLE}_phenotypes.tsv |
Intermediate gene/diplotype/phenotype table parsed from PharmCAT |
All output is written to ${GENOME_DIR}/${SAMPLE}/cpic/.
~1-2 minutes (mostly Docker startup overhead).
The report has two sections:
Lists every pharmacogene with its called diplotype and phenotype. For example:
Gene Diplotype Phenotype
CYP2C19 *1/*17 Rapid Metabolizer
CYP2D6 *1/*2 Normal Metabolizer
UGT1A1 *28/*28 Poor Metabolizer
Only genes where you are NOT a normal metabolizer appear here. For each, the report lists:
Normal/typical/extensive metabolizers are intentionally skipped – they require no dosing changes.
CPIC_DRUGS associative array in the script.