Q (sonnet-5.5): In TCGA colorectal cancer, do patients with high PTK2 expression have different survival from patients with low PTK2 expression? In Colorectal Adenocarcinoma (TCGA, PanCancer Atlas), the Kaplan-Meier curves for patients with PTK2 mRNA above vs below the median look slightly apart, with the high-PTK2 group doing a little worse early on. You can build this comparison in cBioPortal by querying PTK2 with an expression threshold (e.g. `PTK2: EXP>0`) and opening the Comparison → Survival tab. Continue this conversation: reply to the user's new message. is the difference in survival significant? ▶ read_guide { "uri": "cbioportal://statistical-tests-guide" } ◀ 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) ▶ resolve_and_route { "studyIds": [ "coadread_tcga_pan_can_atlas_2018" ] } ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","sampleCount":594,"studyViewUrl":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018","metadata":{"clinicalAttributeIds":["AGE","AJCC_PATHOLOGIC_TUMOR_STAGE","AJCC_STAGING_EDITION","ANEUPLOIDY_SCORE","BUFFA_HYPOXIA_SCORE","CANCER_TYPE","CANCER_TYPE_ACRONYM","CANCER_TYPE_DETAILED","DAYS_LAST_FOLLOWUP","DAYS_TO_BIRTH","DAYS_TO_INITIAL_PATHOLOGIC_DIAGNOSIS","DFS_MONTHS","DFS_STATUS","DSS_MONTHS","DSS_STATUS","ETHNICITY","FORM_COMPLETION_DATE","FRACTION_GENOME_ALTERED","GENETIC_ANCESTRY_LABEL","GRADE","HISTORY_NEOADJUVANT_TRTYN","ICD_10","ICD_O_3_HISTOLOGY","ICD_O_3_SITE","INFORMED_CONSENT_VERIFIED","IN_PANCANPATHWAYS_FREEZE","MSI_SCORE_MANTIS","MSI_SENSOR_SCORE","MUTATION_COUNT","NEW_TUMOR_EVENT_AFTER_INITIAL_TREATMENT","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER_PATIENT_ID","PATH_M_STAGE","PATH_N_STAGE","PATH_T_STAGE","PERSON_NEOPLASM_CANCER_STATUS","PFS_MONTHS","PFS_STATUS","PRIMARY_LYMPH_NODE_PRESENTATION_ASSESSMENT","PRIOR_DX","RACE","RADIATION_THERAPY","RAGNUM_HYPOXIA_SCORE","SAMPLE_COUNT","SAMPLE_TYPE","SEX","SOMATIC_STATUS","SUBTYPE","TBL_SCORE","TISSUE_PROSPECTIVE_COLLECTION_INDICATOR","TISSUE_RETROSPECTIVE_COLLECTION_INDICATOR","TISSUE_SOURCE_SITE","TISSUE_SOURCE_SITE_CODE","TMB_NONSYNONYMOUS","TUMOR_TISSUE_SITE","TUMOR_TYPE","WEIGHT","WINTER_HYPOXIA_SCORE"],"molecularProfileIds":["coadread_tcga_pan_can_atlas_2018_gistic","coadread_tcga_pan_can_atlas_2018_log2CNA","coadread_tcga_pan_can_atlas_2018_mutations","coadread_tcga_pan_can_atlas_2018_protein_quantification","coadread_tcga_pan_can_atlas_2018_protein_quantification_zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_ref_normal_Zscores","coadread_tcga_pan_can_atlas_2018_rppa","coadread_tcga_pan_can_atlas_2018_rppa_Zscores","coadread_tcga_pan_can_atlas_2018_structural_variants"],"genericAssayProfiles":["coadread_tcga_pan_can_atlas_2018_armlevel_cna","coadread_tcga_pan_can_atlas_2018_genetic_ancestry","coadread_tcga_pan_can_atlas_2018_methylation_hm27_hm450_merge","coadread_tcga_pan_can_atlas_2018_methylation_hm450"],"heatmapProfileIds":["coadread_tcga_pan_can_atlas_2018_protein_quantification_zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","coadread_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_ref_normal_Zscores","coadread_tcga_pan_can_atlas_2018_rppa_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna","protein","generic_assay_armlevel_c … (70 more chars) ▶ navigate_to_results_view { "studyIds": [ "coadread_tcga_pan_can_atlas_2018" ], "genes": [ "PTK2: EXP>0" ], "tab": "comparison/survival", "profileFilter": "rna_seq_v2_mrna_median_Zscores" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/comparison/survival?cancer_study_list=coadread_tcga_pan_can_atlas_2018&gene_list=PTK2%3A+EXP%3E0&case_set_id=coadread_tcga_pan_can_atlas_2018_all&profileFilter=rna_seq_v2_mrna_median_Zscores","url":"https://www.cbioportal.org/results/comparison/survival?cancer_study_list=coadread_tcga_pan_can_atlas_2018&gene_list=PTK2%3A+EXP%3E0&case_set_id=coadread_tcga_pan_can_atlas_2018_all&profileFilter=rna_seq_v2_mrna_median_Zscores","data":{"studyIds":["coadread_tcga_pan_can_atlas_2018"],"studies":[{"studyId":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","sampleCount":594}],"genes":["PTK2"],"caseSetId":"coadread_tcga_pan_can_atlas_2018_all","pageDescription":"Kaplan-Meier survival analysis comparing groups defined by query genes."}} ═ answer (success) I can't tell you whether the difference is significant, and I shouldn't have described the curves in my last message. I hadn't run the survival comparison, so I had no basis for saying the high-PTK2 group did "a little worse early on." Please disregard that. I also don't compute log-rank p-values, hazard ratios or median survival, and I won't estimate them. A survival difference between two groups is tested with Kaplan-Meier curves and a log-rank test. cBioPortal runs that test for you and shows the p-value on the plot. [Open the PTK2 survival comparison (TCGA colorectal, PanCancer Atlas)](https://www.cbioportal.org/results/comparison/survival?cancer_study_list=coadread_tcga_pan_can_atlas_2018&gene_list=PTK2%3A+EXP%3E0&case_set_id=coadread_tcga_pan_can_atlas_2018_all&profileFilter=rna_seq_v2_mrna_median_Zscores) - **Groups:** The link splits patients into PTK2 z-score above 0 versus the rest. - **Cutoff:** A z-score of 0 is not necessarily the median expression. That means it may not be an exact high-versus-low median split. - **Results:** The page shows the log-rank p-value and the Kaplan-Meier curves for overall survival. It also has disease-free, progression-free and disease-specific survival, so you can check whether the result depends on the endpoint. - **Confounders:** Stage and MSI status are not adjusted for, so treat any difference as unadjusted. If you want a strict median split, I can pull each patient's PTK2 expression, overall-survival time and status. You could then run `survival::survfit` and `survdiff` in R, or `lifelines` in Python, with a cutoff you choose.