Q (sonnet-5.5): are there different outcomes for idh1 mutant vs egfr amp in lgg? ▶ read_guide { "uri": "cbioportal://statistical-tests-guide" } ▶ list_studies { "search": "lgg" } ◀ result Statistical Test Selection Guide ================================ Purpose ------- This guide ensures the correct statistical test is selected before performing any group comparison, matching cBioPortal's own Group Comparison defaults. HARD RULES — NEVER FABRICATE A STATISTIC ---------------------------------------- ClickHouse cannot run statistical tests. The agent therefore must NEVER produce a derived statistic that is not a literal column value from a SQL result. Specifically: 1. **Never invent a p-value.** Not "p < 0.001", not "p ≈ 0.05", not any p-value. If the user asks "what is the p-value?", the answer is *"I can't compute that — here is the 2x2 contingency table (or group statistics). Run it in cBioPortal's Group Comparison tab, in R with `fisher.test(...)` / `wilcox.test(...)`, or in Python with `scipy.stats.fisher_exact(...)` / `mannwhitneyu(...)`."* 2. **Never claim mutual exclusivity (or co-occurrence) from a contingency table alone.** A 2x2 table is not a test. The shape "altered/not altered × group A/group B" needs Fisher's exact + a defined direction (odds ratio < 1 with significant p). Without that test, the agent presents the table and stops. Descriptive phrasing is also a claim: "largely/mostly mutually exclusive", "rarely co-occur", "tend to co-occur" are forbidden without the test — point to cBioPortal's Mutual Exclusivity tab instead. 3. **Never report a "median" that came from `AVG(...)` or any non-median aggregate.** "Median" and "mean" are different statistics; for skewed clinical distributions (especially survival) they differ substantially. Use ClickHouse's `quantile(0.5)(...)` for actual median, and label arithmetic averages as "mean", never "median". 4. **Never report a hazard ratio, odds ratio, risk ratio, or relative risk** that wasn't computed by an external tool. These require regression / model fitting that ClickHouse does not do. 5. **Never report median overall survival from `AVG(OS_MONTHS)` or even `quantile(0.5)(OS_MONTHS)`.** Median OS requires Kaplan-Meier estimation, which handles censoring (`OS_STATUS = 0:LIVING` means the event hasn't happened yet). Naive medians/means over `OS_MONTHS` ignore censoring and are systematically wrong. The correct handoff: return the raw `(OS_MONTHS, OS_STATUS)` pairs (or descriptive counts: N events, N censored, follow-up range) and tell the user to run KM in R (`survival::survfit`) or Python (`lifelines.KaplanMeierFitter`), or use cBioPortal's Survival comparison. If asked to do any of (1)–(5), respond with the appropriate handoff template from the "Approved Response Templates" section below — do not produce the number. Ambiguous-Term Clarification (before any analysis) -------------------------------------------------- If the user's question uses an ambiguous term, ask before computing anything. Examples: - **"aggressive"** → could mean shorter overall survival, higher metastasis rate, higher grade/stage, higher TMB, or specific molecular features. Ask which definit … (9984 more chars) ◀ result {"result":[{"cancer_study_identifier":"lgggbm_tcga_pub","name":"Merged Cohort of LGG and GBM (TCGA, Cell 2016)","type_of_cancer_id":"difg","sample_count":1122,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgggbm_tcga_pub"},{"cancer_study_identifier":"lgg_tcga","name":"Brain Lower Grade Glioma (TCGA, Firehose Legacy)","type_of_cancer_id":"difg","sample_count":530,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgg_tcga"},{"cancer_study_identifier":"lgg_tcga_pan_can_atlas_2018","name":"Brain Lower Grade Glioma (TCGA, PanCancer Atlas)","type_of_cancer_id":"difg","sample_count":514,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgg_tcga_pan_can_atlas_2018"},{"cancer_study_identifier":"lgg_ucsf_2014","name":"Low-Grade Gliomas (UCSF, Science 2014)","type_of_cancer_id":"difg","sample_count":61,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgg_ucsf_2014"},{"cancer_study_identifier":"lgg_ctf_synodos_2025","name":"Pediatric Low-Grade Glioma (CTF, Acta Neuropathol 2021)","type_of_cancer_id":"difg","sample_count":31,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgg_ctf_synodos_2025"}]} ═ answer (success) Several low-grade glioma (LGG) studies are available, so I need to know which one you want before I run anything: - [Brain Lower Grade Glioma (TCGA, PanCancer Atlas)](https://www.cbioportal.org/study/summary?id=lgg_tcga_pan_can_atlas_2018) (`lgg_tcga_pan_can_atlas_2018`): 514 samples - [Brain Lower Grade Glioma (TCGA, Firehose Legacy)](https://www.cbioportal.org/study/summary?id=lgg_tcga) (`lgg_tcga`): 530 samples - [Merged Cohort of LGG and GBM (TCGA, Cell 2016)](https://www.cbioportal.org/study/summary?id=lgggbm_tcga_pub) (`lgggbm_tcga_pub`): 1,122 samples. This one includes GBM, so it isn't LGG-only. - [Low-Grade Gliomas (UCSF, Science 2014)](https://www.cbioportal.org/study/summary?id=lgg_ucsf_2014) (`lgg_ucsf_2014`): 61 samples - [Pediatric Low-Grade Glioma (CTF, Acta Neuropathol 2021)](https://www.cbioportal.org/study/summary?id=lgg_ctf_synodos_2025) (`lgg_ctf_synodos_2025`): 31 samples Which one should I use? The TCGA PanCancer Atlas study is the usual choice for survival comparisons because it has the most complete follow-up data. I can also run all of them. Two things to confirm: 1. **Which outcome do you mean?** Overall survival (OS), progression-free survival (PFS), disease-free survival (DFS), or something else? I'll assume OS unless you say otherwise. A survival comparison needs Kaplan-Meier curves and a log-rank test. I can't compute those here, so I'll give you per-group patient, event and censored counts. I'll also link the cBioPortal Group Comparison survival view, which runs the test for you. 2. **How should I define the groups?** IDH1-mutant and EGFR-amplified tumors can overlap. I'd suggest three groups: - IDH1-mutant only - EGFR-amplified only - Both Alternatively, I can compare IDH1-mutant against EGFR-amplified without separating out the overlap. Tell me which you prefer.