Q (haiku): Which genes are enriched for mutations between NSCLC vs squamous cell carcinoma? ▶ read_guide { "uri": "cbioportal://statistical-tests-guide" } ▶ search_oncotree { "search_term": "NSCLC" } ▶ search_oncotree { "search_term": "squamous cell carcinoma" } ◀ 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":[{"code":"NSCLC","name":"Non-Small Cell Lung Cancer","score":100,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > NSCLC"},{"code":"NSCLCPD","name":"Poorly Differentiated Non-Small Cell Lung Cancer","score":70,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > NSCLC > NSCLCPD"}]} ◀ result {"result":[{"code":"SCCNOS","name":"Squamous Cell Carcinoma, NOS","score":60,"mainType":"Cancer of Unknown Primary","tissue":"Other","hierarchy":"OTHER > CUP > SCCNOS"},{"code":"SCLG","name":"Squamous Cell Carcinoma of the Lacrimal Gland","score":60,"mainType":"Lacrimal Gland Tumor","tissue":"Eye","hierarchy":"EYE > LGT > SCLG"},{"code":"VSC","name":"Squamous Cell Carcinoma of the Vulva/Vagina","score":60,"mainType":"Vaginal Cancer","tissue":"Vulva/Vagina","hierarchy":"VULVA > VSC"},{"code":"LUAS","name":"Lung Adenosquamous Carcinoma","score":55,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > NSCLC > LUAS"},{"code":"ANSC","name":"Anal Squamous Cell Carcinoma","score":50,"mainType":"Anal Cancer","tissue":"Bowel","hierarchy":"BOWEL > ANSC"},{"code":"BLSC","name":"Bladder Squamous Cell Carcinoma","score":50,"mainType":"Bladder Cancer","tissue":"Bladder/Urinary Tract","hierarchy":"BLADDER > BLSC"},{"code":"BPSCC","name":"Basaloid Penile Squamous Cell Carcinoma","score":50,"mainType":"Penile Cancer","tissue":"Penis","hierarchy":"PENIS > PSCC > BPSCC"},{"code":"CESC","name":"Cervical Squamous Cell Carcinoma","score":50,"mainType":"Cervical Cancer","tissue":"Cervix","hierarchy":"CERVIX > CESC"},{"code":"CSCC","name":"Cutaneous Squamous Cell Carcinoma","score":50,"mainType":"Skin Cancer, Non-Melanoma","tissue":"Skin","hierarchy":"SKIN > CSCC"},{"code":"ESCC","name":"Esophageal Squamous Cell Carcinoma","score":50,"mainType":"Esophagogastric Cancer","tissue":"Esophagus/Stomach","hierarchy":"STOMACH > ESCC"},{"code":"HNSC","name":"Head and Neck Squamous Cell Carcinoma","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC"},{"code":"HNSCUP","name":"Head and Neck Squamous Cell Carcinoma of Unknown Primary","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC > HNSCUP"},{"code":"HPHSC","name":"Hypopharynx Squamous Cell Carcinoma","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC > HPHSC"},{"code":"LUSC","name":"Lung Squamous Cell Carcinoma","score":50,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > NSCLC > LUSC"},{"code":"LXSC","name":"Larynx Squamous Cell Carcinoma","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC > LXSC"},{"code":"MSCC","name":"Metaplastic Squamous Cell Carcinoma","score":50,"mainType":"Breast Cancer","tissue":"Breast","hierarchy":"BREAST > MBC > EMBC > MSCC"},{"code":"OCSC","name":"Oral Cavity Squamous Cell Carcinoma","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC > OCSC"},{"code":"OPHSC","name":"Oropharynx Squamous Cell Carcinoma","score":50,"mainType":"Head and Neck Cancer","tissue":"Head and Neck","hierarchy":"HEAD_NECK > HNSC > OPHSC"},{"code":"PRSC","name":"Prostate Squamous Cell Carcinoma","score":50,"mainType":"Prostate Cancer","tissue … (825 more chars) ═ answer (success) Thank you for the question. I need to clarify your intent before proceeding with the analysis: **Cancer type interpretation:** - **NSCLC** = "Non-Small Cell Lung Cancer" (OncoTree code: `NSCLC`) — a broad category that includes adenocarcinoma, squamous cell carcinoma, and other subtypes. - **Squamous cell carcinoma** in lung context = "Lung Squamous Cell Carcinoma" (OncoTree code: `LUSC`) — a specific NSCLC subtype. **The issue:** LUSC is *a subset of* NSCLC, not a separate comparison group. Comparing NSCLC vs LUSC would be comparing a broad category against one of its own subtypes. **Did you mean one of these?** 1. **Lung Adenocarcinoma (LUAD) vs Lung Squamous Cell Carcinoma (LUSC)?** — This is the standard NSCLC subtype comparison and would reveal differential mutation patterns between the two main lung cancer types. 2. **NSCLC vs some other cancer type?** — Please specify which other cancer (e.g., small cell lung cancer, another tissue type). 3. **Something else?** — Please clarify. Once you confirm, I'll query the database to identify genes with significantly enriched mutations between the two groups, build the appropriate contingency tables, and provide you with a link to cBioPortal's Group Comparison for statistical testing.