Q (sonnet): In colorectal cancer do patients with microsatellite instability in the TCGA dataset have a similar prognosis as those in the MSK Gastroenterology 2020 study? ▶ 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) ▶ read_guide { "uri": "cbioportal://clinical-data-guide" } ▶ list_studies { "search": "colorectal TCGA" } ◀ result # Clinical Data Query Guide ## Overview Clinical data in cBioPortal is stored at both patient and sample levels. Understanding the distinction is crucial for accurate analysis. ## Data Organization ### Patient-Level vs Sample-Level Data - **Patient-level**: Demographics, overall survival, disease stage (stored once per patient) - **Sample-level**: Sample type, sequencing platform, purity (can have multiple per patient) ### Key Tables - `clinical_patient`: Patient-level clinical attributes - `clinical_sample`: Sample-level clinical attributes - `clinical_data_derived`: Pre-joined view combining both levels - `clinical_attribute_meta`: Metadata about available clinical attributes ## Recommended Approach: Use clinical_data_derived The `clinical_data_derived` table is pre-joined and optimized for most queries: ```sql -- Get clinical data for specific attributes SELECT sample_unique_id, patient_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name IN ('CANCER_TYPE', 'SAMPLE_TYPE', 'TMB_NONSYNONYMOUS'); ``` ## Clinical Attribute Discovery ### Use clinical_attribute_meta for Discovering Available Attributes **Always start here** to see what clinical attributes are available for a specific study: ```sql -- Discover available clinical attributes for a study SELECT attr_id, description, patient_attribute, cancer_study_id FROM clinical_attribute_meta WHERE cancer_study_id = ( SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier = 'your_study_id' ) ORDER BY patient_attribute, attr_id; ``` **Key Fields:** - **attr_id**: matches attr_id in clinical_sample/clinical_patient tables - **description**: human-readable description of the attribute - **patient_attribute**: true = patient attribute, false = sample attribute - **cancer_study_id**: links to cancer_study table (filter by study) ## Attribute Semantics and Matching ### Case-Insensitive Matching for Attribute Values Clinical values are free text across studies and may differ only by case. For example, a controlled-looking value such as germline mutation status may appear as `GERMLINE`, `Germline`, or another case variant. When filtering `clinical_data_derived.attribute_value`, use case-insensitive matching unless you have already profiled the exact values in the target study: ```sql -- Correct: case-insensitive clinical value filter SELECT DISTINCT sample_unique_id, patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name = 'MUTATION_STATUS' AND upper(attribute_value) = 'GERMLINE'; ``` Do not write `attribute_value = 'GERMLINE'` without first checking all distinct values for that attribute in the study. ### Query the Requested Attribute, Not a Proxy Do not infer one clinical attribute from a related subtype or marker. Query the actual requested attribute when it … (17073 more chars) ▶ list_studies { "search": "MSK Gastroenterology 2020" } ◀ result {"result":[{"cancer_study_identifier":"coadread_tcga","name":"Colorectal Adenocarcinoma (TCGA, Firehose Legacy)","type_of_cancer_id":"coadread","sample_count":640,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=coadread_tcga"},{"cancer_study_identifier":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","type_of_cancer_id":"coadread","sample_count":594,"has_guide":true,"url":"https://www.cbioportal.org/study/summary?id=coadread_tcga_pan_can_atlas_2018"},{"cancer_study_identifier":"coadread_tcga_pub","name":"Colorectal Adenocarcinoma (TCGA, Nature 2012)","type_of_cancer_id":"coadread","sample_count":276,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=coadread_tcga_pub"}]} ◀ result {"result":[{"cancer_study_identifier":"crc_apc_impact_2020","name":"Colorectal Cancer (MSK, Gastroenterology 2020)","type_of_cancer_id":"coadread","sample_count":471,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_apc_impact_2020"}]} ▶ clickhouse_run_select_query { "query": "SELECT cancer_study_id, attr_id, description, patient_attribute FROM clinical_attribute_meta WHERE cancer_study_id IN ( SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier IN ('coadread_tcga_pan_can_atlas_2018', 'crc_apc_impact_2020') ) AND (upper(attr_id) LIKE '%MSI%' OR upper(attr_id) LIKE '%MICROSATELLITE%') ORDER BY cancer_study_id, attr_id" } ◀ result {"rows":[{"cancer_study_id":121,"attr_id":"MSI_SCORE","description":"MSI Score","patient_attribute":0},{"cancer_study_id":121,"attr_id":"MSI_TYPE","description":"MSI Type","patient_attribute":0},{"cancer_study_id":756,"attr_id":"MSI_SCORE_MANTIS","description":"MSI Score reported by MANTIS. The suggested thresholds are MSI: >0.6, Indeterminate: 0.4-0.6 and MSS: <0.4.","patient_attribute":0},{"cancer_study_id":756,"attr_id":"MSI_SENSOR_SCORE","description":"MSI Score reported by MSIsensor. The suggested thresholds are MSI: >10, Indeterminate: 4-10 and MSS: <10.","patient_attribute":0}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_name, attribute_value, count(*) FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name IN ('MSI_TYPE','MSI_SCORE') GROUP BY attribute_name, attribute_value ORDER BY attribute_name, count(*) DESC LIMIT 30" } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_name, count(*), min(toFloat64OrNull(attribute_value)), max(toFloat64OrNull(attribute_value)) FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name IN ('MSI_SCORE_MANTIS','MSI_SENSOR_SCORE') GROUP BY attribute_name" } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": "SELECT cancer_study_id, cancer_study_identifier FROM cancer_study WHERE cancer_study_id IN (121, 756)" } ◀ result {"rows":[{"cancer_study_id":121,"cancer_study_identifier":"crc_apc_impact_2020"},{"cancer_study_id":756,"cancer_study_identifier":"coadread_tcga_pan_can_atlas_2018"}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_name, attribute_value, count(*) FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name IN ('MSI_TYPE','MSI_SCORE') GROUP BY attribute_name, attribute_value ORDER BY attribute_name, count(*) DESC LIMIT 30" } ◀ result {"rows":[{"attribute_name":"MSI_SCORE","attribute_value":"0","count()":55},{"attribute_name":"MSI_SCORE","attribute_value":"0.08","count()":20},{"attribute_name":"MSI_SCORE","attribute_value":"0.09","count()":11},{"attribute_name":"MSI_SCORE","attribute_value":"0.15","count()":10},{"attribute_name":"MSI_SCORE","attribute_value":"7.00E-02","count()":9},{"attribute_name":"MSI_SCORE","attribute_value":"0.25","count()":8},{"attribute_name":"MSI_SCORE","attribute_value":"0.34","count()":7},{"attribute_name":"MSI_SCORE","attribute_value":"0.18","count()":6},{"attribute_name":"MSI_SCORE","attribute_value":"0.55","count()":6},{"attribute_name":"MSI_SCORE","attribute_value":"0.5","count()":5},{"attribute_name":"MSI_SCORE","attribute_value":"0.32","count()":5},{"attribute_name":"MSI_SCORE","attribute_value":"0.45","count()":5},{"attribute_name":"MSI_SCORE","attribute_value":"0.14","count()":5},{"attribute_name":"MSI_SCORE","attribute_value":"0.35","count()":5},{"attribute_name":"MSI_SCORE","attribute_value":"0.26","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"1.16","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.49","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.77","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.27","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.65","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.24","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.33","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.42","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.3","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.75","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.13","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.22","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.57","count()":4},{"attribute_name":"MSI_SCORE","attribute_value":"0.89","count()":3},{"attribute_name":"MSI_SCORE","attribute_value":"0.12","count()":3}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_name, count(*), min(toFloat64OrNull(attribute_value)), max(toFloat64OrNull(attribute_value)) FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name IN ('MSI_SCORE_MANTIS','MSI_SENSOR_SCORE') GROUP BY attribute_name" } ◀ result {"rows":[{"attribute_name":"MSI_SCORE_MANTIS","count()":594,"min(toFloat64OrNull(attribute_value))":0.2513,"max(toFloat64OrNull(attribute_value))":1.3777},{"attribute_name":"MSI_SENSOR_SCORE","count()":594,"min(toFloat64OrNull(attribute_value))":0,"max(toFloat64OrNull(attribute_value))":46.78}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_value, count(*) FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name = 'MSI_TYPE' GROUP BY attribute_value ORDER BY count(*) DESC" } ◀ result {"rows":[{"attribute_value":"Stable","count()":428},{"attribute_value":"Instable","count()":27},{"attribute_value":"Indeterminate","count()":8},{"attribute_value":"Do not report","count()":7},{"count()":1}]} ▶ get_study_guide { "study_id": "coadread_tcga_pan_can_atlas_2018" } ▶ get_study_guide { "study_id": "crc_apc_impact_2020" } ◀ result # Colorectal Adenocarcinoma (TCGA, PanCancer Atlas) **Study ID:** `coadread_tcga_pan_can_atlas_2018` See `_tcga_pancan_template.md` for common TCGA clinical attributes. ## Study-Specific Attributes ### Microsatellite Instability (MSI) There is no `MSI_STATUS` attribute. Three attributes carry MSI (594 patients, one sample each): | Attribute | Definition | MSI-high count | |-----------|------------|----------------| | `SUBTYPE` | TCGA molecular classification: `COAD_MSI` 60 + `READ_MSI` 3 | **63** | | `MSI_SENSOR_SCORE` | MSIsensor score ≥10 (indeterminate 4–10: 10 more) | 78 of 584 scored | | `MSI_SCORE_MANTIS` | MANTIS score >0.4 (>0.6 = MSI: 67; 0.4–0.6 indeterminate) | 89 of 557 scored | **For "MSI-high" questions, use `SUBTYPE` IN (`COAD_MSI`, `READ_MSI`)** (the TCGA molecular classification) and state which definition you used; mention the score-based alternatives if the counts matter. Do not switch to `coadread_tcga_pub` to find MSI; this study has it. ```sql SELECT count(DISTINCT patient_unique_id) AS msi_patients -- 63 FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value IN ('COAD_MSI', 'READ_MSI'); ``` ### Molecular Classification (`SUBTYPE`, patients) `COAD_CIN` 226, `READ_CIN` 102, `COAD_MSI` 60, `COAD_GS` 49, `READ_GS` 9, `COAD_POLE` 6, `READ_POLE` 4, `READ_MSI` 3, blank 135. - **Hypermutated**: no `HYPERMUTATED` attribute. Use `SUBTYPE` MSI + POLE (73 patients), or `TMB_NONSYNONYMOUS` ≥10 (83 samples; all MSI and POLE tumors exceed it). - **CMS (consensus molecular subtypes)** are not available in this study. ### Anatomic Location There is no `TUMOR_LOCATION` attribute. - Colon vs rectum: `TUMOR_TISSUE_SITE` — Colon 436, Rectum 152, blank 6. - Subsite (for left vs right): `ICD_O_3_SITE` — right: C18.0 cecum 81, C18.2 ascending 100, C18.3 hepatic flexure 10; transverse C18.4 20; left: C18.5 splenic flexure 5, C18.6 descending 16, C18.7 sigmoid 106, C19.9 rectosigmoid 72, C20.9 rectum 81; C18.9 colon NOS 97 (side unknown). ## Key Genes | Gene | Frequency | Clinical Relevance | |------|-----------|-------------------| | APC | ~80% | Initiating event in most CRC | | TP53 | ~55% | Progression marker | | KRAS | ~40% | Predicts anti-EGFR resistance | | PIK3CA | ~15% | May predict aspirin benefit | | BRAF | ~10% | V600E poor prognosis (MSS context) | | SMAD4 | ~10% | TGF-β pathway | ## Notes - MSI-H tumors respond well to immunotherapy - KRAS/NRAS mutations contraindicate anti-EGFR therapy - BRAF V600E has different prognosis in MSI-H vs MSS context - Left vs right-sided tumors have different biology and outcomes ◀ result # Study Guide: Colorectal Cancer (MSK, Gastroenterology 2020) **Study ID:** `crc_apc_impact_2020` **Cancer Type:** coadread **Description:** Targeted sequencing of 471 unresectable colorectal tumor/normal pairs via MSK-IMPACT. ## Cohort Statistics - **Patients:** 471 - **Samples:** 472 ## Available Data Types - **COPY_NUMBER_ALTERATION**: Copy Number Alterations (MSK-IMPACT) - **MUTATION_EXTENDED**: Mutations - **STRUCTURAL_VARIANT**: Structural variants ## Gene Panels - **IMPACT410**: 239 samples - **IMPACT468**: 153 samples - **IMPACT341**: 79 samples ## Available Clinical Attributes | Attribute | Samples with Data | |-----------|------------------| | FRACTION_GENOME_ALTERED | 471 | | DIFFERENTIATION | 471 | | STAGE_AT_DIAGNOSIS | 471 | | TMB_NONSYNONYMOUS | 471 | | PRIOR_ADJUVANT_CHEMO | 471 | | FIRST_LINE_MET_TX | 471 | | TIMING_METS | 471 | | CARCINOMATOSIS | 471 | | CANCER_TYPE | 471 | | LST | 471 | | SOMATIC_STATUS | 471 | | MSI_SCORE | 471 | | ONCOTREE_CODE | 471 | | CANCER_TYPE_DETAILED | 471 | | SURGERY_PRIMARY_TUMOR | 471 | | MSI_TYPE | 471 | | APC_GROUPS | 471 | | USED_IN_GENOMIC_ANALYSIS | 471 | | MUTATION_COUNT | 471 | | TUMOR_LOCATION | 471 | ## Top Mutated Genes | Gene | Altered Samples | |------|----------------| | TP53 | 345 | | APC | 325 | | KRAS | 238 | | PIK3CA | 88 | | SMAD4 | 69 | | BRAF | 58 | | FBXW7 | 51 | | SOX9 | 39 | | RNF43 | 38 | | TCF7L2 | 36 | ## Query Tips for crc_apc_impact_2020 ```sql -- Get all samples in this study SELECT DISTINCT sample_unique_id, patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020'; -- Get mutations for a specific gene SELECT sample_unique_id, hugo_gene_symbol, mutation_variant, mutation_type FROM genomic_event_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND hugo_gene_symbol = 'TP53' AND variant_type = 'mutation'; -- Get clinical data for specific attributes SELECT sample_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name IN ('CANCER_TYPE', 'SAMPLE_TYPE', 'OS_MONTHS'); ``` ▶ clickhouse_run_select_query { "query": "SELECT attr_id, patient_attribute FROM clinical_attribute_meta WHERE cancer_study_id = (SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier = 'crc_apc_impact_2020') AND (upper(attr_id) LIKE '%OS_%' OR upper(attr_id) LIKE '%SURVIVAL%' OR upper(attr_id) LIKE '%STATUS%' OR upper(attr_id) LIKE '%VITAL%')" } ◀ result {"rows":[{"attr_id":"CARCINOMATOSIS","patient_attribute":0},{"attr_id":"OS_MONTHS","patient_attribute":1},{"attr_id":"OS_STATUS","patient_attribute":1},{"attr_id":"PFS_STATUS","patient_attribute":1},{"attr_id":"SOMATIC_STATUS","patient_attribute":0},{"attr_id":"STAGE_AT_DIAGNOSIS","patient_attribute":0}]} ▶ clickhouse_run_select_query { "query": " WITH msi AS ( SELECT DISTINCT patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value IN ('COAD_MSI','READ_MSI') ), os AS ( SELECT patient_unique_id, maxIf(toFloat64OrNull(attribute_value), attribute_name='OS_MONTHS') AS os_months, maxIf(attribute_value, attribute_name='OS_STATUS') AS os_status FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name IN ('OS_MONTHS','OS_STATUS') GROUP BY patient_unique_id ) SELECT count() AS n_patients, countIf(startsWith(os_status,'1')) AS n_events, countIf(startsWith(os_status,'0')) AS n_censored, min(os_months) AS min_followup, max(os_months) AS max_followup FROM os WHERE patient_unique_id IN (SELECT patient_unique_id FROM msi) AND os_months IS NOT NULL AND os_status != '' " } ◀ result {"rows":[{"n_patients":63,"n_events":15,"n_censored":48,"min_followup":0,"max_followup":135.6478285}]} ▶ clickhouse_run_select_query { "query": " WITH msi AS ( SELECT DISTINCT patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name = 'MSI_TYPE' AND attribute_value = 'Instable' ), os AS ( SELECT patient_unique_id, maxIf(toFloat64OrNull(attribute_value), attribute_name='OS_MONTHS') AS os_months, maxIf(attribute_value, attribute_name='OS_STATUS') AS os_status FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name IN ('OS_MONTHS','OS_STATUS') GROUP BY patient_unique_id ) SELECT count() AS n_patients, countIf(startsWith(os_status,'1')) AS n_events, countIf(startsWith(os_status,'0')) AS n_censored, min(os_months) AS min_followup, max(os_months) AS max_followup FROM os WHERE patient_unique_id IN (SELECT patient_unique_id FROM msi) AND os_months IS NOT NULL AND os_status != '' " } ◀ result {"rows":[{"n_patients":27,"n_events":15,"n_censored":12,"min_followup":2.2,"max_followup":70.9}]} ▶ clickhouse_run_select_query { "query": "SELECT DISTINCT attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_apc_impact_2020' AND attribute_name = 'OS_STATUS'" } ◀ result {"rows":[{"attribute_value":"1:DECEASED"},{"attribute_value":"0:LIVING"}]} ▶ clickhouse_run_select_query { "query": "SELECT DISTINCT attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'OS_STATUS'" } ◀ result {"rows":[{"attribute_value":"0:LIVING"},{"attribute_value":"1:DECEASED"},{}]} ▶ resolve_and_route { "studyIds": [ "coadread_tcga_pan_can_atlas_2018", "crc_apc_impact_2020" ] } ◀ result {"success":true,"message":"Found 2 matching studies. Pick the best match (prefer TCGA → prefer PanCancer Atlas), use its metadata to call the appropriate navigation tool(s) and generate URLs immediately. Present other studies as alternatives.","data":{"totalCount":2,"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_rp … (1172 more chars) ▶ navigate_to_group_comparison { "studyIds": [ "coadread_tcga_pan_can_atlas_2018" ], "groups": [ { "name": "MSI (COAD_MSI/READ_MSI)", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "SUBTYPE", "values": [ { "value": "COAD_MSI" }, { "value": "READ_MSI" } ] } ] } }, { "name": "Non-MSI subtype", "isUnselected": true } ], "tab": "survival" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10ee497aad53593c28d","url":"https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10ee497aad53593c28d","data":{"description":"Group comparison (2 custom groups)","studies":["coadread_tcga_pan_can_atlas_2018"],"totalGroups":2,"groups":[{"name":"MSI (COAD_MSI/READ_MSI)","sampleCount":63},{"name":"Non-MSI subtype","sampleCount":531}],"studyViewUrl":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018","groupUrls":[{"groupName":"MSI (COAD_MSI/READ_MSI)","url":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22SUBTYPE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22COAD_MSI%22%7D%2C%7B%22value%22%3A%22READ_MSI%22%7D%5D%7D%5D%7D"}],"pageDescription":"Kaplan-Meier survival analysis comparing MSI (COAD_MSI/READ_MSI) (63) vs Non-MSI subtype (531)."}} ▶ navigate_to_group_comparison { "studyIds": [ "crc_apc_impact_2020" ], "groups": [ { "name": "MSI-Instable", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "MSI_TYPE", "values": [ { "value": "Instable" } ] } ] } }, { "name": "MSS/Other", "isUnselected": true } ], "tab": "survival" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10fc2115c492d884e23","url":"https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10fc2115c492d884e23","data":{"description":"Group comparison (2 custom groups)","studies":["crc_apc_impact_2020"],"totalGroups":2,"groups":[{"name":"MSI-Instable","sampleCount":27},{"name":"MSS/Other","sampleCount":444}],"studyViewUrl":"https://www.cbioportal.org/study?id=crc_apc_impact_2020","groupUrls":[{"groupName":"MSI-Instable","url":"https://www.cbioportal.org/study?id=crc_apc_impact_2020#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MSI_TYPE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22Instable%22%7D%5D%7D%5D%7D"}],"pageDescription":"Kaplan-Meier survival analysis comparing MSI-Instable (27) vs MSS/Other (444)."}} ═ answer (success) ## MSI-High Colorectal Cancer: TCGA vs. MSK Gastroenterology 2020 I can't run Kaplan-Meier or a log-rank test here — that requires the portal's survival engine — but I pulled the raw follow-up data for MSI-high patients in each cohort, which already reveals an important structural difference between the two studies: ### Cohort composition differs substantially | | TCGA PanCancer Atlas (`coadread_tcga_pan_can_atlas_2018`) | MSK Gastroenterology 2020 (`crc_apc_impact_2020`) | |---|---|---| | MSI definition used | TCGA molecular `SUBTYPE` = COAD_MSI / READ_MSI | `MSI_TYPE` = "Instable" (from IMPACT panel) | | MSI-high patients | 63 of 594 (10.6%) | 27 of 471 (5.7%) | | Disease setting | Resected tumors, all stages (mostly earlier-stage, surgical cohort) | **Unresectable** tumor/normal pairs — i.e., an advanced/metastatic-disease population | ### Descriptive survival summary (MSI-high patients only, raw counts — not KM) | | TCGA MSI-high | MSK MSI-high (Instable) | |---|---|---| | N patients with OS data | 63 | 27 | | Deaths (events) | 15 | 15 | | Censored (alive at last follow-up) | 48 | 12 | | Follow-up range (months) | 0 – 135.6 | 2.2 – 70.9 | Notably, only 24% of TCGA MSI-high patients had died by last follow-up, versus 56% of MSK MSI-high patients. Because fewer than half the TCGA MSI-high group had an event, the Kaplan-Meier median OS for that group is **likely not reached**, while MSK's group has enough events for a more stable median estimate — but this is a crude signal, not a formal comparison. **This gap almost certainly reflects study design, not necessarily prognostic biology of MSI itself:** the MSK cohort was explicitly selected to be **unresectable** colorectal cancer (i.e., a more advanced-disease, generally worse-prognosis population by design), whereas TCGA is a resected-tumor cohort spanning all stages. So even if MSI-high tumors have similar intrinsic biology in both, the "prognosis" observed will differ because the two cohorts represent different points in the disease course, not a like-for-like population. To formally test whether the two MSI-high populations have statistically comparable survival, run a log-rank test on these two groups. I've set up both cohorts' Kaplan-Meier views: - [TCGA CRC — MSI-high vs. non-MSI subtype (Survival)](https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10ee497aad53593c28d) — MSI 63 vs. Non-MSI 531 patients - [MSK Gastroenterology 2020 — MSI-Instable vs. MSS/Other (Survival)](https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d10fc2115c492d884e23) — MSI-Instable 27 vs. MSS/Other 444 patients Each link opens directly to the KM curve and log-rank p-value for that cohort. Because the two studies use different MSI-calling methods, different gene panels, and — most importantly — different disease stages/settings (resectable vs. unresectable), any difference you see between the two curves conflates MSI biology with cohort/stage selection. A rigorous cross-cohort comparison would need to control for stage/resectability, which isn't something these tools can adjust for automatically.