Immunotherapy Response Prediction
Predict patient response to immune checkpoint inhibitors (ICIs) using multi-biomarker integration. Transforms a patient tumor profile (cancer type + mutations + biomarkers) into a quantitative ICI Response Score with drug-specific recommendations, resistance risk assessment, and monitoring plan.
Reasoning Before Searching
Not all tumors respond to checkpoint inhibitors. Reason through the biology before running tools:
- TMB (tumor mutational burden): More somatic mutations produce more neoantigens, which are recognized by T cells. High TMB (>=10 mut/Mb, FDA-approved threshold for pembrolizumab) generally predicts better response — but this varies by cancer type (e.g., RCC responds despite low TMB).
- MSI-H (microsatellite instability-high): Caused by defective DNA mismatch repair (MMR). MSI-H tumors have very high TMB and are pan-cancer approved for pembrolizumab. Check MLH1, MSH2, MSH6, PMS2 mutations.
- PD-L1 expression: The direct target of pembrolizumab/atezolizumab. High PD-L1 (TPS >=50% or CPS >=10 depending on cancer) predicts response in some cancers (NSCLC) but not all (melanoma, where TMB is more predictive).
- Resistance factors are equally important: STK11, KEAP1, JAK1/2 loss, B2M mutations can render an otherwise TMB-high tumor non-responsive.
Before calling any tool, determine which biomarkers are available for this patient and which are unknown. This determines which phases can be scored with data vs. must use cancer-type priors. Do not default to "moderate" for unknowns — flag them explicitly as missing.
LOOK UP DON'T GUESS: Never assume FDA approval for a biomarker-ICI combination — always verify with fda_pharmacogenomic_biomarkers or FDA_get_indications_by_drug_name. Cancer-specific thresholds differ from pan-cancer approvals.
KEY PRINCIPLES:
- Report-first approach - Create report file FIRST, then populate progressively
- Evidence-graded - Every finding has an evidence tier (T1-T4)
- Quantitative output - ICI Response Score (0-100) with transparent component breakdown
- Cancer-specific - All thresholds and predictions are cancer-type adjusted
- Multi-biomarker - Integrate TMB + MSI + PD-L1 + neoantigen + mutations
- Resistance-aware - Always check for known resistance mutations (STK11, PTEN, JAK1/2, B2M)
- Drug-specific - Recommend specific ICI agents with evidence
- Source-referenced - Every statement cites the tool/database source
- English-first queries - Always use English terms in tool calls
COMPUTE, DON'T DESCRIBE
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
When to Use
Apply when user asks:
- "Will this patient respond to immunotherapy?"
- "Should I give pembrolizumab to this melanoma patient?"
- "Patient has NSCLC with TMB 25, PD-L1 80% - predict ICI response"
- "MSI-high colorectal cancer - which checkpoint inhibitor?"
- "Patient has BRAF V600E melanoma, TMB 15 - immunotherapy or targeted?"
- "Compare pembrolizumab vs nivolumab for this patient profile"
Input Parsing
Required: Cancer type + at least one of: mutation list OR TMB value
Optional: PD-L1 expression, MSI status, immune infiltration data, HLA type, prior treatments, intended ICI
See INPUT_REFERENCE.md for input format examples, cancer type normalization, and gene symbol normalization tables.
Workflow Overview
Input: Cancer type + Mutations/TMB + Optional biomarkers (PD-L1, MSI, etc.)
Phase 1: Input Standardization & Cancer Context
Phase 2: TMB Analysis
Phase 3: Neoantigen Analysis
Phase 4: MSI/MMR Status Assessment
Phase 5: PD-L1 Expression Analysis
Phase 6: Immune Microenvironment Profiling
Phase 7: Mutation-Based Predictors
Phase 8: Clinical Evidence & ICI Options
Phase 9: Resistance Risk Assessment
Phase 10: Multi-Biomarker Score Integration
Phase 11: Clinical Recommendations
Phase 1: Input Standardization & Cancer Context
- Resolve cancer type to EFO ID via
OpenTargets_get_disease_id_description_by_name
- Parse mutations into structured format:
{gene, variant, type}
- Resolve gene IDs via
MyGene_query_genes
- Look up cancer-specific ICI baseline ORR from the cancer context table (see SCORING_TABLES.md)
Phase 2: TMB Analysis
- Classify TMB: Very-Low (<5), Low (5-9.9), Intermediate (10-19.9), High (>=20)
- Check FDA TMB-H biomarker via
fda_pharmacogenomic_biomarkers(drug_name='pembrolizumab')
- Apply cancer-specific TMB thresholds (see SCORING_TABLES.md)
- Note: RCC responds to ICIs despite low TMB; TMB is less predictive in some cancers
Phase 3: Neoantigen Analysis
- Estimate neoantigen burden: missense_count * 0.3 + frameshift_count * 1.5
- Check mutation impact via
UniProt_get_function_by_accession
- Query known epitopes via
iedb_search_epitopes
- POLE/POLD1 mutations indicate ultra-high neoantigen load
Phase 4: MSI/MMR Status Assessment
- Integrate MSI status if provided (MSI-H = 25 pts, MSS = 5 pts)
- Check mutations in MMR genes: MLH1, MSH2, MSH6, PMS2, EPCAM
- Check FDA MSI-H approvals via
fda_pharmacogenomic_biomarkers(biomarker='Microsatellite Instability')
Phase 5: PD-L1 Expression Analysis
- Classify PD-L1: High (>=50%), Positive (1-49%), Negative (<1%)
- Apply cancer-specific PD-L1 thresholds and scoring methods (TPS vs CPS)
- Get baseline expression via
HPA_get_cancer_prognostics_by_gene(gene_name='CD274')
Phase 6: Immune Microenvironment Profiling
- Query immune checkpoint gene expression for: CD274, PDCD1, CTLA4, LAG3, HAVCR2, TIGIT, CD8A, CD8B, GZMA, GZMB, PRF1, IFNG
- Classify tumor: Hot (T cell inflamed), Cold (immune desert), Immune excluded, Immune suppressed
- Run immune pathway enrichment via
enrichr_gene_enrichment_analysis
Phase 7: Mutation-Based Predictors
- Resistance mutations (apply PENALTIES): STK11 (-10), PTEN (-5), JAK1/2 (-10 each), B2M (-15), KEAP1 (-5), MDM2/4 (-5), EGFR (-5)
- Sensitivity mutations (apply BONUSES): POLE (+10), POLD1 (+5), BRCA1/2 (+3), ARID1A (+3), PBRM1 (+5 RCC only)
- Check CIViC and OpenTargets for driver mutation ICI context
- Check DDR pathway genes: ATM, ATR, CHEK1/2, BRCA1/2, PALB2, RAD50, MRE11
Phase 8: Clinical Evidence & ICI Options
- Query FDA indications for ICI drugs via
FDA_get_indications_by_drug_name
- Search clinical trials via
search_clinical_trials (params: condition, intervention, query_term)
- Search PubMed for biomarker-specific response data
- Get drug mechanisms via
OpenTargets_get_drug_mechanisms_of_action_by_chemblId
See SCORING_TABLES.md for ICI drug profiles and ChEMBL IDs.
Phase 9: Resistance Risk Assessment
- Check CIViC for resistance evidence via
civic_search_evidence_items
- Assess pathway-level resistance: IFN-g signaling, antigen presentation, WNT/b-catenin, MAPK, PI3K/AKT/mTOR
- Summarize risk: Low / Moderate / High
Phase 10: Multi-Biomarker Score Integration
TOTAL SCORE = TMB_score + MSI_score + PDL1_score + Neoantigen_score + Mutation_bonus + Resistance_penalty
TMB_score: 5-30 points MSI_score: 5-25 points
PDL1_score: 5-20 points Neoantigen_score: 5-15 points
Mutation_bonus: 0-10 points Resistance_penalty: -20 to 0 points
Floor: 0, Cap: 100
Response Likelihood Tiers:
- 70-100 HIGH (50-80% ORR): Strong ICI candidate
- 40-69 MODERATE (20-50% ORR): Consider ICI, combo preferred
- 0-39 LOW (<20% ORR): ICI alone unlikely effective
Confidence: HIGH (all 4 biomarkers), MODERATE-HIGH (3/4), MODERATE (2/4), LOW (1), VERY LOW (cancer only)
Phase 11: Clinical Recommendations
- ICI drug selection using cancer-specific algorithm (see SCORING_TABLES.md)
- Monitoring plan: CT/MRI q8-12wk, ctDNA at 4-6wk, thyroid/liver function, irAEs
- Alternative strategies if LOW response: targeted therapy, chemotherapy, ICI+chemo combo, ICI+anti-angiogenic, ICI+CTLA-4 combo, clinical trials
Output Report
Save as immunotherapy_response_prediction_{cancer_type}.md. See REPORT_TEMPLATE.md for the full report structure.
Tool Parameter Reference
BEFORE calling ANY tool, verify parameters. See TOOLS_REFERENCE.md for verified tool parameters table.
Key reminders:
MyGene_query_genes: use query (NOT q)
EnsemblVEP_annotate_rsid: use variant_id (NOT rsid)
drugbank_* tools: ALL 4 params required (query, case_sensitive, exact_match, limit)
cBioPortal_get_mutations: gene_list is a STRING not array
ensembl_lookup_gene: REQUIRES species='homo_sapiens'
Evidence Tiers
| Tier |
Description |
Source Examples |
| T1 |
FDA-approved biomarker/indication |
FDA labels, NCCN guidelines |
| T2 |
Phase 2-3 clinical trial evidence |
Published trial data, PubMed |
| T3 |
Preclinical/computational evidence |
Pathway analysis, in vitro data |
| T4 |
Expert opinion/case reports |
Case series, reviews |
References
1---2name: tooluniverse-immunotherapy-response-prediction3description: Predict patient response to immune checkpoint inhibitors (ICIs) by integrating tumor mutational burden (TMB), microsatellite instability (MSI), PD-L1 expression, HLA status, and immune-related gene expression. Outputs ICI Response Score with drug-specific recommendations and resistance-risk assessment. Use for melanoma/NSCLC/RCC immunotherapy decision support.4---5
6# Immunotherapy Response Prediction
7
8Predict patient response to immune checkpoint inhibitors (ICIs) using multi-biomarker integration. Transforms a patient tumor profile (cancer type + mutations + biomarkers) into a quantitative ICI Response Score with drug-specific recommendations, resistance risk assessment, and monitoring plan.
9
10## Reasoning Before Searching
11
12Not all tumors respond to checkpoint inhibitors. Reason through the biology before running tools:
13
14- **TMB (tumor mutational burden)**: More somatic mutations produce more neoantigens, which are recognized by T cells. High TMB (>=10 mut/Mb, FDA-approved threshold for pembrolizumab) generally predicts better response — but this varies by cancer type (e.g., RCC responds despite low TMB).
15- **MSI-H (microsatellite instability-high)**: Caused by defective DNA mismatch repair (MMR). MSI-H tumors have very high TMB and are pan-cancer approved for pembrolizumab. Check MLH1, MSH2, MSH6, PMS2 mutations.
16- **PD-L1 expression**: The direct target of pembrolizumab/atezolizumab. High PD-L1 (TPS >=50% or CPS >=10 depending on cancer) predicts response in some cancers (NSCLC) but not all (melanoma, where TMB is more predictive).
17- **Resistance factors** are equally important: STK11, KEAP1, JAK1/2 loss, B2M mutations can render an otherwise TMB-high tumor non-responsive.
18
19Before calling any tool, determine which biomarkers are available for this patient and which are unknown. This determines which phases can be scored with data vs. must use cancer-type priors. Do not default to "moderate" for unknowns — flag them explicitly as missing.
20
21**LOOK UP DON'T GUESS**: Never assume FDA approval for a biomarker-ICI combination — always verify with `fda_pharmacogenomic_biomarkers` or `FDA_get_indications_by_drug_name`. Cancer-specific thresholds differ from pan-cancer approvals.
22
23**KEY PRINCIPLES**:
241. **Report-first approach** - Create report file FIRST, then populate progressively
252. **Evidence-graded** - Every finding has an evidence tier (T1-T4)
263. **Quantitative output** - ICI Response Score (0-100) with transparent component breakdown
274. **Cancer-specific** - All thresholds and predictions are cancer-type adjusted
285. **Multi-biomarker** - Integrate TMB + MSI + PD-L1 + neoantigen + mutations
296. **Resistance-aware** - Always check for known resistance mutations (STK11, PTEN, JAK1/2, B2M)
307. **Drug-specific** - Recommend specific ICI agents with evidence
318. **Source-referenced** - Every statement cites the tool/database source
329. **English-first queries** - Always use English terms in tool calls
33
34---
35
36## COMPUTE, DON'T DESCRIBE
37When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
38
39## When to Use
40
41Apply when user asks:
42- "Will this patient respond to immunotherapy?"
43- "Should I give pembrolizumab to this melanoma patient?"
44- "Patient has NSCLC with TMB 25, PD-L1 80% - predict ICI response"
45- "MSI-high colorectal cancer - which checkpoint inhibitor?"
46- "Patient has BRAF V600E melanoma, TMB 15 - immunotherapy or targeted?"
47- "Compare pembrolizumab vs nivolumab for this patient profile"
48
49---
50
51## Input Parsing
52
53**Required**: Cancer type + at least one of: mutation list OR TMB value
54**Optional**: PD-L1 expression, MSI status, immune infiltration data, HLA type, prior treatments, intended ICI
55
56See [INPUT_REFERENCE.md](INPUT_REFERENCE.md) for input format examples, cancer type normalization, and gene symbol normalization tables.
57
58---
59
60## Workflow Overview
61
62```
63Input: Cancer type + Mutations/TMB + Optional biomarkers (PD-L1, MSI, etc.)
64
65Phase 1: Input Standardization & Cancer Context
66Phase 2: TMB Analysis
67Phase 3: Neoantigen Analysis
68Phase 4: MSI/MMR Status Assessment
69Phase 5: PD-L1 Expression Analysis
70Phase 6: Immune Microenvironment Profiling
71Phase 7: Mutation-Based Predictors
72Phase 8: Clinical Evidence & ICI Options
73Phase 9: Resistance Risk Assessment
74Phase 10: Multi-Biomarker Score Integration
75Phase 11: Clinical Recommendations
76```
77
78---
79
80## Phase 1: Input Standardization & Cancer Context
81
821. **Resolve cancer type** to EFO ID via `OpenTargets_get_disease_id_description_by_name`
832. **Parse mutations** into structured format: `{gene, variant, type}`
843. **Resolve gene IDs** via `MyGene_query_genes`
854. Look up cancer-specific ICI baseline ORR from the cancer context table (see [SCORING_TABLES.md](SCORING_TABLES.md))
86
87## Phase 2: TMB Analysis
88
891. Classify TMB: Very-Low (<5), Low (5-9.9), Intermediate (10-19.9), High (>=20)
902. Check FDA TMB-H biomarker via `fda_pharmacogenomic_biomarkers(drug_name='pembrolizumab')`
913. Apply cancer-specific TMB thresholds (see [SCORING_TABLES.md](SCORING_TABLES.md))
924. Note: RCC responds to ICIs despite low TMB; TMB is less predictive in some cancers
93
94## Phase 3: Neoantigen Analysis
95
961. Estimate neoantigen burden: missense_count * 0.3 + frameshift_count * 1.5
972. Check mutation impact via `UniProt_get_function_by_accession`
983. Query known epitopes via `iedb_search_epitopes`
994. POLE/POLD1 mutations indicate ultra-high neoantigen load
100
101## Phase 4: MSI/MMR Status Assessment
102
1031. Integrate MSI status if provided (MSI-H = 25 pts, MSS = 5 pts)
1042. Check mutations in MMR genes: MLH1, MSH2, MSH6, PMS2, EPCAM
1053. Check FDA MSI-H approvals via `fda_pharmacogenomic_biomarkers(biomarker='Microsatellite Instability')`
106
107## Phase 5: PD-L1 Expression Analysis
108
1091. Classify PD-L1: High (>=50%), Positive (1-49%), Negative (<1%)
1102. Apply cancer-specific PD-L1 thresholds and scoring methods (TPS vs CPS)
1113. Get baseline expression via `HPA_get_cancer_prognostics_by_gene(gene_name='CD274')`
112
113## Phase 6: Immune Microenvironment Profiling
114
1151. Query immune checkpoint gene expression for: CD274, PDCD1, CTLA4, LAG3, HAVCR2, TIGIT, CD8A, CD8B, GZMA, GZMB, PRF1, IFNG
1162. Classify tumor: Hot (T cell inflamed), Cold (immune desert), Immune excluded, Immune suppressed
1173. Run immune pathway enrichment via `enrichr_gene_enrichment_analysis`
118
119## Phase 7: Mutation-Based Predictors
120
1211. **Resistance mutations** (apply PENALTIES): STK11 (-10), PTEN (-5), JAK1/2 (-10 each), B2M (-15), KEAP1 (-5), MDM2/4 (-5), EGFR (-5)
1222. **Sensitivity mutations** (apply BONUSES): POLE (+10), POLD1 (+5), BRCA1/2 (+3), ARID1A (+3), PBRM1 (+5 RCC only)
1233. Check CIViC and OpenTargets for driver mutation ICI context
1244. Check DDR pathway genes: ATM, ATR, CHEK1/2, BRCA1/2, PALB2, RAD50, MRE11
125
126## Phase 8: Clinical Evidence & ICI Options
127
1281. Query FDA indications for ICI drugs via `FDA_get_indications_by_drug_name`
1292. Search clinical trials via `search_clinical_trials` (params: `condition`, `intervention`, `query_term`)
1303. Search PubMed for biomarker-specific response data
1314. Get drug mechanisms via `OpenTargets_get_drug_mechanisms_of_action_by_chemblId`
132
133See [SCORING_TABLES.md](SCORING_TABLES.md) for ICI drug profiles and ChEMBL IDs.
134
135## Phase 9: Resistance Risk Assessment
136
1371. Check CIViC for resistance evidence via `civic_search_evidence_items`
1382. Assess pathway-level resistance: IFN-g signaling, antigen presentation, WNT/b-catenin, MAPK, PI3K/AKT/mTOR
1393. Summarize risk: Low / Moderate / High
140
141## Phase 10: Multi-Biomarker Score Integration
142
143```
144TOTAL SCORE = TMB_score + MSI_score + PDL1_score + Neoantigen_score + Mutation_bonus + Resistance_penalty
145
146TMB_score: 5-30 points MSI_score: 5-25 points
147PDL1_score: 5-20 points Neoantigen_score: 5-15 points
148Mutation_bonus: 0-10 points Resistance_penalty: -20 to 0 points
149
150Floor: 0, Cap: 100
151```
152
153**Response Likelihood Tiers**:
154- 70-100 HIGH (50-80% ORR): Strong ICI candidate
155- 40-69 MODERATE (20-50% ORR): Consider ICI, combo preferred
156- 0-39 LOW (<20% ORR): ICI alone unlikely effective
157
158**Confidence**: HIGH (all 4 biomarkers), MODERATE-HIGH (3/4), MODERATE (2/4), LOW (1), VERY LOW (cancer only)
159
160## Phase 11: Clinical Recommendations
161
1621. **ICI drug selection** using cancer-specific algorithm (see [SCORING_TABLES.md](SCORING_TABLES.md))
1632. **Monitoring plan**: CT/MRI q8-12wk, ctDNA at 4-6wk, thyroid/liver function, irAEs
1643. **Alternative strategies** if LOW response: targeted therapy, chemotherapy, ICI+chemo combo, ICI+anti-angiogenic, ICI+CTLA-4 combo, clinical trials
165
166---
167
168## Output Report
169
170Save as `immunotherapy_response_prediction_{cancer_type}.md`. See [REPORT_TEMPLATE.md](REPORT_TEMPLATE.md) for the full report structure.
171
172---
173
174## Tool Parameter Reference
175
176**BEFORE calling ANY tool**, verify parameters. See [TOOLS_REFERENCE.md](TOOLS_REFERENCE.md) for verified tool parameters table.
177
178Key reminders:
179- `MyGene_query_genes`: use `query` (NOT `q`)
180- `EnsemblVEP_annotate_rsid`: use `variant_id` (NOT `rsid`)
181- `drugbank_*` tools: ALL 4 params required (`query`, `case_sensitive`, `exact_match`, `limit`)
182- `cBioPortal_get_mutations`: `gene_list` is a STRING not array
183- `ensembl_lookup_gene`: REQUIRES `species='homo_sapiens'`
184
185---
186
187## Evidence Tiers
188
189| Tier | Description | Source Examples |
190|------|-------------|----------------|
191| T1 | FDA-approved biomarker/indication | FDA labels, NCCN guidelines |
192| T2 | Phase 2-3 clinical trial evidence | Published trial data, PubMed |
193| T3 | Preclinical/computational evidence | Pathway analysis, in vitro data |
194| T4 | Expert opinion/case reports | Case series, reviews |
195
196---
197
198## References
199
200- OpenTargets: https://platform.opentargets.org
201- CIViC: https://civicdb.org
202- FDA Drug Labels: https://dailymed.nlm.nih.gov
203- DrugBank: https://go.drugbank.com
204- PubMed: https://pubmed.ncbi.nlm.nih.gov
205- IEDB: https://www.iedb.org
206- HPA: https://www.proteinatlas.org
207- cBioPortal: https://www.cbioportal.org