PharmGx Reporter¶
Generate a personalised pharmacogenomics report from 23andMe, AncestryDNA, or VCF data. Maps genotypes to drug-gene interactions using CPIC clinical guidelines.
Quick Demo¶
python3 skills/pharmgx-reporter/pharmgx_reporter.py \
--input skills/pharmgx-reporter/demo_patient.txt \
--output /tmp/pharmgx_demo
What It Does¶
- Parses consumer genetic data (23andMe v5, AncestryDNA v2, VCF)
- Extracts pharmacogenomically relevant SNPs (CYP2D6, CYP2C19, CYP2C9, DPYD, SLCO1B1, VKORC1, etc.)
- Calls star alleles and maps to metaboliser phenotypes
- Looks up CPIC drug-gene interactions
- Generates a Markdown report with drug recommendations, risk flags, and reproducibility bundle
CLI Reference¶
python3 skills/pharmgx-reporter/pharmgx_reporter.py \
--input <patient_file> \
--output <report_dir>
| Argument | Required | Description |
|---|---|---|
--input |
Yes | Path to 23andMe, AncestryDNA, or VCF file |
--output |
Yes | Output directory for report and figures |
Safety Rules¶
- If DPYD*2A detected and fluorouracil in drug list: report MUST include lethal-dose warning
- All drug-gene mappings traced to CPIC guideline version (declared in SKILL.md)
- Guideline version monitored; skill flagged when CPIC publishes updates
Output¶
report.md— Full pharmacogenomics reportfigures/— Metaboliser phenotype chartstables/— Drug interaction tables (CSV)commands.sh— Reproducibility scriptenvironment.yml— Pinned dependencieschecksums.sha256— Output verification