[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72B63YGDJC3YSGWWBFM0RYZ":3,"skill-same:01M72B63YGDJC3YSGWWBFM0RYZ":59},{"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":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M72B63YGDJC3YSGWWBFM0RYZ","clinpgx-database",null,"Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.","Sansar35\u002Fclaude-agent","Sansar35","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F145020281?v=4","01M724CQ2SCC86MGNSD87D0D4K","01M724CQ3965G9WJ3QXE3AJ5YY",1,"MIT","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fclinpgx-database\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: clinpgx-database\ndescription: \"Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.\"\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","# 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",{"name":5,"description":7},"main","d046d088ce5a79a083f0abc0fe1b7ded73bc5b1f","claude-config\u002Fskills\u002Fclinpgx-database","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent","https:\u002F\u002Fgithub.com\u002FSansar35","2026-05-10 16:04:53",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Sansar35\u002Fclaude-agent --skill clinpgx-database",{"tool":35,"command":36},"bunx","bunx skills add Sansar35\u002Fclaude-agent --skill clinpgx-database",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Sansar35\u002Fclaude-agent --skill clinpgx-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fclinpgx-database\u002FSKILL.md",true,[43,49,53],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},".skill-source.json","REFERENCE","参考文档",420,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fclinpgx-database\u002F.skill-source.json",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fapi_reference.md",17360,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fclinpgx-database\u002Freferences\u002Fapi_reference.md",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"scripts\u002Fquery_clinpgx.py","SCRIPT","脚本",14295,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fclinpgx-database\u002Fscripts\u002Fquery_clinpgx.py",[60,67,74,81,88,96],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M72DVAN1JYEA302MT0C5MGD6","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M72DV8J5NBRRM4RPDFRV95N7","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzod-validation-expert\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M72DV5EMHW0BHP9BZ167MDCB","zinc-database","Access ZINC (230M+ purchasable compounds). Search by ZINC ID\u002FSMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzinc-database\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M72DV216QY0E693ZPEVQ0DBS","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\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M72DTXQREMCRKA8NHCVKHN4W","zapier-workflows","Manage and trigger pre-built Zapier workflows and MCP tool orchestration. Use when user mentions workflows, Zaps, automations, daily digest, research, search, lead tracking, expenses, or asks to \"run\" any process. Also handles Perplexity-based research and Google Sheets data tracking.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M72DTT17TBSJ0Y8J2XZ4C9TZ","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-make-patterns\u002FSKILL.md",[],[]]