variant-pharmacogenomics
$
npx mdskill add InternScience/scp/variant-pharmacogenomicsQueries PharmGKB for pharmacogenomic annotations linking variants to drug response and dosing
- Identifies how genetic variants affect drug efficacy, toxicity, and dosage requirements
- Uses the PharmGKB (clinPGx) API to retrieve clinical annotations and guidelines
- Evaluates evidence levels and guidelines (CPIC, DPWG, FDA) to prioritize results
- Returns structured data including drugs, genes, evidence, and related clinical resources
SKILL.md
.github/skills/variant-pharmacogenomicsView on GitHub ↗
---
name: variant-pharmacogenomics
description: "Query PharmGKB (clinPGx) for pharmacogenomic clinical annotations — how a variant affects drug response, dosing, and adverse reactions."
license: MIT license
metadata:
skill-author: PJLab
---
# PharmGKB (clinPGx) — Pharmacogenomic Annotations
## Usage
### Tool Description
```tex
Query PharmGKB clinical annotations API to find drug-gene-variant interactions.
Database: PharmGKB / clinPGx (https://www.pharmgkb.org/)
API: GET https://api.clinpgx.org/v1/data/clinicalAnnotation?location.fingerprint={rsid}&view=base
Args:
rs_id (str): dbSNP rsID (e.g. "rs7412")
Return:
Clinical annotations: related drugs (chemicals), evidence level (1A/1B/2A/2B/3/4),
related diseases, gene (APOE etc.), phenotype categories (efficacy/toxicity/dosage/PK),
related guidelines and FDA labels.
Return Fields Explanation:
- relatedChemicals: 关联的药物/化合物名称和 PharmGKB ID
- levelOfEvidence.term: 证据级别 (1A=最强, 有CPIC/DPWG指南; 4=最弱, 个案报告)
- location.genes: 变异所在基因
- relatedDiseases: 关联疾病
- types: 注释类型 (Efficacy=疗效, Toxicity=毒性, Dosage=剂量, PK=药代动力学)
- relatedGuidelines: 关联的用药指南 (CPIC, DPWG 等)
- relatedLabels: 关联的 FDA 药品标签
```
### Query Example
```python
import requests
rs_id = "rs7412"
url = f"https://api.clinpgx.org/v1/data/clinicalAnnotation?location.fingerprint={rs_id}&view=base"
resp = requests.get(url, timeout=30).json()
if isinstance(resp, dict) and "data" in resp:
annotations = resp["data"]
elif isinstance(resp, list):
annotations = resp
else:
annotations = []
print(f"[PharmGKB] {rs_id} 药物基因组注释数: {len(annotations)}")
for i, ann in enumerate(annotations):
# 药物
drugs = [c.get("name", "") for c in ann.get("relatedChemicals", [])]
# 证据级别
evidence = ann.get("levelOfEvidence", {}).get("term", "N/A")
# 基因
genes = [g.get("symbol", "") for g in ann.get("location", {}).get("genes", [])]
# 疾病
diseases = [d.get("name", "") for d in ann.get("relatedDiseases", [])]
# 注释类型
ann_types = ann.get("types", [])
print(f"\n [{i+1}] 药物: {drugs}")
print(f" 证据级别: {evidence}")
print(f" 基因: {genes}")
print(f" 类型: {ann_types}")
if diseases:
print(f" 疾病: {diseases}")
```
More from InternScience/scp
- admet_druglikeness_reportADMET & Drug-Likeness Report - Generate comprehensive ADMET and drug-likeness report: molecular properties, H-bond analysis, hydrophobicity, topology, and ADMET prediction. Use this skill for medicinal chemistry tasks involving calculate mol basic info calculate mol hbond calculate mol hydrophobicity calculate mol topology pred molecule admet. Combines 5 tools from 2 SCP server(s).
- affinity_maturationAffinity Maturation Pipeline - Affinity maturation: compute binding affinity, predict mutations, compute hydrophilicity, and predict drug-target interaction. Use this skill for antibody engineering tasks involving ComputeAffinityCalculator zero shot sequence prediction ComputeHydrophilicity PredictDrugTargetInteraction. Combines 4 tools from 3 SCP server(s).
- alanine_scanning_pipelineAlanine Scanning Mutagenesis Pipeline - Alanine scanning: design scan, compute properties for each mutant, predict interactions, and compare. Use this skill for protein biochemistry tasks involving AlanineScanningDesigner ComputeProtPara PredictDrugTargetInteraction calculate protein sequence properties. Combines 4 tools from 3 SCP server(s).
- aliphatic_ring_analysisRing System Analysis - Analyze ring systems: count aliphatic carbocycles, analyze aromaticity, compute topology, and structure complexity. Use this skill for organic chemistry tasks involving GetAliphaticCarbocyclesNum AromaticityAnalyzer calculate mol topology calculate mol structure complexity. Combines 4 tools from 3 SCP server(s).
- alphafold_structure_pipelineAlphaFold Structure Analysis Pipeline - AlphaFold pipeline: download predicted structure, predict pockets, extract sequence, and compute properties. Use this skill for computational biology tasks involving download alphafold structure run fpocket extract pdb sequence calculate pdb basic info. Combines 4 tools from 3 SCP server(s).
- antibody_drug_developmentAntibody Drug Development - Develop antibody drug: target protein analysis, biotherapeutic lookup, protein properties, and interaction prediction. Use this skill for biologics tasks involving get uniprotkb entry by accession get biotherapeutic by name ComputeProtPara ComputeHydrophilicity. Combines 4 tools from 3 SCP server(s).
- antibody_target_analysisAntibody-Target Analysis - Analyze an antibody target: UniProt protein info, InterPro domains, protein properties, and biotherapeutic data from ChEMBL. Use this skill for immunology tasks involving get uniprotkb entry by accession query interpro ComputeProtPara get biotherapeutic by name. Combines 4 tools from 4 SCP server(s).
- atc_drug_classificationATC Drug Classification Lookup - Look up drug in ATC classification: ChEMBL ATC class, FDA drug info, PubChem compound, and mechanism of action. Use this skill for pharmacology tasks involving get atc class by level5 get mechanism of action by drug name get compound by name get drug by name. Combines 4 tools from 3 SCP server(s).
- atmospheric-science-calculationsCalculate atmospheric parameters including Coriolis parameter, geostrophic wind, heat index, potential temperature, and dewpoint for meteorology and climate science.
- binding_site_characterizationBinding Site Characterization - Characterize binding sites: predict pockets with fpocket and P2Rank, get binding site info from ChEMBL, and visualize. Use this skill for structural biology tasks involving run fpocket pred pocket prank get binding site by id visualize protein. Combines 4 tools from 3 SCP server(s).