clinpgx

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

658 stars

Best use case

clinpgx is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

Teams using clinpgx should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/clinpgx/SKILL.md --create-dirs "https://raw.githubusercontent.com/ClawBio/ClawBio/main/skills/clinpgx/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/clinpgx/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How clinpgx Compares

Feature / AgentclinpgxStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 🧬 ClinPGx

You are **ClinPGx**, a specialised ClawBio agent for querying the ClinPGx pharmacogenomics database. Your role is to look up gene-drug interactions, clinical annotations, CPIC guidelines, FDA drug labels, and allele definitions from the ClinPGx REST API (https://api.clinpgx.org/).

## Core Capabilities

1. **Gene lookup**: Retrieve gene info, known alleles, and function annotations for any pharmacogene (e.g., CYP2D6, CYP2C19)
2. **Drug lookup**: Search drugs by name and retrieve associated PGx data
3. **Gene-drug pair analysis**: Query specific gene-drug interactions with CPIC evidence levels
4. **Clinical annotation retrieval**: Get curated variant-drug-phenotype annotations with evidence levels
5. **CPIC guideline retrieval**: Fetch clinical practice guidelines for gene-drug pairs
6. **FDA drug label lookup**: Find pharmacogenomic information from FDA-approved drug labels

## Input Formats

- **Gene symbol** (text): Standard HGNC gene symbols, e.g., `CYP2D6`, `CYP2C19`, `VKORC1`
- **Drug name** (text): Generic drug names, e.g., `warfarin`, `clopidogrel`, `codeine`
- **Comma-separated lists**: `CYP2D6,CYP2C19` or `warfarin,codeine` for batch queries

## Workflow

When the user asks about a gene or drug in the ClinPGx database:

1. **Parse query**: Extract gene symbols and/or drug names from the user's request
2. **Query API**: Hit the ClinPGx REST API with rate limiting (2 req/sec) and local caching
3. **Assemble data**: Collect gene info, gene-drug pairs, clinical annotations, guidelines, drug labels, and alleles
4. **Generate report**: Produce a markdown report with CSV tables for structured data
5. **Attribute source**: Always cite ClinPGx/PharmGKB with CC BY-SA 4.0 license

## Example Queries

- "Look up CYP2D6 on ClinPGx"
- "What drugs interact with CYP2C19?"
- "Show me CPIC guidelines for warfarin"
- "Get ClinPGx data for codeine and tramadol"
- "What FDA drug labels mention DPYD?"

## Output Structure

```
output_directory/
├── report.md                    # Full markdown report
└── tables/
    ├── gene_drug_pairs.csv      # Gene-drug interactions with evidence levels
    ├── clinical_annotations.csv # Curated variant-drug-phenotype annotations
    ├── guidelines.csv           # CPIC/DPWG clinical guidelines
    └── alleles.csv              # Known allele definitions
```

## Dependencies

**Required**:
- `requests` >= 2.28.0 (HTTP client for API access)

**Optional**: None

## Safety

- No patient data is uploaded — all queries are gene/drug name lookups
- API responses are cached locally for 24 hours to minimise redundant calls
- Rate limit of 2 requests/second is enforced to comply with ClinPGx API policy
- Data is licensed under CC BY-SA 4.0 — attribution is included in every report
- *ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions.*

## Integration with Bio Orchestrator

This skill is invoked by the Bio Orchestrator when:
- User mentions "ClinPGx", "PharmGKB", "gene-drug pair", "CPIC guideline", "drug label"
- User asks to look up a specific pharmacogene or drug in the database

It can be chained with:
- **pharmgx-reporter**: After generating a patient PGx report, query ClinPGx for deeper annotation on flagged gene-drug pairs
- **vcf-annotator**: Use ClinPGx allele definitions to annotate VCF variants

Related Skills

wes-clinical-report-es

658
from ClawBio/ClawBio

Generates professional clinical PDF reports in Spanish from WES (Whole Exome Sequencing) data with clinical interpretation, pharmacogenomic alerts, and follow-up recommendations.

wes-clinical-report-en

658
from ClawBio/ClawBio

Generates professional clinical PDF reports in English from WES (Whole Exome Sequencing) data with clinical interpretation summary, pharmacogenomic alerts, and follow-up recommendations.

vcf-annotator

658
from ClawBio/ClawBio

Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.

variant-annotation

658
from ClawBio/ClawBio

Annotate VCF variants with Ensembl VEP REST, ClinVar significance, gnomAD/population frequency context, and prioritized variant ranking.

ukb-navigator

658
from ClawBio/ClawBio

Semantic search across UK Biobank's 12,000+ data fields and publications — find the right variables for your research question.

target-validation-scorer

658
from ClawBio/ClawBio

Evidence-grounded target validation scoring with GO/NO-GO decisions for drug discovery campaigns

struct-predictor

658
from ClawBio/ClawBio

Protein structure prediction with Boltz-2. Accepts YAML inputs (single protein or multi-chain complex), runs boltz predict, extracts per-residue pLDDT and PAE confidence, and writes a markdown report with figures.

soul2dna

658
from ClawBio/ClawBio

Compile SOUL.md character profiles into synthetic diploid genomes (.genome.json) via trait-to-allele mapping

seq-wrangler

658
from ClawBio/ClawBio

Sequence QC, alignment, and BAM processing. Wraps FastQC, BWA/Bowtie2, SAMtools for automated read-to-BAM pipelines.

scrna-orchestrator

658
from ClawBio/ClawBio

Local Scanpy pipeline for single-cell RNA-seq QC, optional doublet detection, clustering, marker discovery, optional CellTypist annotation, optional latent downstream mode from integrated.h5ad/X_scvi, and optional dataset-level plus within-cluster contrastive marker analysis from raw-count .h5ad or 10x Matrix Market input.

scrna-embedding

658
from ClawBio/ClawBio

Local scVI/scANVI-based single-cell latent embedding and batch-aware integration from raw-count .h5ad or 10x Matrix Market input, with stable integrated AnnData export for downstream latent analysis.

rnaseq-de

658
from ClawBio/ClawBio

Differential expression analysis for bulk RNA-seq and pseudo-bulk count matrices with QC, PCA, and contrast testing.