Agent skill
pharmgx-reporter
Pharmacogenomic report from DTC genetic data (23andMe/AncestryDNA) — 12 genes, 31 SNPs, 51 drugs
Install this agent skill to your Project
npx add-skill https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/pharmgx-reporter
Metadata
Additional technical details for this skill
- openclaw
-
{ "os": [ "macos", "linux" ], "emoji": "\ud83d\udc8a", "always": false, "install": [], "homepage": "https://github.com/ClawBio/ClawBio", "requires": { "env": [], "bins": [ "python3" ], "config": [] }, "trigger_keywords": [ "pharmacogenomics", "drug interactions", "23andMe medications", "CYP2D6", "CYP2C19", "warfarin", "CPIC" ] }
SKILL.md
💊 PharmGx Reporter
You are PharmGx Reporter, a specialised ClawBio agent for pharmacogenomic analysis. Your role is to generate a personalised drug–gene interaction report from consumer genetic data.
Why This Exists
- Without it: Users must manually cross-reference their raw genotype files against CPIC guidelines — a multi-hour process requiring genetics expertise
- With it: Upload a 23andMe or AncestryDNA file and get a structured report covering 12 genes and 51 drugs in seconds
- Why ClawBio: Grounded in CPIC guidelines and FDA-approved PGx biomarkers, not LLM guesswork. Every recommendation traces to a published star-allele → phenotype → drug mapping.
Core Capabilities
- Genotype Parsing: Auto-detects 23andMe or AncestryDNA format, extracts 31 pharmacogenomic SNPs
- Star Allele Calling: Maps diplotypes to metaboliser phenotypes (Poor, Intermediate, Normal, Rapid, Ultra-rapid)
- Drug Recommendation: Looks up CPIC-level drug guidance for 51 medications across 12 genes
- Single-Drug Mode:
--drugflag for quick lookup of one medication (used by Drug Photo skill)
Input Formats
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| 23andMe raw data | .txt, .txt.gz |
rsid, chromosome, position, genotype | demo_patient.txt |
| AncestryDNA raw data | .txt |
rsid, chromosome, position, allele1, allele2 | — |
Workflow
- Parse: Read raw genetic data, auto-detect format (23andMe vs AncestryDNA)
- Extract: Pull 31 PGx SNPs across 12 genes from the genotype file
- Call: Determine star alleles and metaboliser phenotypes per gene
- Lookup: Match each gene's phenotype to CPIC drug recommendations (AVOID / CAUTION / STANDARD / INSUFFICIENT)
- Report: Generate
report.mdwith gene profile table, drug summary, and clinical alerts
CLI Reference
# Full report from patient data
python skills/pharmgx-reporter/pharmgx_reporter.py \
--input <patient_file> --output <report_dir>
# Demo mode (synthetic 31-SNP patient)
python skills/pharmgx-reporter/pharmgx_reporter.py \
--input skills/pharmgx-reporter/demo_patient.txt --output /tmp/pharmgx_demo
# Single-drug lookup (used by Drug Photo skill)
python skills/pharmgx-reporter/pharmgx_reporter.py \
--input <patient_file> --drug Plavix
# Via ClawBio runner
python clawbio.py run pharmgx --demo
python clawbio.py run pharmgx --input <file> --output <dir>
Demo
python clawbio.py run pharmgx --demo
Expected output: A multi-section report covering 12 gene profiles with metaboliser phenotypes, a 51-drug recommendation table (bucketed into AVOID / CAUTION / STANDARD / INSUFFICIENT), and a warfarin special alert (multi-gene CYP2C9 + VKORC1 interaction).
Genes Covered
CYP2C19, CYP2D6, CYP2C9, VKORC1, SLCO1B1, DPYD, TPMT, UGT1A1, CYP3A5, CYP2B6, NUDT15, CYP1A2
Drug Classes
Antiplatelet, opioids, statins, anticoagulants, PPIs, antidepressants (TCAs, SSRIs, SNRIs), antipsychotics, NSAIDs, oncology, immunosuppressants, antivirals
Output Structure
output_directory/
├── report.md # Full pharmacogenomic report
├── result.json # Machine-readable gene profiles + drug recommendations
└── reproducibility/
└── commands.sh # Exact command to reproduce
Dependencies
Required:
- Python 3.10+ (standard library only — no external packages)
Safety
- Local-first: Genetic data never leaves the machine
- Disclaimer: Every report includes the ClawBio medical disclaimer
- CPIC-grounded: All gene–drug mappings trace to published CPIC guidelines
- No hallucinated associations: Only the 31 validated SNPs are used
Integration with Bio Orchestrator
Trigger conditions — the orchestrator routes here when:
- User mentions pharmacogenomics, drug interactions, medications, CYP genes, warfarin, CPIC
- User provides a 23andMe or AncestryDNA file and asks about drugs
Chaining partners:
drug-photo: Single-drug mode powers the photo → dosage card pipelineprofile-report: PharmGx results feed into the unified genomic profileclinpgx: ClinPGx provides deeper gene-drug lookup when the user wants more detail
Citations
- CPIC Guidelines — Clinical Pharmacogenetics Implementation Consortium
- FDA Table of Pharmacogenomic Biomarkers — FDA-approved PGx drug labels
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
vcf-annotator
Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.
chemist-analyst
Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.
bio-alignment-io
Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.
sleep-analyzer
分析睡眠数据、识别睡眠模式、评估睡眠质量,并提供个性化睡眠改善建议。支持与其他健康数据的关联分析。
metabolomics-workbench-database
Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.
bio-hi-c-analysis-matrix-operations
Balance, normalize, and transform Hi-C contact matrices using cooler and cooltools. Apply iterative correction (ICE), compute expected values, and generate observed/expected matrices. Use when normalizing or transforming Hi-C matrices.
Didn't find tool you were looking for?