[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M735C6W92JAXC7M6Y11FYBQ2":3,"skill-same:01M735C6W92JAXC7M6Y11FYBQ2":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M735C6W92JAXC7M6Y11FYBQ2","alterlab-clinpgx",null,"Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions. Part of the AlterLab Academic Skills suite.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-clinpgx\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: alterlab-clinpgx\ndescription: Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions. Part of the AlterLab Academic Skills suite.\nlicense: MIT\nmetadata:\n    skill-author: AlterLab\n    version: \"1.0.0\"\n---\n\n# ClinPGx Database\n\n## Overview\n\nClinPGx (Clinical Pharmacogenomics Database) is a comprehensive resource for clinical pharmacogenomics information, successor to PharmGKB. It consolidates data from PharmGKB, CPIC, and PharmCAT, providing curated information on how genetic variation affects medication response. Access gene-drug pairs, clinical guidelines, allele functions, and drug labels for precision medicine applications.\n\n## When to Use This Skill\n\nThis skill should be used when:\n\n- **Gene-drug interactions**: Querying how genetic variants affect drug metabolism, efficacy, or toxicity\n- **CPIC guidelines**: Accessing evidence-based clinical practice guidelines for pharmacogenetics\n- **Allele information**: Retrieving allele function, frequency, and phenotype data\n- **Drug labels**: Exploring FDA and other regulatory pharmacogenomic drug labeling\n- **Pharmacogenomic annotations**: Accessing curated literature on gene-drug-disease relationships\n- **Clinical decision support**: Using PharmDOG tool for phenoconversion and custom genotype interpretation\n- **Precision medicine**: Implementing pharmacogenomic testing in clinical practice\n- **Drug metabolism**: Understanding CYP450 and other pharmacogene functions\n- **Personalized dosing**: Finding genotype-guided dosing recommendations\n- **Adverse drug reactions**: Identifying genetic risk factors for drug toxicity\n\n## Installation and Setup\n\n### Python API Access\n\nThe ClinPGx REST API provides programmatic access to all database resources. Basic setup:\n\n```bash\nuv pip install requests\n```\n\n### API Endpoint\n\n```python\nBASE_URL = \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002F\"\n```\n\n**Rate Limits**:\n- 2 requests per second maximum\n- Excessive requests will result in HTTP 429 (Too Many Requests) response\n\n**Authentication**: Not required for basic access\n\n**Data License**: Creative Commons Attribution-ShareAlike 4.0 International License\n\nFor substantial API use, notify the ClinPGx team at api@clinpgx.org\n\n## Core Capabilities\n\n### 1. Gene Queries\n\n**Retrieve gene information** including function, clinical annotations, and pharmacogenomic significance:\n\n```python\nimport requests\n\n# Get gene details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\")\ngene_data = response.json()\n\n# Search for genes by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\",\n                       params={\"q\": \"CYP\"})\ngenes = response.json()\n```\n\n**Key pharmacogenes**:\n- **CYP450 enzymes**: CYP2D6, CYP2C19, CYP2C9, CYP3A4, CYP3A5\n- **Transporters**: SLCO1B1, ABCB1, ABCG2\n- **Other metabolizers**: TPMT, DPYD, NUDT15, UGT1A1\n- **Receptors**: OPRM1, HTR2A, ADRB1\n- **HLA genes**: HLA-B, HLA-A\n\n### 2. Drug and Chemical Queries\n\n**Retrieve drug information** including pharmacogenomic annotations and mechanisms:\n\n```python\n# Get drug details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\u002FPA448515\")  # Warfarin\ndrug_data = response.json()\n\n# Search drugs by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                       params={\"name\": \"warfarin\"})\ndrugs = response.json()\n```\n\n**Drug categories with pharmacogenomic significance**:\n- Anticoagulants (warfarin, clopidogrel)\n- Antidepressants (SSRIs, TCAs)\n- Immunosuppressants (tacrolimus, azathioprine)\n- Oncology drugs (5-fluorouracil, irinotecan, tamoxifen)\n- Cardiovascular drugs (statins, beta-blockers)\n- Pain medications (codeine, tramadol)\n- Antivirals (abacavir)\n\n### 3. Gene-Drug Pair Queries\n\n**Access curated gene-drug relationships** with clinical annotations:\n\n```python\n# Get gene-drug pair information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2D6\", \"drug\": \"codeine\"})\npair_data = response.json()\n\n# Get all pairs for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2C19\"})\nall_pairs = response.json()\n```\n\n**Clinical annotation sources**:\n- CPIC (Clinical Pharmacogenetics Implementation Consortium)\n- DPWG (Dutch Pharmacogenetics Working Group)\n- FDA (Food and Drug Administration) labels\n- Peer-reviewed literature summary annotations\n\n### 4. CPIC Guidelines\n\n**Access evidence-based clinical practice guidelines**:\n\n```python\n# Get CPIC guideline\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\u002FPA166104939\")\nguideline = response.json()\n\n# List all CPIC guidelines\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                       params={\"source\": \"CPIC\"})\nguidelines = response.json()\n```\n\n**CPIC guideline components**:\n- Gene-drug pairs covered\n- Clinical recommendations by phenotype\n- Evidence levels and strength ratings\n- Supporting literature\n- Downloadable PDFs and supplementary materials\n- Implementation considerations\n\n**Example guidelines**:\n- CYP2D6-codeine (avoid in ultra-rapid metabolizers)\n- CYP2C19-clopidogrel (alternative therapy for poor metabolizers)\n- TPMT-azathioprine (dose reduction for intermediate\u002Fpoor metabolizers)\n- DPYD-fluoropyrimidines (dose adjustment based on activity)\n- HLA-B*57:01-abacavir (avoid if positive)\n\n### 5. Allele and Variant Information\n\n**Query allele function and frequency data**:\n\n```python\n# Get allele information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2D6*4\")\nallele_data = response.json()\n\n# Get all alleles for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                       params={\"gene\": \"CYP2D6\"})\nalleles = response.json()\n```\n\n**Allele information includes**:\n- Functional status (normal, decreased, no function, increased, uncertain)\n- Population frequencies across ethnic groups\n- Defining variants (SNPs, indels, CNVs)\n- Phenotype assignment\n- References to PharmVar and other nomenclature systems\n\n**Phenotype categories**:\n- **Ultra-rapid metabolizer** (UM): Increased enzyme activity\n- **Normal metabolizer** (NM): Normal enzyme activity\n- **Intermediate metabolizer** (IM): Reduced enzyme activity\n- **Poor metabolizer** (PM): Little to no enzyme activity\n\n### 6. Variant Annotations\n\n**Access clinical annotations for specific genetic variants**:\n\n```python\n# Get variant information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\u002Frs4244285\")\nvariant_data = response.json()\n\n# Search variants by position (if supported)\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\",\n                       params={\"chromosome\": \"10\", \"position\": \"94781859\"})\nvariants = response.json()\n```\n\n**Variant data includes**:\n- rsID and genomic coordinates\n- Gene and functional consequence\n- Allele associations\n- Clinical significance\n- Population frequencies\n- Literature references\n\n### 7. Clinical Annotations\n\n**Retrieve curated literature annotations** (formerly PharmGKB clinical annotations):\n\n```python\n# Get clinical annotations\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"gene\": \"CYP2D6\"})\nannotations = response.json()\n\n# Filter by evidence level\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"evidenceLevel\": \"1A\"})\nhigh_evidence = response.json()\n```\n\n**Evidence levels** (from highest to lowest):\n- **Level 1A**: High-quality evidence, CPIC\u002FFDA\u002FDPWG guidelines\n- **Level 1B**: High-quality evidence, not yet guideline\n- **Level 2A**: Moderate evidence from well-designed studies\n- **Level 2B**: Moderate evidence with some limitations\n- **Level 3**: Limited or conflicting evidence\n- **Level 4**: Case reports or weak evidence\n\n### 8. Drug Labels\n\n**Access pharmacogenomic information from drug labels**:\n\n```python\n# Get drug labels with PGx information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"drug\": \"warfarin\"})\nlabels = response.json()\n\n# Filter by regulatory source\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"source\": \"FDA\"})\nfda_labels = response.json()\n```\n\n**Label information includes**:\n- Testing recommendations\n- Dosing guidance by genotype\n- Warnings and precautions\n- Biomarker information\n- Regulatory source (FDA, EMA, PMDA, etc.)\n\n### 9. Pathways\n\n**Explore pharmacokinetic and pharmacodynamic pathways**:\n\n```python\n# Get pathway information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\u002FPA146123006\")  # Warfarin pathway\npathway_data = response.json()\n\n# Search pathways by drug\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\",\n                       params={\"drug\": \"warfarin\"})\npathways = response.json()\n```\n\n**Pathway diagrams** show:\n- Drug metabolism steps\n- Enzymes and transporters involved\n- Gene variants affecting each step\n- Downstream effects on efficacy\u002Ftoxicity\n- Interactions with other pathways\n\n## Query Workflow\n\n### Workflow 1: Clinical Decision Support for Drug Prescription\n\n1. **Identify patient genotype** for relevant pharmacogenes:\n   ```python\n   # Example: Patient is CYP2C19 *1\u002F*2 (intermediate metabolizer)\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2C19*2\")\n   allele_function = response.json()\n   ```\n\n2. **Query gene-drug pairs** for medication of interest:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   pair_info = response.json()\n   ```\n\n3. **Retrieve CPIC guideline** for dosing recommendations:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   guideline = response.json()\n   # Recommendation: Alternative antiplatelet therapy for IM\u002FPM\n   ```\n\n4. **Check drug label** for regulatory guidance:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                          params={\"drug\": \"clopidogrel\"})\n   label = response.json()\n   ```\n\n### Workflow 2: Gene Panel Analysis\n\n1. **Get list of pharmacogenes** in clinical panel:\n   ```python\n   pgx_panel = [\"CYP2C19\", \"CYP2D6\", \"CYP2C9\", \"TPMT\", \"DPYD\", \"SLCO1B1\"]\n   ```\n\n2. **For each gene, retrieve all drug interactions**:\n   ```python\n   all_interactions = {}\n   for gene in pgx_panel:\n       response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                              params={\"gene\": gene})\n       all_interactions[gene] = response.json()\n   ```\n\n3. **Filter for CPIC guideline-level evidence**:\n   ```python\n   for gene, pairs in all_interactions.items():\n       for pair in pairs:\n           if pair.get('cpicLevel'):  # Has CPIC guideline\n               print(f\"{gene} - {pair['drug']}: {pair['cpicLevel']}\")\n   ```\n\n4. **Generate patient report** with actionable pharmacogenomic findings.\n\n### Workflow 3: Drug Safety Assessment\n\n1. **Query drug for PGx associations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                          params={\"name\": \"abacavir\"})\n   drug_id = response.json()[0]['id']\n   ```\n\n2. **Get clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"drug\": drug_id})\n   annotations = response.json()\n   ```\n\n3. **Check for HLA associations** and toxicity risk:\n   ```python\n   for annotation in annotations:\n       if 'HLA' in annotation.get('genes', []):\n           print(f\"Toxicity risk: {annotation['phenotype']}\")\n           print(f\"Evidence level: {annotation['evidenceLevel']}\")\n   ```\n\n4. **Retrieve screening recommendations** from guidelines and labels.\n\n### Workflow 4: Research Analysis - Population Pharmacogenomics\n\n1. **Get allele frequencies** for population comparison:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                          params={\"gene\": \"CYP2D6\"})\n   alleles = response.json()\n   ```\n\n2. **Extract population-specific frequencies**:\n   ```python\n   populations = ['European', 'African', 'East Asian', 'Latino']\n   frequency_data = {}\n   for allele in alleles:\n       allele_name = allele['name']\n       frequency_data[allele_name] = {\n           pop: allele.get(f'{pop}_frequency', 'N\u002FA')\n           for pop in populations\n       }\n   ```\n\n3. **Calculate phenotype distributions** by population:\n   ```python\n   # Combine allele frequencies with function to predict phenotypes\n   phenotype_dist = calculate_phenotype_frequencies(frequency_data)\n   ```\n\n4. **Analyze implications** for drug dosing in diverse populations.\n\n### Workflow 5: Literature Evidence Review\n\n1. **Search for gene-drug pair**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   pair = response.json()\n   ```\n\n2. **Retrieve all clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   annotations = response.json()\n   ```\n\n3. **Filter by evidence level and publication date**:\n   ```python\n   high_quality = [a for a in annotations\n                   if a['evidenceLevel'] in ['1A', '1B', '2A']]\n   ```\n\n4. **Extract PMIDs** and retrieve full references:\n   ```python\n   pmids = [a['pmid'] for a in high_quality if 'pmid' in a]\n   # Use PubMed skill to retrieve full citations\n   ```\n\n## Rate Limiting and Best Practices\n\n### Rate Limit Compliance\n\n```python\nimport time\n\ndef rate_limited_request(url, params=None, delay=0.5):\n    \"\"\"Make API request with rate limiting (2 req\u002Fsec max)\"\"\"\n    response = requests.get(url, params=params)\n    time.sleep(delay)  # Wait 0.5 seconds between requests\n    return response\n\n# Use in loops\ngenes = [\"CYP2D6\", \"CYP2C19\", \"CYP2C9\"]\nfor gene in genes:\n    response = rate_limited_request(\n        \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002F\" + gene\n    )\n    data = response.json()\n```\n\n### Error Handling\n\n```python\ndef safe_api_call(url, params=None, max_retries=3):\n    \"\"\"API call with error handling and retries\"\"\"\n    for attempt in range(max_retries):\n        try:\n            response = requests.get(url, params=params, timeout=10)\n\n            if response.status_code == 200:\n                return response.json()\n            elif response.status_code == 429:\n                # Rate limit exceeded\n                wait_time = 2 ** attempt  # Exponential backoff\n                print(f\"Rate limit hit. Waiting {wait_time}s...\")\n                time.sleep(wait_time)\n            else:\n                response.raise_for_status()\n\n        except requests.exceptions.RequestException as e:\n            print(f\"Attempt {attempt + 1} failed: {e}\")\n            if attempt == max_retries - 1:\n                raise\n            time.sleep(1)\n```\n\n### Caching Results\n\n```python\nimport json\nfrom pathlib import Path\n\ndef cached_query(cache_file, api_func, *args, **kwargs):\n    \"\"\"Cache API results to avoid repeated queries\"\"\"\n    cache_path = Path(cache_file)\n\n    if cache_path.exists():\n        with open(cache_path) as f:\n            return json.load(f)\n\n    result = api_func(*args, **kwargs)\n\n    with open(cache_path, 'w') as f:\n        json.dump(result, f, indent=2)\n\n    return result\n\n# Usage\ngene_data = cached_query(\n    'cyp2d6_cache.json',\n    rate_limited_request,\n    \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\"\n)\n```\n\n## PharmDOG Tool\n\nPharmDOG (formerly DDRx) is ClinPGx's clinical decision support tool for interpreting pharmacogenomic test results:\n\n**Key features**:\n- **Phenoconversion calculator**: Adjusts phenotype predictions for drug-drug interactions affecting CYP2D6\n- **Custom genotypes**: Input patient genotypes to get phenotype predictions\n- **QR code sharing**: Generate shareable patient reports\n- **Flexible guidance sources**: Select which guidelines to apply (CPIC, DPWG, FDA)\n- **Multi-drug analysis**: Assess multiple medications simultaneously\n\n**Access**: Available at https:\u002F\u002Fwww.clinpgx.org\u002Fpharmacogenomic-decision-support\n\n**Use cases**:\n- Clinical interpretation of PGx panel results\n- Medication review for patients with known genotypes\n- Patient education materials\n- Point-of-care decision support\n\n## Resources\n\n### scripts\u002Fquery_clinpgx.py\n\nPython script with ready-to-use functions for common ClinPGx queries:\n\n- `get_gene_info(gene_symbol)` - Retrieve gene details\n- `get_drug_info(drug_name)` - Get drug information\n- `get_gene_drug_pairs(gene, drug)` - Query gene-drug interactions\n- `get_cpic_guidelines(gene, drug)` - Retrieve CPIC guidelines\n- `get_alleles(gene)` - Get all alleles for a gene\n- `get_clinical_annotations(gene, drug, evidence_level)` - Query literature annotations\n- `get_drug_labels(drug)` - Retrieve pharmacogenomic drug labels\n- `search_variants(rsid)` - Search by variant rsID\n- `export_to_dataframe(data)` - Convert results to pandas DataFrame\n\nConsult this script for implementation examples with proper rate limiting and error handling.\n\n### references\u002Fapi_reference.md\n\nComprehensive API documentation including:\n\n- Complete endpoint listing with parameters\n- Request\u002Fresponse format specifications\n- Example queries for each endpoint\n- Filter operators and search patterns\n- Data schema definitions\n- Rate limiting details\n- Authentication requirements (if any)\n- Troubleshooting common errors\n\nRefer to this document when detailed API information is needed or when constructing complex queries.\n\n## Important Notes\n\n### Data Sources and Integration\n\nClinPGx consolidates multiple authoritative sources:\n- **PharmGKB**: Curated pharmacogenomics knowledge base (now part of ClinPGx)\n- **CPIC**: Evidence-based clinical implementation guidelines\n- **PharmCAT**: Allele calling and phenotype interpretation tool\n- **DPWG**: Dutch pharmacogenetics guidelines\n- **FDA\u002FEMA labels**: Regulatory pharmacogenomic information\n\nAs of July 2025, all PharmGKB URLs redirect to corresponding ClinPGx pages.\n\n### Clinical Implementation Considerations\n\n- **Evidence levels**: Always check evidence strength before clinical application\n- **Population differences**: Allele frequencies vary significantly across populations\n- **Phenoconversion**: Consider drug-drug interactions that affect enzyme activity\n- **Multi-gene effects**: Some drugs affected by multiple pharmacogenes\n- **Non-genetic factors**: Age, organ function, drug interactions also affect response\n- **Testing limitations**: Not all clinically relevant alleles detected by all assays\n\n### Data Updates\n\n- ClinPGx continuously updates with new evidence and guidelines\n- Check publication dates for clinical annotations\n- Monitor ClinPGx Blog (https:\u002F\u002Fblog.clinpgx.org\u002F) for announcements\n- CPIC guidelines updated as new evidence emerges\n- PharmVar provides nomenclature updates for allele definitions\n\n### API Stability\n\n- API endpoints are relatively stable but may change during development\n- Parameters and response formats subject to modification\n- Monitor API changelog and ClinPGx blog for updates\n- Consider version pinning for production applications\n- Test API changes in development before production deployment\n\n## Common Use Cases\n\n### Pre-emptive Pharmacogenomic Testing\n\nQuery all clinically actionable gene-drug pairs to guide panel selection:\n\n```python\n# Get all CPIC guideline pairs\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"cpicLevel\": \"A\"})  # Level A recommendations\nactionable_pairs = response.json()\n```\n\n### Medication Therapy Management\n\nReview patient medications against known genotypes:\n\n```python\npatient_genes = {\"CYP2C19\": \"*1\u002F*2\", \"CYP2D6\": \"*1\u002F*1\", \"SLCO1B1\": \"*1\u002F*5\"}\nmedications = [\"clopidogrel\", \"simvastatin\", \"escitalopram\"]\n\nfor med in medications:\n    for gene in patient_genes:\n        response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                               params={\"gene\": gene, \"drug\": med})\n        # Check for interactions and dosing guidance\n```\n\n### Clinical Trial Eligibility\n\nScreen for pharmacogenomic contraindications:\n\n```python\n# Check for HLA-B*57:01 before abacavir trial\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"HLA-B\", \"drug\": \"abacavir\"})\npair_info = response.json()\n# CPIC: Do not use if HLA-B*57:01 positive\n```\n\n## Additional Resources\n\n- **ClinPGx website**: https:\u002F\u002Fwww.clinpgx.org\u002F\n- **ClinPGx Blog**: https:\u002F\u002Fblog.clinpgx.org\u002F\n- **API documentation**: https:\u002F\u002Fapi.clinpgx.org\u002F\n- **CPIC website**: https:\u002F\u002Fcpicpgx.org\u002F\n- **PharmCAT**: https:\u002F\u002Fpharmcat.clinpgx.org\u002F\n- **ClinGen**: https:\u002F\u002Fclinicalgenome.org\u002F\n- **Contact**: api@clinpgx.org (for substantial API use)\n\n","# ClinPGx Database\n\n## Overview\n\nClinPGx (Clinical Pharmacogenomics Database) is a comprehensive resource for clinical pharmacogenomics information, successor to PharmGKB. It consolidates data from PharmGKB, CPIC, and PharmCAT, providing curated information on how genetic variation affects medication response. Access gene-drug pairs, clinical guidelines, allele functions, and drug labels for precision medicine applications.\n\n## When to Use This Skill\n\nThis skill should be used when:\n\n- **Gene-drug interactions**: Querying how genetic variants affect drug metabolism, efficacy, or toxicity\n- **CPIC guidelines**: Accessing evidence-based clinical practice guidelines for pharmacogenetics\n- **Allele information**: Retrieving allele function, frequency, and phenotype data\n- **Drug labels**: Exploring FDA and other regulatory pharmacogenomic drug labeling\n- **Pharmacogenomic annotations**: Accessing curated literature on gene-drug-disease relationships\n- **Clinical decision support**: Using PharmDOG tool for phenoconversion and custom genotype interpretation\n- **Precision medicine**: Implementing pharmacogenomic testing in clinical practice\n- **Drug metabolism**: Understanding CYP450 and other pharmacogene functions\n- **Personalized dosing**: Finding genotype-guided dosing recommendations\n- **Adverse drug reactions**: Identifying genetic risk factors for drug toxicity\n\n## Installation and Setup\n\n### Python API Access\n\nThe ClinPGx REST API provides programmatic access to all database resources. Basic setup:\n\n```bash\nuv pip install requests\n```\n\n### API Endpoint\n\n```python\nBASE_URL = \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002F\"\n```\n\n**Rate Limits**:\n- 2 requests per second maximum\n- Excessive requests will result in HTTP 429 (Too Many Requests) response\n\n**Authentication**: Not required for basic access\n\n**Data License**: Creative Commons Attribution-ShareAlike 4.0 International License\n\nFor substantial API use, notify the ClinPGx team at api@clinpgx.org\n\n## Core Capabilities\n\n### 1. Gene Queries\n\n**Retrieve gene information** including function, clinical annotations, and pharmacogenomic significance:\n\n```python\nimport requests\n\n# Get gene details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\")\ngene_data = response.json()\n\n# Search for genes by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\",\n                       params={\"q\": \"CYP\"})\ngenes = response.json()\n```\n\n**Key pharmacogenes**:\n- **CYP450 enzymes**: CYP2D6, CYP2C19, CYP2C9, CYP3A4, CYP3A5\n- **Transporters**: SLCO1B1, ABCB1, ABCG2\n- **Other metabolizers**: TPMT, DPYD, NUDT15, UGT1A1\n- **Receptors**: OPRM1, HTR2A, ADRB1\n- **HLA genes**: HLA-B, HLA-A\n\n### 2. Drug and Chemical Queries\n\n**Retrieve drug information** including pharmacogenomic annotations and mechanisms:\n\n```python\n# Get drug details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\u002FPA448515\")  # Warfarin\ndrug_data = response.json()\n\n# Search drugs by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                       params={\"name\": \"warfarin\"})\ndrugs = response.json()\n```\n\n**Drug categories with pharmacogenomic significance**:\n- Anticoagulants (warfarin, clopidogrel)\n- Antidepressants (SSRIs, TCAs)\n- Immunosuppressants (tacrolimus, azathioprine)\n- Oncology drugs (5-fluorouracil, irinotecan, tamoxifen)\n- Cardiovascular drugs (statins, beta-blockers)\n- Pain medications (codeine, tramadol)\n- Antivirals (abacavir)\n\n### 3. Gene-Drug Pair Queries\n\n**Access curated gene-drug relationships** with clinical annotations:\n\n```python\n# Get gene-drug pair information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2D6\", \"drug\": \"codeine\"})\npair_data = response.json()\n\n# Get all pairs for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2C19\"})\nall_pairs = response.json()\n```\n\n**Clinical annotation sources**:\n- CPIC (Clinical Pharmacogenetics Implementation Consortium)\n- DPWG (Dutch Pharmacogenetics Working Group)\n- FDA (Food and Drug Administration) labels\n- Peer-reviewed literature summary annotations\n\n### 4. CPIC Guidelines\n\n**Access evidence-based clinical practice guidelines**:\n\n```python\n# Get CPIC guideline\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\u002FPA166104939\")\nguideline = response.json()\n\n# List all CPIC guidelines\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                       params={\"source\": \"CPIC\"})\nguidelines = response.json()\n```\n\n**CPIC guideline components**:\n- Gene-drug pairs covered\n- Clinical recommendations by phenotype\n- Evidence levels and strength ratings\n- Supporting literature\n- Downloadable PDFs and supplementary materials\n- Implementation considerations\n\n**Example guidelines**:\n- CYP2D6-codeine (avoid in ultra-rapid metabolizers)\n- CYP2C19-clopidogrel (alternative therapy for poor metabolizers)\n- TPMT-azathioprine (dose reduction for intermediate\u002Fpoor metabolizers)\n- DPYD-fluoropyrimidines (dose adjustment based on activity)\n- HLA-B*57:01-abacavir (avoid if positive)\n\n### 5. Allele and Variant Information\n\n**Query allele function and frequency data**:\n\n```python\n# Get allele information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2D6*4\")\nallele_data = response.json()\n\n# Get all alleles for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                       params={\"gene\": \"CYP2D6\"})\nalleles = response.json()\n```\n\n**Allele information includes**:\n- Functional status (normal, decreased, no function, increased, uncertain)\n- Population frequencies across ethnic groups\n- Defining variants (SNPs, indels, CNVs)\n- Phenotype assignment\n- References to PharmVar and other nomenclature systems\n\n**Phenotype categories**:\n- **Ultra-rapid metabolizer** (UM): Increased enzyme activity\n- **Normal metabolizer** (NM): Normal enzyme activity\n- **Intermediate metabolizer** (IM): Reduced enzyme activity\n- **Poor metabolizer** (PM): Little to no enzyme activity\n\n### 6. Variant Annotations\n\n**Access clinical annotations for specific genetic variants**:\n\n```python\n# Get variant information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\u002Frs4244285\")\nvariant_data = response.json()\n\n# Search variants by position (if supported)\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\",\n                       params={\"chromosome\": \"10\", \"position\": \"94781859\"})\nvariants = response.json()\n```\n\n**Variant data includes**:\n- rsID and genomic coordinates\n- Gene and functional consequence\n- Allele associations\n- Clinical significance\n- Population frequencies\n- Literature references\n\n### 7. Clinical Annotations\n\n**Retrieve curated literature annotations** (formerly PharmGKB clinical annotations):\n\n```python\n# Get clinical annotations\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"gene\": \"CYP2D6\"})\nannotations = response.json()\n\n# Filter by evidence level\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"evidenceLevel\": \"1A\"})\nhigh_evidence = response.json()\n```\n\n**Evidence levels** (from highest to lowest):\n- **Level 1A**: High-quality evidence, CPIC\u002FFDA\u002FDPWG guidelines\n- **Level 1B**: High-quality evidence, not yet guideline\n- **Level 2A**: Moderate evidence from well-designed studies\n- **Level 2B**: Moderate evidence with some limitations\n- **Level 3**: Limited or conflicting evidence\n- **Level 4**: Case reports or weak evidence\n\n### 8. Drug Labels\n\n**Access pharmacogenomic information from drug labels**:\n\n```python\n# Get drug labels with PGx information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"drug\": \"warfarin\"})\nlabels = response.json()\n\n# Filter by regulatory source\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"source\": \"FDA\"})\nfda_labels = response.json()\n```\n\n**Label information includes**:\n- Testing recommendations\n- Dosing guidance by genotype\n- Warnings and precautions\n- Biomarker information\n- Regulatory source (FDA, EMA, PMDA, etc.)\n\n### 9. Pathways\n\n**Explore pharmacokinetic and pharmacodynamic pathways**:\n\n```python\n# Get pathway information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\u002FPA146123006\")  # Warfarin pathway\npathway_data = response.json()\n\n# Search pathways by drug\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\",\n                       params={\"drug\": \"warfarin\"})\npathways = response.json()\n```\n\n**Pathway diagrams** show:\n- Drug metabolism steps\n- Enzymes and transporters involved\n- Gene variants affecting each step\n- Downstream effects on efficacy\u002Ftoxicity\n- Interactions with other pathways\n\n## Query Workflow\n\n### Workflow 1: Clinical Decision Support for Drug Prescription\n\n1. **Identify patient genotype** for relevant pharmacogenes:\n   ```python\n   # Example: Patient is CYP2C19 *1\u002F*2 (intermediate metabolizer)\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2C19*2\")\n   allele_function = response.json()\n   ```\n\n2. **Query gene-drug pairs** for medication of interest:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   pair_info = response.json()\n   ```\n\n3. **Retrieve CPIC guideline** for dosing recommendations:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   guideline = response.json()\n   # Recommendation: Alternative antiplatelet therapy for IM\u002FPM\n   ```\n\n4. **Check drug label** for regulatory guidance:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                          params={\"drug\": \"clopidogrel\"})\n   label = response.json()\n   ```\n\n### Workflow 2: Gene Panel Analysis\n\n1. **Get list of pharmacogenes** in clinical panel:\n   ```python\n   pgx_panel = [\"CYP2C19\", \"CYP2D6\", \"CYP2C9\", \"TPMT\", \"DPYD\", \"SLCO1B1\"]\n   ```\n\n2. **For each gene, retrieve all drug interactions**:\n   ```python\n   all_interactions = {}\n   for gene in pgx_panel:\n       response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                              params={\"gene\": gene})\n       all_interactions[gene] = response.json()\n   ```\n\n3. **Filter for CPIC guideline-level evidence**:\n   ```python\n   for gene, pairs in all_interactions.items():\n       for pair in pairs:\n           if pair.get('cpicLevel'):  # Has CPIC guideline\n               print(f\"{gene} - {pair['drug']}: {pair['cpicLevel']}\")\n   ```\n\n4. **Generate patient report** with actionable pharmacogenomic findings.\n\n### Workflow 3: Drug Safety Assessment\n\n1. **Query drug for PGx associations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                          params={\"name\": \"abacavir\"})\n   drug_id = response.json()[0]['id']\n   ```\n\n2. **Get clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"drug\": drug_id})\n   annotations = response.json()\n   ```\n\n3. **Check for HLA associations** and toxicity risk:\n   ```python\n   for annotation in annotations:\n       if 'HLA' in annotation.get('genes', []):\n           print(f\"Toxicity risk: {annotation['phenotype']}\")\n           print(f\"Evidence level: {annotation['evidenceLevel']}\")\n   ```\n\n4. **Retrieve screening recommendations** from guidelines and labels.\n\n### Workflow 4: Research Analysis - Population Pharmacogenomics\n\n1. **Get allele frequencies** for population comparison:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                          params={\"gene\": \"CYP2D6\"})\n   alleles = response.json()\n   ```\n\n2. **Extract population-specific frequencies**:\n   ```python\n   populations = ['European', 'African', 'East Asian', 'Latino']\n   frequency_data = {}\n   for allele in alleles:\n       allele_name = allele['name']\n       frequency_data[allele_name] = {\n           pop: allele.get(f'{pop}_frequency', 'N\u002FA')\n           for pop in populations\n       }\n   ```\n\n3. **Calculate phenotype distributions** by population:\n   ```python\n   # Combine allele frequencies with function to predict phenotypes\n   phenotype_dist = calculate_phenotype_frequencies(frequency_data)\n   ```\n\n4. **Analyze implications** for drug dosing in diverse populations.\n\n### Workflow 5: Literature Evidence Review\n\n1. **Search for gene-drug pair**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   pair = response.json()\n   ```\n\n2. **Retrieve all clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   annotations = response.json()\n   ```\n\n3. **Filter by evidence level and publication date**:\n   ```python\n   high_quality = [a for a in annotations\n                   if a['evidenceLevel'] in ['1A', '1B', '2A']]\n   ```\n\n4. **Extract PMIDs** and retrieve full references:\n   ```python\n   pmids = [a['pmid'] for a in high_quality if 'pmid' in a]\n   # Use PubMed skill to retrieve full citations\n   ```\n\n## Rate Limiting and Best Practices\n\n### Rate Limit Compliance\n\n```python\nimport time\n\ndef rate_limited_request(url, params=None, delay=0.5):\n    \"\"\"Make API request with rate limiting (2 req\u002Fsec max)\"\"\"\n    response = requests.get(url, params=params)\n    time.sleep(delay)  # Wait 0.5 seconds between requests\n    return response\n\n# Use in loops\ngenes = [\"CYP2D6\", \"CYP2C19\", \"CYP2C9\"]\nfor gene in genes:\n    response = rate_limited_request(\n        \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002F\" + gene\n    )\n    data = response.json()\n```\n\n### Error Handling\n\n```python\ndef safe_api_call(url, params=None, max_retries=3):\n    \"\"\"API call with error handling and retries\"\"\"\n    for attempt in range(max_retries):\n        try:\n            response = requests.get(url, params=params, timeout=10)\n\n            if response.status_code == 200:\n                return response.json()\n            elif response.status_code == 429:\n                # Rate limit exceeded\n                wait_time = 2 ** attempt  # Exponential backoff\n                print(f\"Rate limit hit. Waiting {wait_time}s...\")\n                time.sleep(wait_time)\n            else:\n                response.raise_for_status()\n\n        except requests.exceptions.RequestException as e:\n            print(f\"Attempt {attempt + 1} failed: {e}\")\n            if attempt == max_retries - 1:\n                raise\n            time.sleep(1)\n```\n\n### Caching Results\n\n```python\nimport json\nfrom pathlib import Path\n\ndef cached_query(cache_file, api_func, *args, **kwargs):\n    \"\"\"Cache API results to avoid repeated queries\"\"\"\n    cache_path = Path(cache_file)\n\n    if cache_path.exists():\n        with open(cache_path) as f:\n            return json.load(f)\n\n    result = api_func(*args, **kwargs)\n\n    with open(cache_path, 'w') as f:\n        json.dump(result, f, indent=2)\n\n    return result\n\n# Usage\ngene_data = cached_query(\n    'cyp2d6_cache.json',\n    rate_limited_request,\n    \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\"\n)\n```\n\n## PharmDOG Tool\n\nPharmDOG (formerly DDRx) is ClinPGx's clinical decision support tool for interpreting pharmacogenomic test results:\n\n**Key features**:\n- **Phenoconversion calculator**: Adjusts phenotype predictions for drug-drug interactions affecting CYP2D6\n- **Custom genotypes**: Input patient genotypes to get phenotype predictions\n- **QR code sharing**: Generate shareable patient reports\n- **Flexible guidance sources**: Select which guidelines to apply (CPIC, DPWG, FDA)\n- **Multi-drug analysis**: Assess multiple medications simultaneously\n\n**Access**: Available at https:\u002F\u002Fwww.clinpgx.org\u002Fpharmacogenomic-decision-support\n\n**Use cases**:\n- Clinical interpretation of PGx panel results\n- Medication review for patients with known genotypes\n- Patient education materials\n- Point-of-care decision support\n\n## Resources\n\n### scripts\u002Fquery_clinpgx.py\n\nPython script with ready-to-use functions for common ClinPGx queries:\n\n- `get_gene_info(gene_symbol)` - Retrieve gene details\n- `get_drug_info(drug_name)` - Get drug information\n- `get_gene_drug_pairs(gene, drug)` - Query gene-drug interactions\n- `get_cpic_guidelines(gene, drug)` - Retrieve CPIC guidelines\n- `get_alleles(gene)` - Get all alleles for a gene\n- `get_clinical_annotations(gene, drug, evidence_level)` - Query literature annotations\n- `get_drug_labels(drug)` - Retrieve pharmacogenomic drug labels\n- `search_variants(rsid)` - Search by variant rsID\n- `export_to_dataframe(data)` - Convert results to pandas DataFrame\n\nConsult this script for implementation examples with proper rate limiting and error handling.\n\n### references\u002Fapi_reference.md\n\nComprehensive API documentation including:\n\n- Complete endpoint listing with parameters\n- Request\u002Fresponse format specifications\n- Example queries for each endpoint\n- Filter operators and search patterns\n- Data schema definitions\n- Rate limiting details\n- Authentication requirements (if any)\n- Troubleshooting common errors\n\nRefer to this document when detailed API information is needed or when constructing complex queries.\n\n## Important Notes\n\n### Data Sources and Integration\n\nClinPGx consolidates multiple authoritative sources:\n- **PharmGKB**: Curated pharmacogenomics knowledge base (now part of ClinPGx)\n- **CPIC**: Evidence-based clinical implementation guidelines\n- **PharmCAT**: Allele calling and phenotype interpretation tool\n- **DPWG**: Dutch pharmacogenetics guidelines\n- **FDA\u002FEMA labels**: Regulatory pharmacogenomic information\n\nAs of July 2025, all PharmGKB URLs redirect to corresponding ClinPGx pages.\n\n### Clinical Implementation Considerations\n\n- **Evidence levels**: Always check evidence strength before clinical application\n- **Population differences**: Allele frequencies vary significantly across populations\n- **Phenoconversion**: Consider drug-drug interactions that affect enzyme activity\n- **Multi-gene effects**: Some drugs affected by multiple pharmacogenes\n- **Non-genetic factors**: Age, organ function, drug interactions also affect response\n- **Testing limitations**: Not all clinically relevant alleles detected by all assays\n\n### Data Updates\n\n- ClinPGx continuously updates with new evidence and guidelines\n- Check publication dates for clinical annotations\n- Monitor ClinPGx Blog (https:\u002F\u002Fblog.clinpgx.org\u002F) for announcements\n- CPIC guidelines updated as new evidence emerges\n- PharmVar provides nomenclature updates for allele definitions\n\n### API Stability\n\n- API endpoints are relatively stable but may change during development\n- Parameters and response formats subject to modification\n- Monitor API changelog and ClinPGx blog for updates\n- Consider version pinning for production applications\n- Test API changes in development before production deployment\n\n## Common Use Cases\n\n### Pre-emptive Pharmacogenomic Testing\n\nQuery all clinically actionable gene-drug pairs to guide panel selection:\n\n```python\n# Get all CPIC guideline pairs\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"cpicLevel\": \"A\"})  # Level A recommendations\nactionable_pairs = response.json()\n```\n\n### Medication Therapy Management\n\nReview patient medications against known genotypes:\n\n```python\npatient_genes = {\"CYP2C19\": \"*1\u002F*2\", \"CYP2D6\": \"*1\u002F*1\", \"SLCO1B1\": \"*1\u002F*5\"}\nmedications = [\"clopidogrel\", \"simvastatin\", \"escitalopram\"]\n\nfor med in medications:\n    for gene in patient_genes:\n        response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                               params={\"gene\": gene, \"drug\": med})\n        # Check for interactions and dosing guidance\n```\n\n### Clinical Trial Eligibility\n\nScreen for pharmacogenomic contraindications:\n\n```python\n# Check for HLA-B*57:01 before abacavir trial\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"HLA-B\", \"drug\": \"abacavir\"})\npair_info = response.json()\n# CPIC: Do not use if HLA-B*57:01 positive\n```\n\n## Additional Resources\n\n- **ClinPGx website**: https:\u002F\u002Fwww.clinpgx.org\u002F\n- **ClinPGx Blog**: https:\u002F\u002Fblog.clinpgx.org\u002F\n- **API documentation**: https:\u002F\u002Fapi.clinpgx.org\u002F\n- **CPIC website**: https:\u002F\u002Fcpicpgx.org\u002F\n- **PharmCAT**: https:\u002F\u002Fpharmcat.clinpgx.org\u002F\n- **ClinGen**: https:\u002F\u002Fclinicalgenome.org\u002F\n- **Contact**: api@clinpgx.org (for substantial API use)\n\n",{"name":5,"license":14,"metadata":23,"description":7},{"version":24,"skill-author":25},"1.0.0","AlterLab","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Falterlab-clinpgx",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add roohe\u002Fagentic-super-skills --skill alterlab-clinpgx",{"tool":40,"command":41},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill alterlab-clinpgx",{"tool":43,"command":44},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill alterlab-clinpgx","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-clinpgx\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fapi_reference.md","REFERENCE","参考文档",17360,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-clinpgx\u002Freferences\u002Fapi_reference.md",[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]