[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EC1MGS5JFKH1K4D02WAAQB":3,"skill-same:01M7EC1MGS5JFKH1K4D02WAAQB":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EC1MGS5JFKH1K4D02WAAQB","bio-clinical-databases-pharmacogenomics",null,"Queries PharmGKB \u002F CPIC \u002F DPWG for drug-gene interactions; calls CYP2D6\u002FCYP2C9\u002FCYP2C19\u002FDPYD\u002FTPMT\u002FNUDT15\u002FUGT1A1\u002FSLCO1B1 star alleles and phenotype with PharmCAT, Cyrius (CYP2D6 structural variants), Aldy, Stargazer; applies Caudle 2020 activity-score translation. Use when implementing pharmacogenomic-guided prescribing, applying CPIC vs DPWG guidance, screening HLA risk alleles for ICI \u002F antiepileptics \u002F abacavir, or interpreting compound TPMT+NUDT15 thiopurine risk.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-clinical-databases-pharmacogenomics\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-clinical-databases-pharmacogenomics\ndescription: Queries PharmGKB \u002F CPIC \u002F DPWG for drug-gene interactions; calls CYP2D6\u002FCYP2C9\u002FCYP2C19\u002FDPYD\u002FTPMT\u002FNUDT15\u002FUGT1A1\u002FSLCO1B1 star alleles and phenotype with PharmCAT, Cyrius (CYP2D6 structural variants), Aldy, Stargazer; applies Caudle 2020 activity-score translation. Use when implementing pharmacogenomic-guided prescribing, applying CPIC vs DPWG guidance, screening HLA risk alleles for ICI \u002F antiepileptics \u002F abacavir, or interpreting compound TPMT+NUDT15 thiopurine risk.\ntool_type: mixed\nprimary_tool: PharmCAT\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"clinical-databases\u002Fpharmacogenomics\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: PharmCAT 2.13+, Cyrius 1.1+ (Chen 2021), Aldy 4.0+, Stargazer 2.0+, StarPhase 1.0+ (PacBio HiFi), HIBAG 1.40+, requests 2.31+, pandas 2.2+. CPIC guideline versions are gene-specific; PharmVar releases are quarterly. DPYD dosing uses the CPIC gene activity-score system (Amstutz 2018 *Clin Pharmacol Ther* 103:210, the 2017-update guideline); the 2025 TPMT\u002FNUDT15 update (Maillard 2026) refines compound-IM dosing.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. PharmVar is the authoritative star-allele source (`https:\u002F\u002Fwww.pharmvar.org`); the older Human CYP Allele Nomenclature Database was deprecated in 2017.\n\n# Pharmacogenomics; Star Alleles, Activity Scores, and CPIC\u002FDPWG Guidance\n\n**'What is my patient's CYP2D6 metabolizer status and should I adjust their tamoxifen dose?'** -> Call star alleles (haplotype-level), translate diplotype -> activity score -> phenotype, apply CPIC + DPWG dosing.\n\n- CLI (recommended): `pharmcat -vcf input.vcf.gz -o pharmcat_out`; CPIC-recommended, single-tool reporting\n- CLI (CYP2D6 SV-aware): `cyrius -m sample.bam -o cyrius_out`; mandatory addition for CYP2D6\n- CLI (multi-gene CN-aware): `aldy genotype -p illumina sample.bam`; alternative\n- CLI (long-read 8-field): PacBio HiFi `starphase`; transplant-grade including HLA\n- R (SNP-array): HIBAG for HLA-B*57:01\u002FB*15:02\u002FB*58:01\u002FA*31:01 imputation\n- API: `requests.get('https:\u002F\u002Fapi.pharmgkb.org\u002Fv1\u002Fdata\u002FclinicalAnnotation', ...)`\n\n## Governance: CPIC vs DPWG vs PharmGKB vs FDA\n\nThese four authorities are routinely conflated. They differ in scope, scale, and recommendations:\n\n| Authority | Scope | Output | Anchors |\n|-----------|-------|--------|---------|\n| **CPIC** (US Clinical Pharmacogenetics Implementation Consortium) | Once a result is available, what to prescribe | Level A\u002FB\u002FC\u002FD gene-drug pair + strength of recommendation per phenotype + evidence quality | ~26 guidelines, ~25 genes, 100+ drugs as of 2026 |\n| **DPWG** (Dutch Pharmacogenetics Working Group) | Whether to test AND what to prescribe | 5-pt (0-4) evidence + 7-pt (AA-F) clinical-relevance scale | G-Standaard (Dutch EHR-integrated); RCT-validated via PREPARE |\n| **PharmGKB clinical annotation levels** | Evidence cataloguing | 1A\u002F1B\u002F2A\u002F2B\u002F3\u002F4 | 1A = guideline OR medical-society OR PGRN\u002FeMERGE implementation; NOT pure evidence |\n| **FDA Table of Pharmacogenomic Biomarkers** | Drug label info | ~300 drugs (informational) | NOT an actionability list; many entries are dosing-suggestion-only |\n| **FDA Table of Pharmacogenetic Associations** | Actionable subset | Closer to CPIC | Compare head-to-head with CPIC |\n\n**Bank et al 2018** *Clin Pharmacol Ther* 103:599 (DOI 10.1002\u002Fcpt.762) is the canonical CPIC-vs-DPWG comparison. Notable disagreements:\n- CYP2D6 IM + multiple antidepressants: DPWG actionable; CPIC says insufficient evidence.\n- HLA-B*15:11 carbamazepine: DPWG actionable; CPIC silent.\n- CYP2C19 IM + voriconazole: dosing magnitudes differ 25-50%.\n\n**Common PGx-evidence critiques:** (1) EUR over-representation in discovery cohorts; (2) most PGx RCTs are open-label \u002F prescriber-unblinded; (3) publication bias in antiseizure PGx may overstate effects ~2x; (4) subjective composite endpoints.\n\n## PharmGKB Clinical Annotation Levels: What 1A Actually Means\n\n| Level | Requirement |\n|-------|-------------|\n| **1A** | Variant-drug pair appears in CPIC guideline OR medical-society guideline OR is implemented at a PGRN\u002FeMERGE site |\n| **1B** | Replication in multiple cohorts; preponderance of evidence; no formal guideline yet |\n| **2A** | Replicated association in a VIP (Very Important Pharmacogene) |\n| **2B** | Replicated association in non-VIP gene |\n| **3** | Single significant association OR mixed-evidence variant-drug pair |\n| **4** | In vitro \u002F case report \u002F molecular evidence only |\n\n1A does NOT require RCT evidence; mechanism + guideline status suffices.\n\n## Star Allele Nomenclature (PharmVar)\n\nPharmVar (`https:\u002F\u002Fwww.pharmvar.org`) is authoritative for: CYP1A1, CYP1A2, CYP1B1, CYP2A6, CYP2A13, CYP2B6, CYP2C8, CYP2C9, CYP2C19, CYP2D6, CYP2E1, CYP2F1, CYP2J2, CYP2R1, CYP2S1, CYP2W1, CYP3A4, CYP3A5, CYP3A7, CYP3A43, CYP4A11, CYP4F2, CYP19A1, CYP26A1, DPYD, NUDT15, SLCO1B1, TPMT.\n\n**A star allele is a haplotype, not a single variant.** *Suballeles* (*1.001, *1.002, etc.) encode the exact SNV+indel pattern within a defined functional haplotype.\n\n**The *1 reference is the PharmVar consensus reference, NOT biological wild type.** Defined as the absence of all known functional variants at the locus.\n\n### CYP2D6 Activity Scores (Caudle 2020 *Clin Transl Sci*; DOI 10.1111\u002Fcts.12692)\n\n| Phenotype | Activity score (AS) range |\n|-----------|--------------------------|\n| **PM (Poor Metabolizer)** | 0 |\n| **IM (Intermediate Metabolizer)** | 0 \u003C AS \u003C 1.25 |\n| **NM (Normal Metabolizer)** | 1.25 \u003C= AS \u003C= 2.25 |\n| **UM (Ultra-rapid)** | AS > 2.25 |\n\nKey per-allele activity values (selected):\n\n| Allele | Activity | Notes |\n|--------|----------|-------|\n| \\*1, \\*2, \\*35 | 1.0 | Normal |\n| \\*3, \\*4, \\*5 (gene deletion), \\*6, \\*7, \\*8, \\*11, \\*12, \\*15, \\*19, \\*20, \\*36, \\*40, \\*42 | 0 | No function |\n| \\*9, \\*41, \\*17, \\*29 | 0.5 | Decreased function (substrate-specific caveats for \\*17) |\n| **\\*10** | **0.25** | **Caudle 2020 RESET from 0.5 to 0.25**; reclassified large fractions of East-Asian populations to IM |\n| \\*68 | 0 | Hybrid; non-functional |\n\n**\\*4xN is clinically silent:** a no-function allele multiplied by N is still no-function. Reporting *4xN as UM is the most-common reportable error in clinical PGx.\n\n### CYP2D6 Structural Complexity\n\nCYP2D6 on 22q13.2 sits adjacent to the highly-similar CYP2D7 pseudogene. Four classes of structural variant that no SNV-only caller can resolve:\n\n1. **Gene deletion (\\*5):** ~13 kb deletion; activity 0; diagnostic *REP6\u002FREP7* breakpoint.\n2. **Gene duplication\u002Fmultiplication (\\*1xN, \\*2xN, \\*4xN, \\*10xN, \\*17xN, \\*35xN, \\*36xN):** Tandem copies; clinical impact depends on which allele is amplified; **\\*4xN is clinically silent**.\n3. **CYP2D7 -> CYP2D6 hybrids (\\*13):** Pseudogene fused 5'; non-functional.\n4. **CYP2D6 -> CYP2D7 hybrids (\\*36, \\*61, \\*63, \\*68, \\*83):** 5' CYP2D6 with 3' pseudogene exon 9 conversion; typically embedded in duplications upstream of *10 (East Asian) or upstream of *4 (European).\n\n**GATK \u002F DeepVariant alone cannot call any of these.** They operate on multi-mapper-filtered BAMs; 97%+ identity between CYP2D6 and CYP2D7 produces silent miscalls of every \\*5, \\*13, \\*36, \\*68, \\*4xN sample.\n\n## Algorithmic Taxonomy: Star Allele Callers\n\n| Tool | CYP2D6 SV | CYP2D6 CN | Other PGx genes | Phased | Validation | Fails when |\n|------|-----------|-----------|-----------------|--------|------------|-----------|\n| **PharmCAT** (Sangkuhl 2020 *Clin Pharmacol Ther*) | No (consumes outside SV calls) | No | 21 CPIC genes; full clinical reporting | Phased or unphased VCF | High; CPIC reference | CYP2D6 SV-rich samples need Cyrius\u002FStellarPGx upstream |\n| **Cyrius** (Chen 2021 *Pharmacogenomics J*) | **Yes (99.3% concordance)** | **Yes** | CYP2D6 only | Phased haplotypes | GeT-RM 99.3% | Other genes (single-purpose tool) |\n| **BCyrius** (PubMed 39901590, 2025) | Yes (extended) | Yes | CYP2D6 only | Phased | Extended SV diversity | Other genes |\n| **Aldy v4** (Numanagic 2018 *Nat Commun*) | Yes | Yes | CYP2D6, CYP2A6, CYP2B6, etc. | Phased | GeT-RM 82-87% (CYP2D6) | Less accurate than Cyrius for CYP2D6 |\n| **Stargazer** (Lee 2019 *Genet Med*) | Limited | Yes | ~50 PGx genes | Statistical phasing | ~84% (CYP2D6) | Fails on rare alleles; statistical phasing is unstable |\n| **StellarPGx** | Yes (~99%) | Yes | CYP2D6 + others | Phased | GeT-RM ~99% | Less widely deployed than Cyrius |\n| **Astrolabe** (proprietary, formerly Constellation) | Yes | Yes | Multi-gene | Proprietary | Industry-validated | License required |\n| **StarPhase** (PacBio HiFi 2024+) | Yes | Yes | All CPIC Level A genes + HLA | Native phasing | Long-read gold standard | Requires PacBio HiFi |\n\n**Canonical clinical workflow 2024-2026:** PharmCAT for the panel + Cyrius (or StellarPGx) for CYP2D6 SVs + dedicated HLA typer (T1K, OptiType, HLA-LA) for HLA.\n\nTwesigomwe 2020 *npj Genom Med*: inter-tool discordance 10-18% on CYP2D6; nearly all in samples carrying SVs.\n\n## HLA-Drug Associations: Mechanistically Distinct from CYP\n\nHLA associations are **idiosyncratic immune reactions**, not dose-response phenomena. Effect sizes (OR 50-1000+) far exceed any CYP polymorphism. Testing rationale is **screen-and-avoid**, not dose-adjust.\n\n| Allele | Drug | Reaction | Population | Landmark |\n|--------|------|----------|------------|----------|\n| **HLA-B\\*57:01** | Abacavir | HSS | All ancestries (5-8% NFE) | Mallal 2008 *NEJM* (PREDICT-1) |\n| **HLA-B\\*15:02** | Carbamazepine, oxcarbazepine, phenytoin, lamotrigine (weaker) | SJS\u002FTEN | Han Chinese, Thai, Malay, Indian (>=5%) | Chung 2004 *Nature*; FDA black-box 2007 |\n| **HLA-A\\*31:01** | Carbamazepine | DRESS, MPE, SJS\u002FTEN | Europeans (2-5%), Japanese | McCormack 2011 *NEJM* |\n| **HLA-B\\*58:01** | Allopurinol | SJS\u002FTEN, DRESS | Han Chinese (10-15%), Thai, Korean | Hung 2005 *PNAS* (OR ~580) |\n| **HLA-B\\*13:01** | Dapsone | DDS | Han Chinese, SE Asian | Zhang 2013 *NEJM* |\n| **HLA-B\\*35:02** (NOT \\*35:01) | Minocycline | DILI | All | Urban 2017 *J Hepatol* |\n| **HLA-B\\*35:01** | TMP-SMX | DILI, DRESS-like | African American | Li 2021 *Hepatology* |\n| **HLA-B\\*14:01** | TMP-SMX | DILI | European American (OR 9.20) | Li 2021 |\n| **HLA-A\\*33:01\u002F03** | Terbinafine | DILI | Multi-ancestry | Nicoletti 2017 |\n| **HLA-DRB1\\*15:01-DQB1\\*06:02 haplotype** | Amoxicillin-clavulanate | DILI | Europeans | Stephens 2013 |\n| **HLA-B\\*15:13** | Phenytoin | SJS | Malaysian | Chang 2017 |\n\n**Critical:** HLA screening requires 4-field resolution. \\*57:01 (abacavir risk) vs \\*57:03 (no risk); \\*35:02 (minocycline DILI) vs \\*35:01 (TMP-SMX DILI). See `clinical-databases\u002Fhla-typing` for typing.\n\n## Non-CYP Pharmacogenes: Variant-Level Detail\n\n### DPYD (5-FU \u002F Capecitabine \u002F Tegafur); Activity Score Framework\n\nThe CPIC DPYD guideline (Amstutz 2018 *Clin Pharmacol Ther* 103:210) uses a **gene activity score** system. Activity values: normal-function = 1.0, decreased = 0.5, no function = 0.\n\n| Variant | rsID | Allele | Activity |\n|---------|------|--------|----------|\n| c.1905+1G>A | rs3918290 | DPYD*2A | 0 (splice disruption) |\n| c.1679T>G | rs55886062 | DPYD*13 (p.I560S) | 0 |\n| c.2846A>T | rs67376798 | (p.D949V) | 0.5 |\n| c.1129-5923C>G \u002F c.1236G>A (HapB3) | rs56038477 \u002F rs75017182 | HapB3 | 0.5 |\n\nGene AS = sum of two lowest activities. Recommended dose: AS 2 = full dose; AS 1.5 = 50% start + TDM; AS 1.0 = 50% start + TDM; AS 0 = avoid.\n\nc.85T>C (DPYD\\*9A) is NOT in the CPIC actionable set despite frequent commercial reporting; evidence does not support clinical decrement.\n\nEU universal pre-treatment testing standard since Henricks 2018 *Lancet Oncol* (genotype-guided dosing lowered severe fluoropyrimidine toxicity in DPYD variant carriers, e.g. DPYD*2A grade >=3 toxicity RR 2.87 -> 1.31) and EMA 2020 endorsement. US lags; ASCO\u002FNCCN moved 2022-2024.\n\n### TPMT + NUDT15 (Thiopurines); 2025 Update\n\nMaillard 2026 *Clin Pharmacol Ther* update emphasizes greater dose reduction for **compound TPMT\u002FNUDT15 IM**.\n\n| Gene | Variant | Activity | Population |\n|------|---------|----------|-----------|\n| TPMT *2 | c.238G>C | 0 | -- |\n| TPMT *3A | c.460G>A + c.719A>G | 0 | EUR-common |\n| TPMT *3B | c.460G>A | 0 | -- |\n| TPMT *3C | c.719A>G | 0 | AFR \u002F EAS dominant |\n| NUDT15 *3 | c.415C>T (rs116855232) | 0 | ~9.8% East Asian; \u003C1% EUR |\n\nNUDT15 *3 is the **dominant thiopurine determinant in East Asians**; TPMT-alone testing misses these patients (Yang 2015 *J Clin Oncol*).\n\n### UGT1A1 (Irinotecan, Atazanavir)\n\n- \\*28 (TA7 promoter repeat vs \\*1 = TA6, \\*37 = TA8); EUR-common\n- \\*6 (c.211G>A, p.G71R); East Asian dominant\n- Severe neutropenia in \\*28\u002F\\*28 at irinotecan >=180 mg\u002Fm^2\n\n### CYP2C19 + Clopidogrel; The Most-Litigated Pair\n\n- **Pare 2010** *NEJM*: no benefit of clopidogrel in \\*2 carriers in CURE\u002FACTIVE-A.\n- **TAILOR-PCI** (Pereira 2020 *JAMA*): 5,302 patients post-PCI; primary endpoint MACE @12mo HR 0.66, **p=0.06 (negative by pre-specified alpha)** but positive in sensitivity analyses.\n- **Pereira NL et al 2021 meta-analysis** (7 RCTs, 15,949 patients): ~30% MACE reduction in CYP2C19 LOF carriers (*JACC Cardiovasc Interv* 14:739).\n- **Consensus 2024 (ACC\u002FAHA\u002FESC):** genotype-guided therapy reasonable; strongest in post-PCI ACS.\n\n### Warfarin (CYP2C9 + VKORC1 + CYP4F2)\n\n- **EU-PACT 2013** *NEJM*: PGx dosing positive (European).\n- **COAG 2013** *NEJM*: PGx dosing negative; worse in African Americans because algorithm omitted CYP2C9 \\*5, \\*6, \\*8, \\*11 alleles common in African ancestry. **Paradigmatic ancestry-algorithm failure** (Daneshjou 2014 *Blood*).\n- IWPC algorithm explains 47-55% of dose variance.\n\n### SLCO1B1 + Simvastatin\n\n- rs4149056 (c.521T>C, p.V174A); OR 4.5 per C allele for myopathy on 80 mg simvastatin (SEARCH 2008 *NEJM*).\n- 2022 CPIC update broadened to all statins with SLCO1B1 substrate behavior.\n\n### Other Actionable\n\n- **CYP2B6 *6** (c.516G>T + c.785A>G): efavirenz dose 600 -> 400 mg in *6\u002F*6 (ENCORE1).\n- **CYP3A5 *3** (rs776746): non-expressers (\\*3, \\*6, \\*7) are the *common* state in non-AFR; expressers need 1.5-2x higher tacrolimus dose.\n- **G6PD** (CPIC 2022 Gammal 2023): X-linked; female heterozygotes have mosaic activity that single-timepoint assay misclassifies.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended path | Why |\n|----------|------------------|-----|\n| Multi-gene PGx panel from VCF | PharmCAT | CPIC-recommended; 21 genes + full clinical reporting |\n| CYP2D6 with structural variants | Cyrius (or StellarPGx) | Only tools with reliable SV calling from short-read |\n| All CPIC Level A + HLA from one sample | PacBio HiFi + StarPhase | Long-read single-pass typing |\n| Pre-emptive panel for cohort | PREPARE-style 12-gene panel | Swen 2023 RCT-validated |\n| HLA-B\\*57:01 abacavir screen | T1K or OptiType (4-field); HIBAG if SNP-array | Need 4-field specificity |\n| African-ancestry warfarin | IWPC algorithm + CYP2C9 *5\u002F*6\u002F*8\u002F*11 explicit | COAG failure paradigm |\n| East Asian thiopurine | NUDT15 + TPMT | NUDT15 *3 is dominant in EAS |\n| Compound IM (TPMT + NUDT15) | Apply 2025 update | More aggressive dose reduction than single-gene IM |\n| Activity score interpretation | Caudle 2020 thresholds for CYP2D6; gene-specific for others | Per CPIC |\n\n## PharmCAT Workflow (Recommended Multi-Gene Pipeline)\n\n**Goal:** Generate CPIC-compliant pharmacogenomic report from a phased or unphased VCF covering 21 PGx genes.\n\n**Approach:** Run PharmCAT on the VCF; supplement CYP2D6 with Cyrius output if SVs suspected; cross-reference HLA from separate typing.\n\n```bash\n# PharmCAT (CPIC-recommended; covers 21 genes including CYP2C19, CYP2C9, CYP2D6,\n# DPYD, TPMT, NUDT15, UGT1A1, SLCO1B1, CYP3A5, CYP4F2, VKORC1, IFNL3\u002FIFNL4, etc.)\n\n# 1. Preprocess VCF (ensures correct ref allele alignment + chr formatting)\npharmcat_vcf_preprocessor.py \\\n    -vcf input.vcf.gz \\\n    -refFna GRCh38.fa \\\n    -o pharmcat_input\u002F\n\n# 2. Run PharmCAT\njava -jar pharmcat.jar \\\n    -vcf pharmcat_input\u002Finput.preprocessed.vcf.bgz \\\n    -o pharmcat_output\u002F\n\n# Output: \u003Csample>.report.html with phenotype, activity score, dosing recommendations\n```\n\nFor CYP2D6 SV-rich samples, run Cyrius separately and pass outside calls to PharmCAT:\n\n```bash\n# Cyrius for CYP2D6 (99.3% concordance vs Aldy 82-87%, Stargazer 84%)\ncyrius -m sample.bam -o cyrius_out --threads 8\n# Output: cyrius_out\u002Fsample.tsv with diplotype + activity score\n\n# Pass outside calls to PharmCAT\njava -jar pharmcat.jar \\\n    -vcf pharmcat_input\u002Finput.preprocessed.vcf.bgz \\\n    -po cyrius_out\u002Fcyrius_for_pharmcat.tsv \\\n    -o pharmcat_output_with_cyrius\u002F\n```\n\n## CYP2D6 Activity Score Calculation\n\n**Goal:** Convert CYP2D6 diplotype to activity score and phenotype with Caudle 2020 conventions.\n\n**Approach:** Look up per-allele activity values; handle copy-number duplications; apply Caudle 2020 phenotype bins.\n\n```python\n# Caudle 2020 activity values; *10 reset from 0.5 to 0.25 in 2020\nCYP2D6_ACTIVITY = {\n    '*1': 1.0, '*2': 1.0, '*35': 1.0,\n    '*3': 0.0, '*4': 0.0, '*5': 0.0, '*6': 0.0, '*7': 0.0, '*8': 0.0,\n    '*11': 0.0, '*12': 0.0, '*15': 0.0, '*19': 0.0, '*20': 0.0,\n    '*36': 0.0, '*40': 0.0, '*42': 0.0, '*68': 0.0,\n    '*9': 0.5, '*41': 0.5, '*17': 0.5, '*29': 0.5,\n    '*10': 0.25,\n    '*13': 0.0,\n}\n\n\ndef cyp2d6_activity(diplotype):\n    '''Convert CYP2D6 diplotype to activity score.\n\n    Accepts e.g. '*1\u002F*4' or '*2xN\u002F*10' or '*4xN\u002F*10'. Copy-number-aware:\n    - *4xN is clinically silent (no-function * N = 0)\n    - *1xN, *2xN multiply functional activity\n    '''\n    left, right = diplotype.split('\u002F')\n    return _allele_activity(left) + _allele_activity(right)\n\n\ndef _allele_activity(allele_str):\n    '''Handle copy-number suffix xN. *4xN remains 0 (the most common mis-classification).'''\n    if 'x' in allele_str:\n        base, n = allele_str.split('x')\n        copies = int(n) if n != 'N' else 2  # 'N' usually >=2; clinical assumes 2 unless quantified\n        return CYP2D6_ACTIVITY.get(base, 1.0) * copies\n    return CYP2D6_ACTIVITY.get(allele_str, 1.0)\n\n\ndef cyp2d6_phenotype(activity_score):\n    '''Caudle 2020 phenotype bins.'''\n    if activity_score == 0:\n        return 'Poor Metabolizer'\n    if activity_score \u003C 1.25:\n        return 'Intermediate Metabolizer'\n    if activity_score \u003C= 2.25:\n        return 'Normal Metabolizer'\n    return 'Ultrarapid Metabolizer'\n\n\n# Example: *4xN\u002F*10; the classic clinical-silence footgun\ndiplotype = '*4xN\u002F*10'\nscore = cyp2d6_activity(diplotype)  # 0 (from *4xN) + 0.25 (from *10) = 0.25\nprint(f'{diplotype}: AS={score}, phenotype={cyp2d6_phenotype(score)}')  # IM, NOT UM\n```\n\n## DPYD Activity Score (CPIC)\n\n```python\nDPYD_2024_ACTIVITY = {\n    'c.1905+1G>A': 0.0,    # *2A; splice donor\n    'c.1679T>G': 0.0,      # *13; p.I560S\n    'c.2846A>T': 0.5,      # p.D949V\n    'HapB3': 0.5,          # c.1129-5923C>G linked with c.1236G>A\n}\n\n\ndef dpyd_activity(variants):\n    '''Compute DPYD gene activity score from observed variants.\n\n    Sum the two lowest activities across the two alleles. CPIC dosing:\n    - AS 2.0: full dose\n    - AS 1.5: 50% start + TDM\n    - AS 1.0: 50% start + TDM\n    - AS 0.0: avoid\n    '''\n    activities = sorted([DPYD_2024_ACTIVITY.get(v, 1.0) for v in variants])\n    return sum(activities[:2])\n\n\ndef dpyd_dosing(activity_score):\n    if activity_score >= 1.99:\n        return 'Full dose'\n    if activity_score >= 1.0:\n        return '50% starting dose + therapeutic drug monitoring'\n    return 'Avoid fluoropyrimidines'\n```\n\n## PharmGKB API for Drug-Gene Pair Lookup\n\n```python\nimport requests\n\nPHARMGKB = 'https:\u002F\u002Fapi.pharmgkb.org\u002Fv1'\n\n\ndef clinical_annotation(gene_symbol):\n    '''Query PharmGKB clinical annotations by gene.'''\n    r = requests.get(f'{PHARMGKB}\u002Fdata\u002FclinicalAnnotation',\n                     params={'view': 'base', 'location.genes.symbol': gene_symbol},\n                     timeout=30)\n    return r.json().get('data', [])\n\n\ndef cpic_guideline(gene_symbol):\n    '''Query CPIC guidelines via PharmGKB.'''\n    r = requests.get(f'{PHARMGKB}\u002Fdata\u002Fguideline',\n                     params={'view': 'base', 'relatedGenes.symbol': gene_symbol, 'source': 'CPIC'},\n                     timeout=30)\n    return r.json().get('data', [])\n```\n\n## Per-Operation Failure Modes\n\n**1. *4xN -> \"Ultrarapid Metabolizer\"**\n- Trigger: Pipeline reports CYP2D6 \\*4xN as UM.\n- Mechanism: \\*4 has activity 0; \\*4 x N = still 0. Only functional alleles (\\*1, \\*2, \\*35) become UM when amplified.\n- Symptom: Patient labeled as needing dose reduction when they should be PM\u002FIM.\n- Fix: Look up per-allele activity BEFORE multiplying by N; \\*4xN = 0; AS depends entirely on the other allele.\n\n**2. Calling CYP2D6 from short-read without SV-aware tool**\n- Trigger: Use GATK + PharmCAT only on CYP2D6.\n- Mechanism: 97%+ CYP2D6\u002FCYP2D7 identity; SVs (deletion, duplications, hybrids) silently miscalled.\n- Symptom: ~10-18% of samples miscalled (Twesigomwe 2020); concentrated in samples with SVs.\n- Fix: Add Cyrius (or StellarPGx) for CYP2D6; pass outside calls to PharmCAT.\n\n**3. Pre-2020 \\*10 activity value**\n- Trigger: Use activity = 0.5 for CYP2D6 \\*10.\n- Mechanism: Caudle 2020 reset \\*10 from 0.5 to 0.25 based on metabolic-ratio evidence.\n- Symptom: East-Asian samples mis-classified as NM (when should be IM).\n- Fix: Use Caudle 2020 activity table; \\*10 = 0.25.\n\n**4. EUR-only DPYD panel**\n- Trigger: Pre-treat fluoropyrimidine using CPIC-core 4-variant panel only.\n- Mechanism: 4-variant panel captures EUR DPD-deficient carriers but misses additional DPYD variants enriched in non-European populations (Offer 2014 identified ~30 such deleterious variants).\n- Symptom: African-ancestry patients suffer severe toxicity despite \"negative\" PGx.\n- Fix: Use extended panel for AFR cohorts; supplement with phenotype testing (uracil\u002Fdihydrouracil plasma ratio).\n\n**5. TPMT testing without NUDT15**\n- Trigger: Pre-treat thiopurines using TPMT-only PGx in East Asian patient.\n- Mechanism: NUDT15 *3 (9.8% EAS, \u003C1% EUR) is the dominant determinant in EAS.\n- Symptom: EAS patients TPMT-wildtype suffer severe myelosuppression.\n- Fix: Always test NUDT15 alongside TPMT; apply Maillard 2026 compound-IM rules.\n\n**6. HLA-B\\*57 -> \"abacavir risk\" (4-field underspecified)**\n- Trigger: Screen reports \"B*57 present\" as contraindication.\n- Mechanism: B*57:01 (HSS risk), B*57:02, B*57:03 (no HSS risk).\n- Symptom: False contraindication; patient denied effective therapy.\n- Fix: Report 4-field; B*57:01 specifically.\n\n**7. CYP3A5 *3 \u002F non-expresser confusion**\n- Trigger: Apply \"CYP3A5 normal metabolizer\" to *3\u002F*3 in tacrolimus dosing.\n- Mechanism: *3\u002F*3 are NON-EXPRESSERS (most common state in non-AFR); expressers (any *1) need 1.5-2x higher dose.\n- Symptom: Tacrolimus over-dosing in expressers; under-dosing in non-expressers.\n- Fix: Apply CPIC 2015 (Birdwell) tacrolimus dosing; flag expresser status.\n\n**8. Activity-based vs allele-based confusion**\n- Trigger: Sum activities across substrate-non-specific assumption for *17.\n- Mechanism: CYP2D6 *17 shows substrate-dependent activity (reduced for some substrates, near-normal for others).\n- Symptom: Substrate-specific dose recommendations applied generically.\n- Fix: Use substrate-specific guidance where available; flag *17 in AFR cohorts.\n\n## Reconciliation: When Tools Disagree\n\n| Pattern | Likely cause | Action |\n|---------|-------------|--------|\n| Cyrius vs Aldy CYP2D6 disagree | SV-rich sample; Aldy less accurate | Trust Cyrius |\n| PharmCAT vs CPIC website disagree on phenotype | PharmCAT version lag or *10 activity value drift | Update PharmCAT to current release |\n| CPIC vs DPWG dosing differ | Independent guideline bodies | Cite both; use jurisdiction-appropriate one |\n| Patient phenotype doesn't match genotype | Drug-drug interaction; clearance physiology; non-pharmacogenetic factor | Consider phenoconversion; clinical reassessment |\n| TPMT-only test vs IM phenotype | Missed NUDT15 in EAS | Re-test with NUDT15 |\n| *4xN reported as UM | Tool bug | Use SV-aware tool and Caudle 2020 activity table |\n| HLA-B*57 reported without 4-field | Insufficient resolution | Re-type at 4-field minimum |\n\n## Quantitative Thresholds and Conventions\n\n| Threshold | Convention | Source |\n|-----------|-----------|--------|\n| Cyrius CYP2D6 accuracy | 99.3% on GeT-RM reference samples | Chen 2021 *Pharmacogenomics J* |\n| Aldy CYP2D6 accuracy | 82-87% on GeT-RM | Twesigomwe 2020 |\n| Stargazer CYP2D6 accuracy | ~84% on GeT-RM | Twesigomwe 2020 |\n| Inter-tool CYP2D6 discordance | 10-18% (concentrated in SV samples) | Twesigomwe 2020 |\n| PREPARE ADR reduction | OR 0.70 (95% CI 0.54-0.91) for actionable interactions | Swen 2023 *Lancet* |\n| PREPARE actionable variant rate | 93.5% of patients had >=1 actionable variant | Swen 2023 |\n| TAILOR-PCI primary endpoint | HR 0.66 (95% CI 0.43-1.02), p=0.06 (negative) | Pereira 2020 *JAMA* |\n| Pereira 2021 meta-analysis | ~30% MACE reduction in CYP2C19 LOF carriers | Pereira 2021 *JACC Cardiovasc Interv* 14:739 |\n| Henricks 2018 DPYD outcome | Per-variant toxicity reduction (DPYD*2A grade >=3 RR 2.87 -> 1.31) | Henricks 2018 *Lancet Oncol* |\n| NUDT15 *3 frequency | ~9.8% East Asian vs \u003C1% EUR | Relling 2019 CPIC *Clin Pharmacol Ther* 105:1095 |\n| HLA-B*57:01 OR for abacavir HSS | ~100 (case-control) | Mallal 2002 *Lancet* 359:727 |\n\n## Common Errors\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| CYP2D6 reported as UM in samples with *4xN | Tool not SV-aware OR Caudle 2020 not applied | Use Cyrius; check *4xN handling |\n| East-Asian patient labeled CYP2D6 NM | *10 still at activity 0.5 | Update activity table to Caudle 2020 (*10 = 0.25) |\n| African patient suffers warfarin bleeding despite \"wildtype\" CYP2C9 | Panel omits *5\u002F*6\u002F*8\u002F*11 (AFR-common) | Use ancestry-aware panel; supplement with INR-guided dosing |\n| Severe thiopurine toxicity in TPMT-wildtype EAS patient | NUDT15 not tested | Always pair TPMT + NUDT15 |\n| Patient with CYP2C19 *2\u002F*2 and clopidogrel failure | Expected; no genotype-guided alternative chosen | Switch to prasugrel\u002Fticagrelor per CPIC |\n| DPYD AS = 0 but no dose adjustment | Single-variant rule used instead of activity score | Update to the CPIC activity-score framework |\n| HLA-B*57:01 false positive | 2-field B*57 result misinterpreted | Re-type at 4-field |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"TAILOR-PCI missed primary endpoint; why genotype clopidogrel?\" | Sensitivity analyses positive; Pereira 2021 meta-analysis (7 RCTs) +30% MACE reduction; ESC 2023 endorses; ACC 2022 weaker. |\n| \"DPYD universal screening is expensive\" | Henricks 2018 per-variant toxicity reduction + Knikman 2021 cost-effective; EU standard since 2020; US ASCO\u002FNCCN updated 2022-2024. |\n| \"CYP2D6 SV calling is unreliable\" | Cyrius 99.3% on GeT-RM (Chen 2021); not unreliable; the prior tools were. |\n| \"*10 = 0.25 disagrees with old paper\" | Caudle 2020 *Clin Transl Sci* consensus reset based on substrate-metabolic-ratio evidence. |\n| \"GeneSight is approved by my hospital\" | GUIDED trial (Greden 2019) missed primary endpoint; physician-unblinded; literature shows modest effects inseparable from expectancy bias. |\n| \"Why pair TPMT + NUDT15?\" | NUDT15 *3 is the dominant thiopurine determinant in East Asians (9.8% vs TPMT *3C ~2%); compound IM (TPMT + NUDT15) requires more aggressive dose reduction per Maillard 2026. |\n| \"HLA imputation from SNP array reliable?\" | EUR-trained panel on EUR samples ~95%; cross-ancestry drops to 70-80%; for HSCT use sequencing-based typing. |\n\n## References\n\n- Sangkuhl K et al. 2020. Pharmacogenomics Clinical Annotation Tool (PharmCAT). *Clin Pharmacol Ther* 107:203.\n- Chen X et al. 2021. Cyrius: accurate CYP2D6 genotyping using whole-genome sequencing data. *Pharmacogenomics J* 21:251.\n- Numanagic I et al. 2018. Allelic decomposition and exact genotyping of highly polymorphic and structurally variant genes. *Nat Commun* 9:828. (Aldy)\n- Lee SB et al. 2019. Stargazer: a tool for calling star alleles. *Genet Med* 21:361.\n- Twesigomwe D et al. 2020. A systematic comparison of pharmacogene star allele calling bioinformatics algorithms. *npj Genom Med* 5:30.\n- Caudle KE et al. 2020. Standardizing CYP2D6 genotype to phenotype translation. *Clin Transl Sci* 13:116. (Activity-score reset for *10)\n- Bank PCD et al. 2018. Comparison of the guidelines of the CPIC and the Dutch Pharmacogenetics Working Group. *Clin Pharmacol Ther* 103:599.\n- Amstutz U et al. 2018. CPIC guideline for dihydropyrimidine dehydrogenase genotype and fluoropyrimidine dosing: 2017 update. *Clin Pharmacol Ther* 103:210. (DPYD activity score)\n- Swen JJ et al. 2023. PREPARE: A pre-emptive pharmacogenetic testing strategy. *Lancet* 401:347.\n- Henricks LM et al. 2018. DPYD-guided dose individualization to fluoropyrimidines. *Lancet Oncol* 19:1459.\n- Pereira NL et al. 2020. Effect of genotype-guided oral P2Y12 inhibitor selection vs conventional clopidogrel therapy on ischemic outcomes after PCI. *JAMA* 324:761. (TAILOR-PCI)\n- Pereira NL et al. 2021. Effect of CYP2C19 genotype on ischemic outcomes during oral P2Y12 inhibitor therapy: a meta-analysis. *JACC Cardiovasc Interv* 14:739.\n- Mallal S et al. 2008. HLA-B*5701 screening for hypersensitivity to abacavir. *NEJM* 358:568. (PREDICT-1)\n- Chung WH et al. 2004. Medical genetics: a marker for Stevens-Johnson syndrome. *Nature* 428:486.\n- McCormack M et al. 2011. HLA-A*3101 and carbamazepine-induced hypersensitivity reactions in Europeans. *NEJM* 364:1134.\n- Hung SI et al. 2005. HLA-B*5801 allele as a genetic marker for severe cutaneous adverse reactions caused by allopurinol. *PNAS* 102:4134.\n- Yang JJ et al. 2015. Inherited NUDT15 variant is a genetic determinant of mercaptopurine intolerance. *J Clin Oncol* 33:1235.\n- Relling MV et al. 2019. CPIC guideline for thiopurine dosing based on TPMT and NUDT15 genotypes: 2018 update. *Clin Pharmacol Ther* 105:1095.\n- PharmCAT documentation: `https:\u002F\u002Fpharmcat.org`\n- PharmVar: `https:\u002F\u002Fwww.pharmvar.org`\n- CPIC: `https:\u002F\u002Fcpicpgx.org`\n- DPWG: `https:\u002F\u002Fwww.knmp.nl\u002Fdpwg`\n\n## Related Skills\n\n- clinical-databases\u002Fhla-typing - HLA-B*57:01, B*15:02, B*58:01, A*31:01 typing\n- clinical-databases\u002Fclinvar-lookup - Variant pathogenicity for non-PGx context\n- clinical-databases\u002Fvariant-prioritization - Rare-disease pipeline\n- clinical-databases\u002Fmyvariant-queries - Aggregated PGx variant annotation\n- chemoinformatics\u002Fadmet-prediction - Drug metabolism prediction\n","## Version Compatibility\n\nReference examples tested with: PharmCAT 2.13+, Cyrius 1.1+ (Chen 2021), Aldy 4.0+, Stargazer 2.0+, StarPhase 1.0+ (PacBio HiFi), HIBAG 1.40+, requests 2.31+, pandas 2.2+. CPIC guideline versions are gene-specific; PharmVar releases are quarterly. DPYD dosing uses the CPIC gene activity-score system (Amstutz 2018 *Clin Pharmacol Ther* 103:210, the 2017-update guideline); the 2025 TPMT\u002FNUDT15 update (Maillard 2026) refines compound-IM dosing.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. PharmVar is the authoritative star-allele source (`https:\u002F\u002Fwww.pharmvar.org`); the older Human CYP Allele Nomenclature Database was deprecated in 2017.\n\n# Pharmacogenomics; Star Alleles, Activity Scores, and CPIC\u002FDPWG Guidance\n\n**'What is my patient's CYP2D6 metabolizer status and should I adjust their tamoxifen dose?'** -> Call star alleles (haplotype-level), translate diplotype -> activity score -> phenotype, apply CPIC + DPWG dosing.\n\n- CLI (recommended): `pharmcat -vcf input.vcf.gz -o pharmcat_out`; CPIC-recommended, single-tool reporting\n- CLI (CYP2D6 SV-aware): `cyrius -m sample.bam -o cyrius_out`; mandatory addition for CYP2D6\n- CLI (multi-gene CN-aware): `aldy genotype -p illumina sample.bam`; alternative\n- CLI (long-read 8-field): PacBio HiFi `starphase`; transplant-grade including HLA\n- R (SNP-array): HIBAG for HLA-B*57:01\u002FB*15:02\u002FB*58:01\u002FA*31:01 imputation\n- API: `requests.get('https:\u002F\u002Fapi.pharmgkb.org\u002Fv1\u002Fdata\u002FclinicalAnnotation', ...)`\n\n## Governance: CPIC vs DPWG vs PharmGKB vs FDA\n\nThese four authorities are routinely conflated. They differ in scope, scale, and recommendations:\n\n| Authority | Scope | Output | Anchors |\n|-----------|-------|--------|---------|\n| **CPIC** (US Clinical Pharmacogenetics Implementation Consortium) | Once a result is available, what to prescribe | Level A\u002FB\u002FC\u002FD gene-drug pair + strength of recommendation per phenotype + evidence quality | ~26 guidelines, ~25 genes, 100+ drugs as of 2026 |\n| **DPWG** (Dutch Pharmacogenetics Working Group) | Whether to test AND what to prescribe | 5-pt (0-4) evidence + 7-pt (AA-F) clinical-relevance scale | G-Standaard (Dutch EHR-integrated); RCT-validated via PREPARE |\n| **PharmGKB clinical annotation levels** | Evidence cataloguing | 1A\u002F1B\u002F2A\u002F2B\u002F3\u002F4 | 1A = guideline OR medical-society OR PGRN\u002FeMERGE implementation; NOT pure evidence |\n| **FDA Table of Pharmacogenomic Biomarkers** | Drug label info | ~300 drugs (informational) | NOT an actionability list; many entries are dosing-suggestion-only |\n| **FDA Table of Pharmacogenetic Associations** | Actionable subset | Closer to CPIC | Compare head-to-head with CPIC |\n\n**Bank et al 2018** *Clin Pharmacol Ther* 103:599 (DOI 10.1002\u002Fcpt.762) is the canonical CPIC-vs-DPWG comparison. Notable disagreements:\n- CYP2D6 IM + multiple antidepressants: DPWG actionable; CPIC says insufficient evidence.\n- HLA-B*15:11 carbamazepine: DPWG actionable; CPIC silent.\n- CYP2C19 IM + voriconazole: dosing magnitudes differ 25-50%.\n\n**Common PGx-evidence critiques:** (1) EUR over-representation in discovery cohorts; (2) most PGx RCTs are open-label \u002F prescriber-unblinded; (3) publication bias in antiseizure PGx may overstate effects ~2x; (4) subjective composite endpoints.\n\n## PharmGKB Clinical Annotation Levels: What 1A Actually Means\n\n| Level | Requirement |\n|-------|-------------|\n| **1A** | Variant-drug pair appears in CPIC guideline OR medical-society guideline OR is implemented at a PGRN\u002FeMERGE site |\n| **1B** | Replication in multiple cohorts; preponderance of evidence; no formal guideline yet |\n| **2A** | Replicated association in a VIP (Very Important Pharmacogene) |\n| **2B** | Replicated association in non-VIP gene |\n| **3** | Single significant association OR mixed-evidence variant-drug pair |\n| **4** | In vitro \u002F case report \u002F molecular evidence only |\n\n1A does NOT require RCT evidence; mechanism + guideline status suffices.\n\n## Star Allele Nomenclature (PharmVar)\n\nPharmVar (`https:\u002F\u002Fwww.pharmvar.org`) is authoritative for: CYP1A1, CYP1A2, CYP1B1, CYP2A6, CYP2A13, CYP2B6, CYP2C8, CYP2C9, CYP2C19, CYP2D6, CYP2E1, CYP2F1, CYP2J2, CYP2R1, CYP2S1, CYP2W1, CYP3A4, CYP3A5, CYP3A7, CYP3A43, CYP4A11, CYP4F2, CYP19A1, CYP26A1, DPYD, NUDT15, SLCO1B1, TPMT.\n\n**A star allele is a haplotype, not a single variant.** *Suballeles* (*1.001, *1.002, etc.) encode the exact SNV+indel pattern within a defined functional haplotype.\n\n**The *1 reference is the PharmVar consensus reference, NOT biological wild type.** Defined as the absence of all known functional variants at the locus.\n\n### CYP2D6 Activity Scores (Caudle 2020 *Clin Transl Sci*; DOI 10.1111\u002Fcts.12692)\n\n| Phenotype | Activity score (AS) range |\n|-----------|--------------------------|\n| **PM (Poor Metabolizer)** | 0 |\n| **IM (Intermediate Metabolizer)** | 0 \u003C AS \u003C 1.25 |\n| **NM (Normal Metabolizer)** | 1.25 \u003C= AS \u003C= 2.25 |\n| **UM (Ultra-rapid)** | AS > 2.25 |\n\nKey per-allele activity values (selected):\n\n| Allele | Activity | Notes |\n|--------|----------|-------|\n| \\*1, \\*2, \\*35 | 1.0 | Normal |\n| \\*3, \\*4, \\*5 (gene deletion), \\*6, \\*7, \\*8, \\*11, \\*12, \\*15, \\*19, \\*20, \\*36, \\*40, \\*42 | 0 | No function |\n| \\*9, \\*41, \\*17, \\*29 | 0.5 | Decreased function (substrate-specific caveats for \\*17) |\n| **\\*10** | **0.25** | **Caudle 2020 RESET from 0.5 to 0.25**; reclassified large fractions of East-Asian populations to IM |\n| \\*68 | 0 | Hybrid; non-functional |\n\n**\\*4xN is clinically silent:** a no-function allele multiplied by N is still no-function. Reporting *4xN as UM is the most-common reportable error in clinical PGx.\n\n### CYP2D6 Structural Complexity\n\nCYP2D6 on 22q13.2 sits adjacent to the highly-similar CYP2D7 pseudogene. Four classes of structural variant that no SNV-only caller can resolve:\n\n1. **Gene deletion (\\*5):** ~13 kb deletion; activity 0; diagnostic *REP6\u002FREP7* breakpoint.\n2. **Gene duplication\u002Fmultiplication (\\*1xN, \\*2xN, \\*4xN, \\*10xN, \\*17xN, \\*35xN, \\*36xN):** Tandem copies; clinical impact depends on which allele is amplified; **\\*4xN is clinically silent**.\n3. **CYP2D7 -> CYP2D6 hybrids (\\*13):** Pseudogene fused 5'; non-functional.\n4. **CYP2D6 -> CYP2D7 hybrids (\\*36, \\*61, \\*63, \\*68, \\*83):** 5' CYP2D6 with 3' pseudogene exon 9 conversion; typically embedded in duplications upstream of *10 (East Asian) or upstream of *4 (European).\n\n**GATK \u002F DeepVariant alone cannot call any of these.** They operate on multi-mapper-filtered BAMs; 97%+ identity between CYP2D6 and CYP2D7 produces silent miscalls of every \\*5, \\*13, \\*36, \\*68, \\*4xN sample.\n\n## Algorithmic Taxonomy: Star Allele Callers\n\n| Tool | CYP2D6 SV | CYP2D6 CN | Other PGx genes | Phased | Validation | Fails when |\n|------|-----------|-----------|-----------------|--------|------------|-----------|\n| **PharmCAT** (Sangkuhl 2020 *Clin Pharmacol Ther*) | No (consumes outside SV calls) | No | 21 CPIC genes; full clinical reporting | Phased or unphased VCF | High; CPIC reference | CYP2D6 SV-rich samples need Cyrius\u002FStellarPGx upstream |\n| **Cyrius** (Chen 2021 *Pharmacogenomics J*) | **Yes (99.3% concordance)** | **Yes** | CYP2D6 only | Phased haplotypes | GeT-RM 99.3% | Other genes (single-purpose tool) |\n| **BCyrius** (PubMed 39901590, 2025) | Yes (extended) | Yes | CYP2D6 only | Phased | Extended SV diversity | Other genes |\n| **Aldy v4** (Numanagic 2018 *Nat Commun*) | Yes | Yes | CYP2D6, CYP2A6, CYP2B6, etc. | Phased | GeT-RM 82-87% (CYP2D6) | Less accurate than Cyrius for CYP2D6 |\n| **Stargazer** (Lee 2019 *Genet Med*) | Limited | Yes | ~50 PGx genes | Statistical phasing | ~84% (CYP2D6) | Fails on rare alleles; statistical phasing is unstable |\n| **StellarPGx** | Yes (~99%) | Yes | CYP2D6 + others | Phased | GeT-RM ~99% | Less widely deployed than Cyrius |\n| **Astrolabe** (proprietary, formerly Constellation) | Yes | Yes | Multi-gene | Proprietary | Industry-validated | License required |\n| **StarPhase** (PacBio HiFi 2024+) | Yes | Yes | All CPIC Level A genes + HLA | Native phasing | Long-read gold standard | Requires PacBio HiFi |\n\n**Canonical clinical workflow 2024-2026:** PharmCAT for the panel + Cyrius (or StellarPGx) for CYP2D6 SVs + dedicated HLA typer (T1K, OptiType, HLA-LA) for HLA.\n\nTwesigomwe 2020 *npj Genom Med*: inter-tool discordance 10-18% on CYP2D6; nearly all in samples carrying SVs.\n\n## HLA-Drug Associations: Mechanistically Distinct from CYP\n\nHLA associations are **idiosyncratic immune reactions**, not dose-response phenomena. Effect sizes (OR 50-1000+) far exceed any CYP polymorphism. Testing rationale is **screen-and-avoid**, not dose-adjust.\n\n| Allele | Drug | Reaction | Population | Landmark |\n|--------|------|----------|------------|----------|\n| **HLA-B\\*57:01** | Abacavir | HSS | All ancestries (5-8% NFE) | Mallal 2008 *NEJM* (PREDICT-1) |\n| **HLA-B\\*15:02** | Carbamazepine, oxcarbazepine, phenytoin, lamotrigine (weaker) | SJS\u002FTEN | Han Chinese, Thai, Malay, Indian (>=5%) | Chung 2004 *Nature*; FDA black-box 2007 |\n| **HLA-A\\*31:01** | Carbamazepine | DRESS, MPE, SJS\u002FTEN | Europeans (2-5%), Japanese | McCormack 2011 *NEJM* |\n| **HLA-B\\*58:01** | Allopurinol | SJS\u002FTEN, DRESS | Han Chinese (10-15%), Thai, Korean | Hung 2005 *PNAS* (OR ~580) |\n| **HLA-B\\*13:01** | Dapsone | DDS | Han Chinese, SE Asian | Zhang 2013 *NEJM* |\n| **HLA-B\\*35:02** (NOT \\*35:01) | Minocycline | DILI | All | Urban 2017 *J Hepatol* |\n| **HLA-B\\*35:01** | TMP-SMX | DILI, DRESS-like | African American | Li 2021 *Hepatology* |\n| **HLA-B\\*14:01** | TMP-SMX | DILI | European American (OR 9.20) | Li 2021 |\n| **HLA-A\\*33:01\u002F03** | Terbinafine | DILI | Multi-ancestry | Nicoletti 2017 |\n| **HLA-DRB1\\*15:01-DQB1\\*06:02 haplotype** | Amoxicillin-clavulanate | DILI | Europeans | Stephens 2013 |\n| **HLA-B\\*15:13** | Phenytoin | SJS | Malaysian | Chang 2017 |\n\n**Critical:** HLA screening requires 4-field resolution. \\*57:01 (abacavir risk) vs \\*57:03 (no risk); \\*35:02 (minocycline DILI) vs \\*35:01 (TMP-SMX DILI). See `clinical-databases\u002Fhla-typing` for typing.\n\n## Non-CYP Pharmacogenes: Variant-Level Detail\n\n### DPYD (5-FU \u002F Capecitabine \u002F Tegafur); Activity Score Framework\n\nThe CPIC DPYD guideline (Amstutz 2018 *Clin Pharmacol Ther* 103:210) uses a **gene activity score** system. Activity values: normal-function = 1.0, decreased = 0.5, no function = 0.\n\n| Variant | rsID | Allele | Activity |\n|---------|------|--------|----------|\n| c.1905+1G>A | rs3918290 | DPYD*2A | 0 (splice disruption) |\n| c.1679T>G | rs55886062 | DPYD*13 (p.I560S) | 0 |\n| c.2846A>T | rs67376798 | (p.D949V) | 0.5 |\n| c.1129-5923C>G \u002F c.1236G>A (HapB3) | rs56038477 \u002F rs75017182 | HapB3 | 0.5 |\n\nGene AS = sum of two lowest activities. Recommended dose: AS 2 = full dose; AS 1.5 = 50% start + TDM; AS 1.0 = 50% start + TDM; AS 0 = avoid.\n\nc.85T>C (DPYD\\*9A) is NOT in the CPIC actionable set despite frequent commercial reporting; evidence does not support clinical decrement.\n\nEU universal pre-treatment testing standard since Henricks 2018 *Lancet Oncol* (genotype-guided dosing lowered severe fluoropyrimidine toxicity in DPYD variant carriers, e.g. DPYD*2A grade >=3 toxicity RR 2.87 -> 1.31) and EMA 2020 endorsement. US lags; ASCO\u002FNCCN moved 2022-2024.\n\n### TPMT + NUDT15 (Thiopurines); 2025 Update\n\nMaillard 2026 *Clin Pharmacol Ther* update emphasizes greater dose reduction for **compound TPMT\u002FNUDT15 IM**.\n\n| Gene | Variant | Activity | Population |\n|------|---------|----------|-----------|\n| TPMT *2 | c.238G>C | 0 | -- |\n| TPMT *3A | c.460G>A + c.719A>G | 0 | EUR-common |\n| TPMT *3B | c.460G>A | 0 | -- |\n| TPMT *3C | c.719A>G | 0 | AFR \u002F EAS dominant |\n| NUDT15 *3 | c.415C>T (rs116855232) | 0 | ~9.8% East Asian; \u003C1% EUR |\n\nNUDT15 *3 is the **dominant thiopurine determinant in East Asians**; TPMT-alone testing misses these patients (Yang 2015 *J Clin Oncol*).\n\n### UGT1A1 (Irinotecan, Atazanavir)\n\n- \\*28 (TA7 promoter repeat vs \\*1 = TA6, \\*37 = TA8); EUR-common\n- \\*6 (c.211G>A, p.G71R); East Asian dominant\n- Severe neutropenia in \\*28\u002F\\*28 at irinotecan >=180 mg\u002Fm^2\n\n### CYP2C19 + Clopidogrel; The Most-Litigated Pair\n\n- **Pare 2010** *NEJM*: no benefit of clopidogrel in \\*2 carriers in CURE\u002FACTIVE-A.\n- **TAILOR-PCI** (Pereira 2020 *JAMA*): 5,302 patients post-PCI; primary endpoint MACE @12mo HR 0.66, **p=0.06 (negative by pre-specified alpha)** but positive in sensitivity analyses.\n- **Pereira NL et al 2021 meta-analysis** (7 RCTs, 15,949 patients): ~30% MACE reduction in CYP2C19 LOF carriers (*JACC Cardiovasc Interv* 14:739).\n- **Consensus 2024 (ACC\u002FAHA\u002FESC):** genotype-guided therapy reasonable; strongest in post-PCI ACS.\n\n### Warfarin (CYP2C9 + VKORC1 + CYP4F2)\n\n- **EU-PACT 2013** *NEJM*: PGx dosing positive (European).\n- **COAG 2013** *NEJM*: PGx dosing negative; worse in African Americans because algorithm omitted CYP2C9 \\*5, \\*6, \\*8, \\*11 alleles common in African ancestry. **Paradigmatic ancestry-algorithm failure** (Daneshjou 2014 *Blood*).\n- IWPC algorithm explains 47-55% of dose variance.\n\n### SLCO1B1 + Simvastatin\n\n- rs4149056 (c.521T>C, p.V174A); OR 4.5 per C allele for myopathy on 80 mg simvastatin (SEARCH 2008 *NEJM*).\n- 2022 CPIC update broadened to all statins with SLCO1B1 substrate behavior.\n\n### Other Actionable\n\n- **CYP2B6 *6** (c.516G>T + c.785A>G): efavirenz dose 600 -> 400 mg in *6\u002F*6 (ENCORE1).\n- **CYP3A5 *3** (rs776746): non-expressers (\\*3, \\*6, \\*7) are the *common* state in non-AFR; expressers need 1.5-2x higher tacrolimus dose.\n- **G6PD** (CPIC 2022 Gammal 2023): X-linked; female heterozygotes have mosaic activity that single-timepoint assay misclassifies.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended path | Why |\n|----------|------------------|-----|\n| Multi-gene PGx panel from VCF | PharmCAT | CPIC-recommended; 21 genes + full clinical reporting |\n| CYP2D6 with structural variants | Cyrius (or StellarPGx) | Only tools with reliable SV calling from short-read |\n| All CPIC Level A + HLA from one sample | PacBio HiFi + StarPhase | Long-read single-pass typing |\n| Pre-emptive panel for cohort | PREPARE-style 12-gene panel | Swen 2023 RCT-validated |\n| HLA-B\\*57:01 abacavir screen | T1K or OptiType (4-field); HIBAG if SNP-array | Need 4-field specificity |\n| African-ancestry warfarin | IWPC algorithm + CYP2C9 *5\u002F*6\u002F*8\u002F*11 explicit | COAG failure paradigm |\n| East Asian thiopurine | NUDT15 + TPMT | NUDT15 *3 is dominant in EAS |\n| Compound IM (TPMT + NUDT15) | Apply 2025 update | More aggressive dose reduction than single-gene IM |\n| Activity score interpretation | Caudle 2020 thresholds for CYP2D6; gene-specific for others | Per CPIC |\n\n## PharmCAT Workflow (Recommended Multi-Gene Pipeline)\n\n**Goal:** Generate CPIC-compliant pharmacogenomic report from a phased or unphased VCF covering 21 PGx genes.\n\n**Approach:** Run PharmCAT on the VCF; supplement CYP2D6 with Cyrius output if SVs suspected; cross-reference HLA from separate typing.\n\n```bash\n# PharmCAT (CPIC-recommended; covers 21 genes including CYP2C19, CYP2C9, CYP2D6,\n# DPYD, TPMT, NUDT15, UGT1A1, SLCO1B1, CYP3A5, CYP4F2, VKORC1, IFNL3\u002FIFNL4, etc.)\n\n# 1. Preprocess VCF (ensures correct ref allele alignment + chr formatting)\npharmcat_vcf_preprocessor.py \\\n    -vcf input.vcf.gz \\\n    -refFna GRCh38.fa \\\n    -o pharmcat_input\u002F\n\n# 2. Run PharmCAT\njava -jar pharmcat.jar \\\n    -vcf pharmcat_input\u002Finput.preprocessed.vcf.bgz \\\n    -o pharmcat_output\u002F\n\n# Output: \u003Csample>.report.html with phenotype, activity score, dosing recommendations\n```\n\nFor CYP2D6 SV-rich samples, run Cyrius separately and pass outside calls to PharmCAT:\n\n```bash\n# Cyrius for CYP2D6 (99.3% concordance vs Aldy 82-87%, Stargazer 84%)\ncyrius -m sample.bam -o cyrius_out --threads 8\n# Output: cyrius_out\u002Fsample.tsv with diplotype + activity score\n\n# Pass outside calls to PharmCAT\njava -jar pharmcat.jar \\\n    -vcf pharmcat_input\u002Finput.preprocessed.vcf.bgz \\\n    -po cyrius_out\u002Fcyrius_for_pharmcat.tsv \\\n    -o pharmcat_output_with_cyrius\u002F\n```\n\n## CYP2D6 Activity Score Calculation\n\n**Goal:** Convert CYP2D6 diplotype to activity score and phenotype with Caudle 2020 conventions.\n\n**Approach:** Look up per-allele activity values; handle copy-number duplications; apply Caudle 2020 phenotype bins.\n\n```python\n# Caudle 2020 activity values; *10 reset from 0.5 to 0.25 in 2020\nCYP2D6_ACTIVITY = {\n    '*1': 1.0, '*2': 1.0, '*35': 1.0,\n    '*3': 0.0, '*4': 0.0, '*5': 0.0, '*6': 0.0, '*7': 0.0, '*8': 0.0,\n    '*11': 0.0, '*12': 0.0, '*15': 0.0, '*19': 0.0, '*20': 0.0,\n    '*36': 0.0, '*40': 0.0, '*42': 0.0, '*68': 0.0,\n    '*9': 0.5, '*41': 0.5, '*17': 0.5, '*29': 0.5,\n    '*10': 0.25,\n    '*13': 0.0,\n}\n\n\ndef cyp2d6_activity(diplotype):\n    '''Convert CYP2D6 diplotype to activity score.\n\n    Accepts e.g. '*1\u002F*4' or '*2xN\u002F*10' or '*4xN\u002F*10'. Copy-number-aware:\n    - *4xN is clinically silent (no-function * N = 0)\n    - *1xN, *2xN multiply functional activity\n    '''\n    left, right = diplotype.split('\u002F')\n    return _allele_activity(left) + _allele_activity(right)\n\n\ndef _allele_activity(allele_str):\n    '''Handle copy-number suffix xN. *4xN remains 0 (the most common mis-classification).'''\n    if 'x' in allele_str:\n        base, n = allele_str.split('x')\n        copies = int(n) if n != 'N' else 2  # 'N' usually >=2; clinical assumes 2 unless quantified\n        return CYP2D6_ACTIVITY.get(base, 1.0) * copies\n    return CYP2D6_ACTIVITY.get(allele_str, 1.0)\n\n\ndef cyp2d6_phenotype(activity_score):\n    '''Caudle 2020 phenotype bins.'''\n    if activity_score == 0:\n        return 'Poor Metabolizer'\n    if activity_score \u003C 1.25:\n        return 'Intermediate Metabolizer'\n    if activity_score \u003C= 2.25:\n        return 'Normal Metabolizer'\n    return 'Ultrarapid Metabolizer'\n\n\n# Example: *4xN\u002F*10; the classic clinical-silence footgun\ndiplotype = '*4xN\u002F*10'\nscore = cyp2d6_activity(diplotype)  # 0 (from *4xN) + 0.25 (from *10) = 0.25\nprint(f'{diplotype}: AS={score}, phenotype={cyp2d6_phenotype(score)}')  # IM, NOT UM\n```\n\n## DPYD Activity Score (CPIC)\n\n```python\nDPYD_2024_ACTIVITY = {\n    'c.1905+1G>A': 0.0,    # *2A; splice donor\n    'c.1679T>G': 0.0,      # *13; p.I560S\n    'c.2846A>T': 0.5,      # p.D949V\n    'HapB3': 0.5,          # c.1129-5923C>G linked with c.1236G>A\n}\n\n\ndef dpyd_activity(variants):\n    '''Compute DPYD gene activity score from observed variants.\n\n    Sum the two lowest activities across the two alleles. CPIC dosing:\n    - AS 2.0: full dose\n    - AS 1.5: 50% start + TDM\n    - AS 1.0: 50% start + TDM\n    - AS 0.0: avoid\n    '''\n    activities = sorted([DPYD_2024_ACTIVITY.get(v, 1.0) for v in variants])\n    return sum(activities[:2])\n\n\ndef dpyd_dosing(activity_score):\n    if activity_score >= 1.99:\n        return 'Full dose'\n    if activity_score >= 1.0:\n        return '50% starting dose + therapeutic drug monitoring'\n    return 'Avoid fluoropyrimidines'\n```\n\n## PharmGKB API for Drug-Gene Pair Lookup\n\n```python\nimport requests\n\nPHARMGKB = 'https:\u002F\u002Fapi.pharmgkb.org\u002Fv1'\n\n\ndef clinical_annotation(gene_symbol):\n    '''Query PharmGKB clinical annotations by gene.'''\n    r = requests.get(f'{PHARMGKB}\u002Fdata\u002FclinicalAnnotation',\n                     params={'view': 'base', 'location.genes.symbol': gene_symbol},\n                     timeout=30)\n    return r.json().get('data', [])\n\n\ndef cpic_guideline(gene_symbol):\n    '''Query CPIC guidelines via PharmGKB.'''\n    r = requests.get(f'{PHARMGKB}\u002Fdata\u002Fguideline',\n                     params={'view': 'base', 'relatedGenes.symbol': gene_symbol, 'source': 'CPIC'},\n                     timeout=30)\n    return r.json().get('data', [])\n```\n\n## Per-Operation Failure Modes\n\n**1. *4xN -> \"Ultrarapid Metabolizer\"**\n- Trigger: Pipeline reports CYP2D6 \\*4xN as UM.\n- Mechanism: \\*4 has activity 0; \\*4 x N = still 0. Only functional alleles (\\*1, \\*2, \\*35) become UM when amplified.\n- Symptom: Patient labeled as needing dose reduction when they should be PM\u002FIM.\n- Fix: Look up per-allele activity BEFORE multiplying by N; \\*4xN = 0; AS depends entirely on the other allele.\n\n**2. Calling CYP2D6 from short-read without SV-aware tool**\n- Trigger: Use GATK + PharmCAT only on CYP2D6.\n- Mechanism: 97%+ CYP2D6\u002FCYP2D7 identity; SVs (deletion, duplications, hybrids) silently miscalled.\n- Symptom: ~10-18% of samples miscalled (Twesigomwe 2020); concentrated in samples with SVs.\n- Fix: Add Cyrius (or StellarPGx) for CYP2D6; pass outside calls to PharmCAT.\n\n**3. Pre-2020 \\*10 activity value**\n- Trigger: Use activity = 0.5 for CYP2D6 \\*10.\n- Mechanism: Caudle 2020 reset \\*10 from 0.5 to 0.25 based on metabolic-ratio evidence.\n- Symptom: East-Asian samples mis-classified as NM (when should be IM).\n- Fix: Use Caudle 2020 activity table; \\*10 = 0.25.\n\n**4. EUR-only DPYD panel**\n- Trigger: Pre-treat fluoropyrimidine using CPIC-core 4-variant panel only.\n- Mechanism: 4-variant panel captures EUR DPD-deficient carriers but misses additional DPYD variants enriched in non-European populations (Offer 2014 identified ~30 such deleterious variants).\n- Symptom: African-ancestry patients suffer severe toxicity despite \"negative\" PGx.\n- Fix: Use extended panel for AFR cohorts; supplement with phenotype testing (uracil\u002Fdihydrouracil plasma ratio).\n\n**5. TPMT testing without NUDT15**\n- Trigger: Pre-treat thiopurines using TPMT-only PGx in East Asian patient.\n- Mechanism: NUDT15 *3 (9.8% EAS, \u003C1% EUR) is the dominant determinant in EAS.\n- Symptom: EAS patients TPMT-wildtype suffer severe myelosuppression.\n- Fix: Always test NUDT15 alongside TPMT; apply Maillard 2026 compound-IM rules.\n\n**6. HLA-B\\*57 -> \"abacavir risk\" (4-field underspecified)**\n- Trigger: Screen reports \"B*57 present\" as contraindication.\n- Mechanism: B*57:01 (HSS risk), B*57:02, B*57:03 (no HSS risk).\n- Symptom: False contraindication; patient denied effective therapy.\n- Fix: Report 4-field; B*57:01 specifically.\n\n**7. CYP3A5 *3 \u002F non-expresser confusion**\n- Trigger: Apply \"CYP3A5 normal metabolizer\" to *3\u002F*3 in tacrolimus dosing.\n- Mechanism: *3\u002F*3 are NON-EXPRESSERS (most common state in non-AFR); expressers (any *1) need 1.5-2x higher dose.\n- Symptom: Tacrolimus over-dosing in expressers; under-dosing in non-expressers.\n- Fix: Apply CPIC 2015 (Birdwell) tacrolimus dosing; flag expresser status.\n\n**8. Activity-based vs allele-based confusion**\n- Trigger: Sum activities across substrate-non-specific assumption for *17.\n- Mechanism: CYP2D6 *17 shows substrate-dependent activity (reduced for some substrates, near-normal for others).\n- Symptom: Substrate-specific dose recommendations applied generically.\n- Fix: Use substrate-specific guidance where available; flag *17 in AFR cohorts.\n\n## Reconciliation: When Tools Disagree\n\n| Pattern | Likely cause | Action |\n|---------|-------------|--------|\n| Cyrius vs Aldy CYP2D6 disagree | SV-rich sample; Aldy less accurate | Trust Cyrius |\n| PharmCAT vs CPIC website disagree on phenotype | PharmCAT version lag or *10 activity value drift | Update PharmCAT to current release |\n| CPIC vs DPWG dosing differ | Independent guideline bodies | Cite both; use jurisdiction-appropriate one |\n| Patient phenotype doesn't match genotype | Drug-drug interaction; clearance physiology; non-pharmacogenetic factor | Consider phenoconversion; clinical reassessment |\n| TPMT-only test vs IM phenotype | Missed NUDT15 in EAS | Re-test with NUDT15 |\n| *4xN reported as UM | Tool bug | Use SV-aware tool and Caudle 2020 activity table |\n| HLA-B*57 reported without 4-field | Insufficient resolution | Re-type at 4-field minimum |\n\n## Quantitative Thresholds and Conventions\n\n| Threshold | Convention | Source |\n|-----------|-----------|--------|\n| Cyrius CYP2D6 accuracy | 99.3% on GeT-RM reference samples | Chen 2021 *Pharmacogenomics J* |\n| Aldy CYP2D6 accuracy | 82-87% on GeT-RM | Twesigomwe 2020 |\n| Stargazer CYP2D6 accuracy | ~84% on GeT-RM | Twesigomwe 2020 |\n| Inter-tool CYP2D6 discordance | 10-18% (concentrated in SV samples) | Twesigomwe 2020 |\n| PREPARE ADR reduction | OR 0.70 (95% CI 0.54-0.91) for actionable interactions | Swen 2023 *Lancet* |\n| PREPARE actionable variant rate | 93.5% of patients had >=1 actionable variant | Swen 2023 |\n| TAILOR-PCI primary endpoint | HR 0.66 (95% CI 0.43-1.02), p=0.06 (negative) | Pereira 2020 *JAMA* |\n| Pereira 2021 meta-analysis | ~30% MACE reduction in CYP2C19 LOF carriers | Pereira 2021 *JACC Cardiovasc Interv* 14:739 |\n| Henricks 2018 DPYD outcome | Per-variant toxicity reduction (DPYD*2A grade >=3 RR 2.87 -> 1.31) | Henricks 2018 *Lancet Oncol* |\n| NUDT15 *3 frequency | ~9.8% East Asian vs \u003C1% EUR | Relling 2019 CPIC *Clin Pharmacol Ther* 105:1095 |\n| HLA-B*57:01 OR for abacavir HSS | ~100 (case-control) | Mallal 2002 *Lancet* 359:727 |\n\n## Common Errors\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| CYP2D6 reported as UM in samples with *4xN | Tool not SV-aware OR Caudle 2020 not applied | Use Cyrius; check *4xN handling |\n| East-Asian patient labeled CYP2D6 NM | *10 still at activity 0.5 | Update activity table to Caudle 2020 (*10 = 0.25) |\n| African patient suffers warfarin bleeding despite \"wildtype\" CYP2C9 | Panel omits *5\u002F*6\u002F*8\u002F*11 (AFR-common) | Use ancestry-aware panel; supplement with INR-guided dosing |\n| Severe thiopurine toxicity in TPMT-wildtype EAS patient | NUDT15 not tested | Always pair TPMT + NUDT15 |\n| Patient with CYP2C19 *2\u002F*2 and clopidogrel failure | Expected; no genotype-guided alternative chosen | Switch to prasugrel\u002Fticagrelor per CPIC |\n| DPYD AS = 0 but no dose adjustment | Single-variant rule used instead of activity score | Update to the CPIC activity-score framework |\n| HLA-B*57:01 false positive | 2-field B*57 result misinterpreted | Re-type at 4-field |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"TAILOR-PCI missed primary endpoint; why genotype clopidogrel?\" | Sensitivity analyses positive; Pereira 2021 meta-analysis (7 RCTs) +30% MACE reduction; ESC 2023 endorses; ACC 2022 weaker. |\n| \"DPYD universal screening is expensive\" | Henricks 2018 per-variant toxicity reduction + Knikman 2021 cost-effective; EU standard since 2020; US ASCO\u002FNCCN updated 2022-2024. |\n| \"CYP2D6 SV calling is unreliable\" | Cyrius 99.3% on GeT-RM (Chen 2021); not unreliable; the prior tools were. |\n| \"*10 = 0.25 disagrees with old paper\" | Caudle 2020 *Clin Transl Sci* consensus reset based on substrate-metabolic-ratio evidence. |\n| \"GeneSight is approved by my hospital\" | GUIDED trial (Greden 2019) missed primary endpoint; physician-unblinded; literature shows modest effects inseparable from expectancy bias. |\n| \"Why pair TPMT + NUDT15?\" | NUDT15 *3 is the dominant thiopurine determinant in East Asians (9.8% vs TPMT *3C ~2%); compound IM (TPMT + NUDT15) requires more aggressive dose reduction per Maillard 2026. |\n| \"HLA imputation from SNP array reliable?\" | EUR-trained panel on EUR samples ~95%; cross-ancestry drops to 70-80%; for HSCT use sequencing-based typing. |\n\n## References\n\n- Sangkuhl K et al. 2020. Pharmacogenomics Clinical Annotation Tool (PharmCAT). *Clin Pharmacol Ther* 107:203.\n- Chen X et al. 2021. Cyrius: accurate CYP2D6 genotyping using whole-genome sequencing data. *Pharmacogenomics J* 21:251.\n- Numanagic I et al. 2018. Allelic decomposition and exact genotyping of highly polymorphic and structurally variant genes. *Nat Commun* 9:828. (Aldy)\n- Lee SB et al. 2019. Stargazer: a tool for calling star alleles. *Genet Med* 21:361.\n- Twesigomwe D et al. 2020. A systematic comparison of pharmacogene star allele calling bioinformatics algorithms. *npj Genom Med* 5:30.\n- Caudle KE et al. 2020. Standardizing CYP2D6 genotype to phenotype translation. *Clin Transl Sci* 13:116. (Activity-score reset for *10)\n- Bank PCD et al. 2018. Comparison of the guidelines of the CPIC and the Dutch Pharmacogenetics Working Group. *Clin Pharmacol Ther* 103:599.\n- Amstutz U et al. 2018. CPIC guideline for dihydropyrimidine dehydrogenase genotype and fluoropyrimidine dosing: 2017 update. *Clin Pharmacol Ther* 103:210. (DPYD activity score)\n- Swen JJ et al. 2023. PREPARE: A pre-emptive pharmacogenetic testing strategy. *Lancet* 401:347.\n- Henricks LM et al. 2018. DPYD-guided dose individualization to fluoropyrimidines. *Lancet Oncol* 19:1459.\n- Pereira NL et al. 2020. Effect of genotype-guided oral P2Y12 inhibitor selection vs conventional clopidogrel therapy on ischemic outcomes after PCI. *JAMA* 324:761. (TAILOR-PCI)\n- Pereira NL et al. 2021. Effect of CYP2C19 genotype on ischemic outcomes during oral P2Y12 inhibitor therapy: a meta-analysis. *JACC Cardiovasc Interv* 14:739.\n- Mallal S et al. 2008. HLA-B*5701 screening for hypersensitivity to abacavir. *NEJM* 358:568. (PREDICT-1)\n- Chung WH et al. 2004. Medical genetics: a marker for Stevens-Johnson syndrome. *Nature* 428:486.\n- McCormack M et al. 2011. HLA-A*3101 and carbamazepine-induced hypersensitivity reactions in Europeans. *NEJM* 364:1134.\n- Hung SI et al. 2005. HLA-B*5801 allele as a genetic marker for severe cutaneous adverse reactions caused by allopurinol. *PNAS* 102:4134.\n- Yang JJ et al. 2015. Inherited NUDT15 variant is a genetic determinant of mercaptopurine intolerance. *J Clin Oncol* 33:1235.\n- Relling MV et al. 2019. CPIC guideline for thiopurine dosing based on TPMT and NUDT15 genotypes: 2018 update. *Clin Pharmacol Ther* 105:1095.\n- PharmCAT documentation: `https:\u002F\u002Fpharmcat.org`\n- PharmVar: `https:\u002F\u002Fwww.pharmvar.org`\n- CPIC: `https:\u002F\u002Fcpicpgx.org`\n- DPWG: `https:\u002F\u002Fwww.knmp.nl\u002Fdpwg`\n\n## Related Skills\n\n- clinical-databases\u002Fhla-typing - HLA-B*57:01, B*15:02, B*58:01, A*31:01 typing\n- clinical-databases\u002Fclinvar-lookup - Variant pathogenicity for non-PGx context\n- clinical-databases\u002Fvariant-prioritization - Rare-disease pipeline\n- clinical-databases\u002Fmyvariant-queries - Aggregated PGx variant annotation\n- chemoinformatics\u002Fadmet-prediction - Drug metabolism prediction\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","clinical-databases\u002Fpharmacogenomics\u002FSKILL.md","PharmCAT","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-clinical-databases-pharmacogenomics","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-clinical-databases-pharmacogenomics",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-clinical-databases-pharmacogenomics",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-clinical-databases-pharmacogenomics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-clinical-databases-pharmacogenomics\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fpharmgkb_query.py","SCRIPT","脚本",8191,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-clinical-databases-pharmacogenomics\u002Fexamples\u002Fpharmgkb_query.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",6577,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-clinical-databases-pharmacogenomics\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]