bio-clinical-databases-pharmacogenomics
Query PharmGKB and CPIC for drug-gene interactions, pharmacogenomic annotations, and dosing guidelines
Install / Use
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-pharmacogenomicsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of bio-clinical-databases-pharmacogenomics
bio-clinical-databases-pharmacogenomics scores 86/100 on our quality scale, 424th of 604 Data & Analytics skills we index.
Its SKILL.md is 7.5 KB long, well organised into 15 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
With 3,034 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-11-03 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 86/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-30. Automated pattern scan on 2026-09-30. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
bio-clinical-databases-pharmacogenomics compared with similar skills
All 4 of these similar skills score higher than bio-clinical-databases-pharmacogenomics; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bio-clinical-databases-pharmacogenomics (this skill)by FreedomIntelligence | 86 | 3.0k | 4mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
| crawl4aiby unclecode | 100 | 87.4k | 3d ago | MCP Server |
Frequently asked questions
- How do I install bio-clinical-databases-pharmacogenomics?
- Run
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-pharmacogenomics. The install tabs above show the steps for each supported agent. - Which AI agents does bio-clinical-databases-pharmacogenomics work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is bio-clinical-databases-pharmacogenomics safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bio-clinical-databases-pharmacogenomics still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: bio-clinical-databases-pharmacogenomics description: Query PharmGKB and CPIC for drug-gene interactions, pharmacogenomic annotations, and dosing guidelines. Use when predicting drug response from genetic variants or implementing clinical pharmacogenomics. tool_type: python primary_tool: requests
Version Compatibility
Reference examples tested with: pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Pharmacogenomics
PharmGKB REST API
Goal: Retrieve drug-gene clinical annotations and dosing guidelines from PharmGKB.
Approach: Query PharmGKB REST endpoints by gene symbol or drug name and parse JSON annotation records.
"Find pharmacogenomic annotations for this gene" → Query PharmGKB for clinical annotations linking genes to drug response.
- Python:
requests.get()against PharmGKB API (requests)
Query Drug-Gene Relationships
import requests
def get_pharmgkb_annotations(gene_symbol):
'''Get PharmGKB clinical annotations for a gene'''
url = f'https://api.pharmgkb.org/v1/data/clinicalAnnotation'
params = {'view': 'base', 'location.genes.symbol': gene_symbol}
response = requests.get(url, params=params)
return response.json()['data']
annotations = get_pharmgkb_annotations('CYP2D6')
for ann in annotations[:5]:
print(f"{ann['location']['genes'][0]['symbol']}: {ann['chemicals'][0]['name']}")
Query by Drug
def get_drug_annotations(drug_name):
'''Get pharmacogenomic annotations for a drug'''
url = 'https://api.pharmgkb.org/v1/data/clinicalAnnotation'
params = {'view': 'base', 'chemicals.name': drug_name}
response = requests.get(url, params=params)
return response.json()['data']
warfarin_annotations = get_drug_annotations('warfarin')
Get Dosing Guidelines
def get_cpic_guidelines(gene_symbol):
'''Get CPIC dosing guidelines for a gene'''
url = 'https://api.pharmgkb.org/v1/data/guideline'
params = {'view': 'base', 'relatedGenes.symbol': gene_symbol, 'source': 'CPIC'}
response = requests.get(url, params=params)
return response.json()['data']
guidelines = get_cpic_guidelines('CYP2C19')
for g in guidelines:
print(f"{g['name']}: {g['chemicals'][0]['name']}")
Star Allele Interpretation
Goal: Determine metabolizer phenotype from CYP star allele diplotypes using CPIC activity scores.
Approach: Sum per-allele activity scores and classify into PM/IM/NM/UM categories based on CPIC thresholds.
CYP2D6 Metabolizer Status
# CYP2D6 activity scores for common alleles
# Based on CPIC guidelines
CYP2D6_ACTIVITY = {
'*1': 1.0, # Normal function
'*2': 1.0, # Normal function
'*3': 0.0, # No function
'*4': 0.0, # No function
'*5': 0.0, # Gene deletion
'*6': 0.0, # No function
'*9': 0.5, # Decreased function
'*10': 0.25, # Decreased function (common in East Asian)
'*17': 0.5, # Decreased function
'*41': 0.5, # Decreased function
}
def calculate_activity_score(allele1, allele2):
'''Calculate CYP2D6 activity score from diplotype'''
score1 = CYP2D6_ACTIVITY.get(allele1, 1.0)
score2 = CYP2D6_ACTIVITY.get(allele2, 1.0)
return score1 + score2
def get_metabolizer_status(activity_score):
'''Convert activity score to metabolizer phenotype
CPIC thresholds:
- PM: 0
- IM: 0 < score <= 1.25
- NM: 1.25 < score <= 2.25
- UM: > 2.25 (gene duplications)
'''
if activity_score == 0:
return 'Poor Metabolizer (PM)'
elif activity_score <= 1.25:
return 'Intermediate Metabolizer (IM)'
elif activity_score <= 2.25:
return 'Normal Metabolizer (NM)'
else:
return 'Ultrarapid Metabolizer (UM)'
score = calculate_activity_score('*1', '*4')
status = get_metabolizer_status(score)
print(f'Activity score: {score}, Status: {status}')
CYP2C19 Interpretation
CYP2C19_ACTIVITY = {
'*1': 1.0, # Normal function
'*2': 0.0, # No function (most common loss-of-function)
'*3': 0.0, # No function
'*17': 1.5, # Increased function
}
def cyp2c19_phenotype(allele1, allele2):
'''Determine CYP2C19 metabolizer status'''
score = CYP2C19_ACTIVITY.get(allele1, 1.0) + CYP2C19_ACTIVITY.get(allele2, 1.0)
if score == 0:
return 'Poor Metabolizer'
elif score < 1.5:
return 'Intermediate Metabolizer'
elif score <= 2.0:
return 'Normal Metabolizer'
elif score <= 2.5:
return 'Rapid Metabolizer'
else:
return 'Ultrarapid Metabolizer'
Drug Interaction Lookup
Goal: Check whether a specific drug-gene-variant combination has a known pharmacogenomic interaction.
Approach: Query PharmGKB variant annotation endpoint filtered by drug and gene, then match to the target variant.
def check_pgx_interaction(drug, gene, variant):
'''Check for pharmacogenomic drug-gene-variant interaction'''
url = 'https://api.pharmgkb.org/v1/data/variantAnnotation'
params = {
'chemicals.name': drug,
'location.genes.symbol': gene
}
response = requests.get(url, params=params)
annotations = response.json().get('data', [])
for ann in annotations:
if variant in str(ann.get('variant', {}).get('name', '')):
return {
'drug': drug,
'gene': gene,
'variant': variant,
'phenotype': ann.get('phenotypes', []),
'evidence': ann.get('evidenceLevel')
}
return None
Common PGx Gene-Drug Pairs
| Gene | Drugs | Clinical Impact | |------|-------|-----------------| | CYP2D6 | Codeine, tamoxifen, ondansetron | Efficacy, toxicity | | CYP2C19 | Clopidogrel, omeprazole, escitalopram | Efficacy, dosing | | CYP2C9 | Warfarin, phenytoin, NSAIDs | Bleeding risk, dosing | | VKORC1 | Warfarin | Dosing | | TPMT | Azathioprine, mercaptopurine | Myelosuppression | | DPYD | Fluorouracil, capecitabine | Severe toxicity | | HLA-B57:01 | Abacavir | Hypersensitivity | | HLA-B15:02 | Carbamazepine | SJS/TEN | | SLCO1B1 | Simvastatin | Myopathy risk | | UGT1A1 | Irinotecan | Neutropenia |
Batch PGx Annotation
Goal: Annotate a cohort of variants across multiple pharmacogenes with drug interaction data.
Approach: Iterate over a list of pharmacogenes, fetch PharmGKB annotations for each, and collect results into a DataFrame.
import pandas as pd
def annotate_pgx_variants(vcf_variants, pgx_genes):
'''Annotate variants in pharmacogenes
Args:
vcf_variants: DataFrame with chrom, pos, ref, alt
pgx_genes: List of pharmacogenes to check
'''
results = []
for gene in pgx_genes:
annotations = get_pharmgkb_annotations(gene)
for ann in annotations:
results.append({
'gene': gene,
'drug': ann['chemicals'][0]['name'] if ann.get('chemicals') else None,
'phenotype': ann.get('phenotypes', []),
'level': ann.get('levelOfEvidence')
})
return pd.DataFrame(results)
pgx_genes = ['CYP2D6', 'CYP2C19', 'CYP2C9', 'VKORC1', 'TPMT']
pgx_df = annotate_pgx_variants(vcf_df, pgx_genes)
Related Skills
- clinical-databases/clinvar-lookup - Pathogenicity classification
- variant-calling/clinical-interpretation - ACMG guidelines
- clinical-databases/variant-prioritization - Clinical filtering
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
87.4kOfficial Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
