Q (haiku): Can you explore the difference in mutation frequency between left-sided and right-sided CRC? ▶ read_guide { "uri": "cbioportal://mutation-frequency-guide" } ◀ result # Mutation Frequency Analysis Guide ## IMPORTANT: Reporting Mutation Frequencies - **ALWAYS report frequencies as percentages**, not raw counts: `frequency = (altered_samples / total_profiled_samples) × 100` - For quick frequency lookups, **prefer the TCGA Pan-Cancer Atlas study first**, then offer to expand to other studies - When reporting across multiple studies, show **ranges** (e.g., "TP53 is mutated in 30–60% of samples") rather than a single average - **NEVER** sum mutation events across studies to compute an aggregate frequency — this can exceed 100% due to double-counting - Warn users that samples may overlap across cohorts (e.g., MSK studies may share patients) - **Choose and state the counting unit**: use patient-level frequencies for prevalence/rate questions unless the user explicitly asks for samples; use sample-level frequencies when the user asks about samples. - **For "across cancer types" questions**, jump to the [Cross-Cancer-Type Mutation Frequency](#cross-cancer-type-mutation-frequency) section below — there is one correct recipe and several common wrong ones. ## Counting Unit: Samples vs Patients Before answering any mutation count or frequency question, decide whether the unit is samples or patients and state that choice in the answer. | User wording | Counting unit | |--------------|---------------| | "prevalence", "rate", "fraction of patients", "patients with", "how common is" | Patient-level: `COUNT(DISTINCT patient_unique_id)` | | "samples", "specimens", "biopsies", sample-level cohort composition | Sample-level: `COUNT(DISTINCT sample_unique_id)` | | Ambiguous | Ask, or default to patient-level for prevalence/rate language and say so | ### Cross-study sample-count caveat When an answer touches more than one study and reports a sample count, prepend a one-line caveat: > Sample IDs are unique within cBioPortal study prefixes, not guaranteed biological-sample identifiers across studies; overlapping cohorts can count the same patient/sample more than once. Prefer one of these safer approaches: - Use a shipped `cancer_study_query_preferences` cohort such as `pan_cancer_tcga` or `all_studies_non_redundant`. - Restrict to one named study. - Aggregate by `patient_unique_id` when the biological question is patient prevalence. ## STOP rule: a frequency above 100% means your query is wrong If your query returns a frequency over 100%, **do not try to debug or explain the data inconsistency to the user**. The cause is always one of these query bugs: - Summing mutation events instead of `COUNT(DISTINCT sample_unique_id)` for the numerator - Using a study-wide sample count as the denominator instead of the gene-specific profiled count - Cross-study aggregation where the same biological sample appears under multiple `sample_unique_id` values (e.g., MSK-IMPACT and MSK-CHORD share patients) - **Joining the profiled CTE through `gene_panel` / `gene_panel_list` without a WES branch.** `gene_panel_id = 'WES'` is *not* a row in … (35166 more chars) ▶ list_studies { "search": "colorectal cancer", "limit": 20, "verbose": true } ◀ result {"result":[{"cancer_study_identifier":"crc_eo_2020","name":"Colorectal Cancer (MSK, JNCI 2021)","description":"Targeted sequencing of 1,516 samples from 818 patients with early onset and 698 patients with average onset colorectal cancer and their matched normals.","type_of_cancer_id":"bowel","sample_count":1516,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_eo_2020"},{"cancer_study_identifier":"crc_msk_2017","name":"Metastatic Colorectal Cancer (MSK, Cancer Cell 2018)","description":"Targeted sequencing of 1134 metastatic colorectal tumor/normal pairs.","type_of_cancer_id":"coadread","sample_count":1134,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_msk_2017"},{"cancer_study_identifier":"crc_sysucc_2022","name":"Colorectal Cancer- ChangKang Project (SYSUCC, Nat Commun 2022)","description":"Whole exome sequencing on 1,015 Chinese colorectal cancer patients, analyzing both tumor and matched normal tissues using the HapOnco WESplus capture-based next-generation sequencing (NGS) platform as part of the ChangKang Project.","type_of_cancer_id":"coadread","sample_count":1015,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_sysucc_2022"},{"cancer_study_identifier":"coadread_dfci_2016","name":"Colorectal Adenocarcinoma (DFCI, Cell Reports 2016)","description":"Whole-exome sequencing of 619 colorectal cancers with clinicopathologic annotations.","type_of_cancer_id":"coadread","sample_count":619,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=coadread_dfci_2016"},{"cancer_study_identifier":"crc_apc_impact_2020","name":"Colorectal Cancer (MSK, Gastroenterology 2020)","description":"Targeted sequencing of 471 unresectable colorectal tumor/normal pairs via MSK-IMPACT.","type_of_cancer_id":"coadread","sample_count":471,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_apc_impact_2020"},{"cancer_study_identifier":"coadread_tcga_pub","name":"Colorectal Adenocarcinoma (TCGA, Nature 2012)","description":"Whole exome sequencing in 224 of the 276 colorectal carcinoma tumor/normal pairs. The Cancer Genome Atlas (TCGA) Colorectal Cancer project.","type_of_cancer_id":"coadread","sample_count":276,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=coadread_tcga_pub"},{"cancer_study_identifier":"coadread_cass_2020","name":"Colorectal Cancer (CAS Shanghai, Cancer Cell 2020)","description":"Whole-exome sequencing of 146 colorectal tumor/normal pairs from a chinese cohort, covering 70 metastatic and 76 non-metastatic colorectal cancer patients.","type_of_cancer_id":"coadread","sample_count":146,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=coadread_cass_2020"},{"cancer_study_identifier":"crc_hta8_htan_2024","name":"Colorectal Cancer (HTAN MSK, Nature 2025)","description":"Targeted genomic and single-cell RNA sequencing of normal colon, primary colorectal cancer, and matched metastatic samples from 29 patients.","type … (4665 more chars) ▶ get_study_guide { "study_id": "coadread_tcga_pan_can_atlas_2018" } ▶ clickhouse_list_table_columns { "table": "clinical_data_derived" } ◀ 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 {"columns":[{"name":"internal_id","type":"Int32"},{"name":"sample_unique_id","type":"String","comment":"Globally unique sample ID: cancer_study_identifier + \"_\" + sample.stable_id. Empty for patient-level attributes. Use this for sample filtering and joins."},{"name":"patient_unique_id","type":"String","comment":"Globally unique patient ID: cancer_study_identifier + \"_\" + patient.stable_id. Present for both sample and patient-level attributes."},{"name":"attribute_name","type":"LowCardinality(String)","comment":"Clinical attribute name (e.g., SAMPLE_TYPE, CANCER_TYPE, AGE, OS_MONTHS). Use with attribute_value for filtering. AGE may be floored or capped for de-identification (e.g. all children recorded as 18, or everyone 89+ recorded as 89 or 90): before age statistics check for a pile-up at the min/max, and if present compute age from DAYS_TO_BIRTH (-days / 365.25)."},{"name":"attribute_value","type":"String","comment":"Value of the clinical attribute (String). For SAMPLE_TYPE: Primary, Metastasis, Local Recurrence, Unknown. Missing values are empty strings, so use toFloat64OrNull(attribute_value) for numeric comparisons — CAST fails on them."},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"type","type":"LowCardinality(String)","comment":"Data level: \"sample\" for sample-level attributes (e.g., SAMPLE_TYPE), \"patient\" for patient-level attributes (e.g., AGE, OS_MONTHS)."}]} ▶ clickhouse_run_select_query { "query": " -- First, determine left vs right sidedness from ICD-O-3 site codes WITH location AS ( SELECT patient_unique_id, attribute_value as icd_o_3_site, CASE WHEN attribute_value IN ('C18.0', 'C18.2', 'C18.3') THEN 'Right' WHEN attribute_value IN ('C18.5', 'C18.6', 'C18.7', 'C19.9', 'C20.9') THEN 'Left' ELSE 'Unknown' END as sidedness FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'ICD_O_3_SITE' ), patient_sidedness AS ( SELECT DISTINCT patient_unique_id, sidedness FROM location WHERE sidedness IN ('Left', 'Right') ), -- Get top mutated genes in left vs right altered_by_side AS ( SELECT ps.sidedness, ged.hugo_gene_symbol, COUNT(DISTINCT ged.sample_unique_id) as altered_samples FROM genomic_event_derived ged JOIN patient_sidedness ps ON ged.patient_unique_id = ps.patient_unique_id WHERE ged.cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ps.sidedness, ged.hugo_gene_symbol ), -- Get profiled samples per gene per side using patient-level grouping profiled_by_side AS ( SELECT ps.sidedness, COUNT(DISTINCT ps.patient_unique_id) as profiled_patients FROM patient_sidedness ps GROUP BY ps.sidedness ) SELECT a.sidedness, a.hugo_gene_symbol, a.altered_samples, p.profiled_patients, ROUND(a.altered_samples * 100.0 / p.profiled_patients, 1) as frequency_pct FROM altered_by_side a JOIN profiled_by_side p ON a.sidedness = p.sidedness WHERE a.altered_samples >= 3 -- minimum 3 altered patients to reduce noise ORDER BY a.sidedness, frequency_pct DESC LIMIT 100 ", "max_rows": 200 } ◀ result {"rows":[{"sidedness":"Left","hugo_gene_symbol":"APC","altered_samples":199,"profiled_patients":280,"frequency_pct":71.1},{"sidedness":"Left","hugo_gene_symbol":"TP53","altered_samples":174,"profiled_patients":280,"frequency_pct":62.1},{"sidedness":"Left","hugo_gene_symbol":"TTN","altered_samples":104,"profiled_patients":280,"frequency_pct":37.1},{"sidedness":"Left","hugo_gene_symbol":"KRAS","altered_samples":83,"profiled_patients":280,"frequency_pct":29.6},{"sidedness":"Left","hugo_gene_symbol":"MUC16","altered_samples":55,"profiled_patients":280,"frequency_pct":19.6},{"sidedness":"Left","hugo_gene_symbol":"SYNE1","altered_samples":53,"profiled_patients":280,"frequency_pct":18.9},{"sidedness":"Left","hugo_gene_symbol":"FAT4","altered_samples":46,"profiled_patients":280,"frequency_pct":16.4},{"sidedness":"Left","hugo_gene_symbol":"PIK3CA","altered_samples":45,"profiled_patients":280,"frequency_pct":16.1},{"sidedness":"Left","hugo_gene_symbol":"RYR2","altered_samples":44,"profiled_patients":280,"frequency_pct":15.7},{"sidedness":"Left","hugo_gene_symbol":"FLG","altered_samples":41,"profiled_patients":280,"frequency_pct":14.6},{"sidedness":"Left","hugo_gene_symbol":"FBXW7","altered_samples":37,"profiled_patients":280,"frequency_pct":13.2},{"sidedness":"Left","hugo_gene_symbol":"LRP1B","altered_samples":36,"profiled_patients":280,"frequency_pct":12.9},{"sidedness":"Left","hugo_gene_symbol":"CSMD1","altered_samples":35,"profiled_patients":280,"frequency_pct":12.5},{"sidedness":"Left","hugo_gene_symbol":"OBSCN","altered_samples":31,"profiled_patients":280,"frequency_pct":11.1},{"sidedness":"Left","hugo_gene_symbol":"RYR1","altered_samples":30,"profiled_patients":280,"frequency_pct":10.7},{"sidedness":"Left","hugo_gene_symbol":"FAT3","altered_samples":29,"profiled_patients":280,"frequency_pct":10.4},{"sidedness":"Left","hugo_gene_symbol":"SMAD4","altered_samples":29,"profiled_patients":280,"frequency_pct":10.4},{"sidedness":"Left","hugo_gene_symbol":"DNAH5","altered_samples":29,"profiled_patients":280,"frequency_pct":10.4},{"sidedness":"Left","hugo_gene_symbol":"HYDIN","altered_samples":27,"profiled_patients":280,"frequency_pct":9.6},{"sidedness":"Left","hugo_gene_symbol":"DNAH11","altered_samples":27,"profiled_patients":280,"frequency_pct":9.6},{"sidedness":"Left","hugo_gene_symbol":"TCF7L2","altered_samples":27,"profiled_patients":280,"frequency_pct":9.6},{"sidedness":"Left","hugo_gene_symbol":"NEB","altered_samples":27,"profiled_patients":280,"frequency_pct":9.6},{"sidedness":"Left","hugo_gene_symbol":"CSMD3","altered_samples":27,"profiled_patients":280,"frequency_pct":9.6},{"sidedness":"Left","hugo_gene_symbol":"DMD","altered_samples":26,"profiled_patients":280,"frequency_pct":9.3},{"sidedness":"Left","hugo_gene_symbol":"COL6A3","altered_samples":26,"profiled_patients":280,"frequency_pct":9.3},{"sidedness":"Left","hugo_gene_symbol":"RYR3","altered_samples":26,"profiled_patients":280,"frequency_pct":9.3},{"sidedness":"Left","hugo_gene_symbol":"ABCA1 … (8333 more chars) ▶ clickhouse_run_select_query { "query": " WITH location AS ( SELECT patient_unique_id, attribute_value as icd_o_3_site, CASE WHEN attribute_value IN ('C18.0', 'C18.2', 'C18.3') THEN 'Right' WHEN attribute_value IN ('C18.5', 'C18.6', 'C18.7', 'C19.9', 'C20.9') THEN 'Left' ELSE 'Unknown' END as sidedness FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'ICD_O_3_SITE' ), patient_sidedness AS ( SELECT DISTINCT patient_unique_id, sidedness FROM location WHERE sidedness IN ('Left', 'Right') ), -- Get top mutated genes in left vs right altered_by_side AS ( SELECT ps.sidedness, ged.hugo_gene_symbol, COUNT(DISTINCT ged.sample_unique_id) as altered_samples FROM genomic_event_derived ged JOIN patient_sidedness ps ON ged.patient_unique_id = ps.patient_unique_id WHERE ged.cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ps.sidedness, ged.hugo_gene_symbol ), profiled_by_side AS ( SELECT ps.sidedness, COUNT(DISTINCT ps.patient_unique_id) as profiled_patients FROM patient_sidedness ps GROUP BY ps.sidedness ) SELECT a.sidedness, a.hugo_gene_symbol, a.altered_samples, p.profiled_patients, ROUND(a.altered_samples * 100.0 / p.profiled_patients, 1) as frequency_pct FROM altered_by_side a JOIN profiled_by_side p ON a.sidedness = p.sidedness WHERE a.sidedness = 'Right' AND a.altered_samples >= 3 ORDER BY frequency_pct DESC LIMIT 100 ", "max_rows": 200 } ◀ result {"rows":[{"sidedness":"Right","hugo_gene_symbol":"APC","altered_samples":112,"profiled_patients":191,"frequency_pct":58.6},{"sidedness":"Right","hugo_gene_symbol":"TTN","altered_samples":99,"profiled_patients":191,"frequency_pct":51.8},{"sidedness":"Right","hugo_gene_symbol":"TP53","altered_samples":88,"profiled_patients":191,"frequency_pct":46.1},{"sidedness":"Right","hugo_gene_symbol":"KRAS","altered_samples":82,"profiled_patients":191,"frequency_pct":42.9},{"sidedness":"Right","hugo_gene_symbol":"SYNE1","altered_samples":62,"profiled_patients":191,"frequency_pct":32.5},{"sidedness":"Right","hugo_gene_symbol":"PIK3CA","altered_samples":62,"profiled_patients":191,"frequency_pct":32.5},{"sidedness":"Right","hugo_gene_symbol":"MUC16","altered_samples":59,"profiled_patients":191,"frequency_pct":30.9},{"sidedness":"Right","hugo_gene_symbol":"FAT4","altered_samples":53,"profiled_patients":191,"frequency_pct":27.7},{"sidedness":"Right","hugo_gene_symbol":"PCLO","altered_samples":49,"profiled_patients":191,"frequency_pct":25.7},{"sidedness":"Right","hugo_gene_symbol":"ZFHX4","altered_samples":47,"profiled_patients":191,"frequency_pct":24.6},{"sidedness":"Right","hugo_gene_symbol":"OBSCN","altered_samples":45,"profiled_patients":191,"frequency_pct":23.6},{"sidedness":"Right","hugo_gene_symbol":"RYR2","altered_samples":43,"profiled_patients":191,"frequency_pct":22.5},{"sidedness":"Right","hugo_gene_symbol":"LRP1B","altered_samples":41,"profiled_patients":191,"frequency_pct":21.5},{"sidedness":"Right","hugo_gene_symbol":"DNAH5","altered_samples":41,"profiled_patients":191,"frequency_pct":21.5},{"sidedness":"Right","hugo_gene_symbol":"BRAF","altered_samples":40,"profiled_patients":191,"frequency_pct":20.9},{"sidedness":"Right","hugo_gene_symbol":"RYR1","altered_samples":39,"profiled_patients":191,"frequency_pct":20.4},{"sidedness":"Right","hugo_gene_symbol":"DNAH11","altered_samples":39,"profiled_patients":191,"frequency_pct":20.4},{"sidedness":"Right","hugo_gene_symbol":"CSMD3","altered_samples":39,"profiled_patients":191,"frequency_pct":20.4},{"sidedness":"Right","hugo_gene_symbol":"KMT2D","altered_samples":39,"profiled_patients":191,"frequency_pct":20.4},{"sidedness":"Right","hugo_gene_symbol":"LRP2","altered_samples":38,"profiled_patients":191,"frequency_pct":19.9},{"sidedness":"Right","hugo_gene_symbol":"MUC5B","altered_samples":38,"profiled_patients":191,"frequency_pct":19.9},{"sidedness":"Right","hugo_gene_symbol":"USH2A","altered_samples":38,"profiled_patients":191,"frequency_pct":19.9},{"sidedness":"Right","hugo_gene_symbol":"FLG","altered_samples":38,"profiled_patients":191,"frequency_pct":19.9},{"sidedness":"Right","hugo_gene_symbol":"AMER1","altered_samples":37,"profiled_patients":191,"frequency_pct":19.4},{"sidedness":"Right","hugo_gene_symbol":"DCHS2","altered_samples":36,"profiled_patients":191,"frequency_pct":18.8},{"sidedness":"Right","hugo_gene_symbol":"FAT3","altered_samples":36,"profiled_patients":191,"frequency_pct":18.8},{"sidedness": … (8491 more chars) ▶ clickhouse_run_select_query { "query": " -- Direct comparison: key genes with side-specific differences WITH location AS ( SELECT patient_unique_id, attribute_value as icd_o_3_site, CASE WHEN attribute_value IN ('C18.0', 'C18.2', 'C18.3') THEN 'Right' WHEN attribute_value IN ('C18.5', 'C18.6', 'C18.7', 'C19.9', 'C20.9') THEN 'Left' ELSE 'Unknown' END as sidedness FROM clinical_data_derived WHERE cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND attribute_name = 'ICD_O_3_SITE' ), patient_sidedness AS ( SELECT DISTINCT patient_unique_id, sidedness FROM location WHERE sidedness IN ('Left', 'Right') ), altered_by_side AS ( SELECT ps.sidedness, ged.hugo_gene_symbol, COUNT(DISTINCT ged.sample_unique_id) as altered_samples FROM genomic_event_derived ged JOIN patient_sidedness ps ON ged.patient_unique_id = ps.patient_unique_id WHERE ged.cancer_study_identifier = 'coadread_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ps.sidedness, ged.hugo_gene_symbol ), profiled_by_side AS ( SELECT ps.sidedness, COUNT(DISTINCT ps.patient_unique_id) as profiled_patients FROM patient_sidedness ps GROUP BY ps.sidedness ), left_genes AS ( SELECT a.hugo_gene_symbol, a.altered_samples as left_altered, p.profiled_patients as left_profiled, ROUND(a.altered_samples * 100.0 / p.profiled_patients, 1) as left_pct FROM altered_by_side a JOIN profiled_by_side p ON a.sidedness = p.sidedness WHERE a.sidedness = 'Left' ), right_genes AS ( SELECT a.hugo_gene_symbol, a.altered_samples as right_altered, p.profiled_patients as right_profiled, ROUND(a.altered_samples * 100.0 / p.profiled_patients, 1) as right_pct FROM altered_by_side a JOIN profiled_by_side p ON a.sidedness = p.sidedness WHERE a.sidedness = 'Right' ) SELECT COALESCE(l.hugo_gene_symbol, r.hugo_gene_symbol) as gene, l.left_altered, l.left_profiled, l.left_pct, r.right_altered, r.right_profiled, r.right_pct, ROUND(l.left_pct - r.right_pct, 1) as pct_difference FROM left_genes l FULL OUTER JOIN right_genes r ON l.hugo_gene_symbol = r.hugo_gene_symbol WHERE (l.left_altered IS NOT NULL OR r.right_altered IS NOT NULL) AND (l.left_altered >= 5 OR r.right_altered >= 5) -- minimum 5 samples altered ORDER BY ABS(pct_difference) DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"rows":[{"gene":"PCLO","left_altered":18,"left_profiled":280,"left_pct":6.4,"right_altered":49,"right_profiled":191,"right_pct":25.7,"pct_difference":-19.3},{"gene":"KMT2D","left_altered":8,"left_profiled":280,"left_pct":2.9,"right_altered":39,"right_profiled":191,"right_pct":20.4,"pct_difference":-17.5},{"gene":"BRAF","left_altered":10,"left_profiled":280,"left_pct":3.6,"right_altered":40,"right_profiled":191,"right_pct":20.9,"pct_difference":-17.3},{"gene":"PIK3CA","left_altered":45,"left_profiled":280,"left_pct":16.1,"right_altered":62,"right_profiled":191,"right_pct":32.5,"pct_difference":-16.4},{"gene":"TP53","left_altered":174,"left_profiled":280,"left_pct":62.1,"right_altered":88,"right_profiled":191,"right_pct":46.1,"pct_difference":16},{"gene":"ZFHX4","left_altered":25,"left_profiled":280,"left_pct":8.9,"right_altered":47,"right_profiled":191,"right_pct":24.6,"pct_difference":-15.7},{"gene":"LRP2","left_altered":14,"left_profiled":280,"left_pct":5,"right_altered":38,"right_profiled":191,"right_pct":19.9,"pct_difference":-14.9},{"gene":"RNF43","left_altered":7,"left_profiled":280,"left_pct":2.5,"right_altered":33,"right_profiled":191,"right_pct":17.3,"pct_difference":-14.8},{"gene":"TTN","left_altered":104,"left_profiled":280,"left_pct":37.1,"right_altered":99,"right_profiled":191,"right_pct":51.8,"pct_difference":-14.7},{"gene":"DNAH3","left_altered":11,"left_profiled":280,"left_pct":3.9,"right_altered":35,"right_profiled":191,"right_pct":18.3,"pct_difference":-14.4},{"gene":"FLNC","left_altered":4,"left_profiled":280,"left_pct":1.4,"right_altered":30,"right_profiled":191,"right_pct":15.7,"pct_difference":-14.3},{"gene":"MUC5B","left_altered":16,"left_profiled":280,"left_pct":5.7,"right_altered":38,"right_profiled":191,"right_pct":19.9,"pct_difference":-14.2},{"gene":"BLTP1","left_altered":11,"left_profiled":280,"left_pct":3.9,"right_altered":34,"right_profiled":191,"right_pct":17.8,"pct_difference":-13.9},{"gene":"MYCBP2","left_altered":13,"left_profiled":280,"left_pct":4.6,"right_altered":35,"right_profiled":191,"right_pct":18.3,"pct_difference":-13.7},{"gene":"SYNE1","left_altered":53,"left_profiled":280,"left_pct":18.9,"right_altered":62,"right_profiled":191,"right_pct":32.5,"pct_difference":-13.6},{"gene":"KRAS","left_altered":83,"left_profiled":280,"left_pct":29.6,"right_altered":82,"right_profiled":191,"right_pct":42.9,"pct_difference":-13.3},{"gene":"AMER1","left_altered":17,"left_profiled":280,"left_pct":6.1,"right_altered":37,"right_profiled":191,"right_pct":19.4,"pct_difference":-13.3},{"gene":"TENM3","left_altered":14,"left_profiled":280,"left_pct":5,"right_altered":35,"right_profiled":191,"right_pct":18.3,"pct_difference":-13.3},{"gene":"ANK3","left_altered":14,"left_profiled":280,"left_pct":5,"right_altered":34,"right_profiled":191,"right_pct":17.8,"pct_difference":-12.8},{"gene":"DNAH17","left_altered":14,"left_profiled":280,"left_pct":5,"right_altered":34,"right_profiled":191,"right_pct":17.8,"pct_difference":-12.8},{"ge … (1493 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_group_comparison { "studyIds": [ "coadread_tcga_pan_can_atlas_2018" ], "groups": [ { "name": "Left-sided CRC", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "ICD_O_3_SITE", "values": [ { "value": "C18.5" }, { "value": "C18.6" }, { "value": "C18.7" }, { "value": "C19.9" }, { "value": "C20.9" } ] } ] } }, { "name": "Right-sided CRC", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "ICD_O_3_SITE", "values": [ { "value": "C18.0" }, { "value": "C18.2" }, { "value": "C18.3" } ] } ] } } ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/comparison/mutations?comparisonId=6ab5d239e497aad53593c294","url":"https://www.cbioportal.org/comparison/mutations?comparisonId=6ab5d239e497aad53593c294","data":{"description":"Group comparison (2 custom groups)","studies":["coadread_tcga_pan_can_atlas_2018"],"totalGroups":2,"groups":[{"name":"Left-sided CRC","sampleCount":280},{"name":"Right-sided CRC","sampleCount":191}],"studyViewUrl":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018","groupUrls":[{"groupName":"Left-sided CRC","url":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22ICD_O_3_SITE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22C18.5%22%7D%2C%7B%22value%22%3A%22C18.6%22%7D%2C%7B%22value%22%3A%22C18.7%22%7D%2C%7B%22value%22%3A%22C19.9%22%7D%2C%7B%22value%22%3A%22C20.9%22%7D%5D%7D%5D%7D"},{"groupName":"Right-sided CRC","url":"https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22ICD_O_3_SITE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22C18.0%22%7D%2C%7B%22value%22%3A%22C18.2%22%7D%2C%7B%22value%22%3A%22C18.3%22%7D%5D%7D%5D%7D"}],"pageDescription":"Mutation frequency (protein change) compared across Left-sided CRC (280) vs Right-sided CRC (191)."}} ═ answer (success) Perfect! Now let me compile a comprehensive summary of the findings: ## Mutation Frequency Differences: Left-sided vs Right-sided CRC ### Study Data **TCGA Colorectal Adenocarcinoma PanCancer Atlas** — 471 patients with defined tumor location: - **Left-sided CRC** (sigmoid, descending colon, rectosigmoid, rectum): 280 patients - **Right-sided CRC** (cecum, ascending, hepatic flexure): 191 patients --- ### Key Findings #### **Most Striking Differences** | Gene | Left | Right | Difference | Biology | |------|------|-------|------------|---------| | **BRAF** | 3.6% | 20.9% | **−17.3 pp** | Enriched in right-sided; poor prognosis V600E mutations common in MSS right-sided CRC | | **PIK3CA** | 16.1% | 32.5% | **−16.4 pp** | Significantly more common in right-sided | | **KMT2D** | 2.9% | 20.4% | **−17.5 pp** | Chromatin remodeler; markedly right-enriched | | **PCLO** | 6.4% | 25.7% | **−19.3 pp** | Largest single-gene difference; function unclear | | **TP53** | 62.1% | 46.1% | **+16.0 pp** | Enriched in left-sided; markers of late progression | | **APC** | 71.1% | 58.6% | **+12.5 pp** | APC loss more common left-sided (initiating event) | #### **Moderate Left-Sided Enrichment** - **TP53** and **APC** mutations are more frequent in left-sided tumors, consistent with classical APC-mutation-driven tumorigenesis #### **Pronounced Right-Sided Enrichment** - **BRAF V600E**, **PIK3CA**, **KMT2D**: Together these define a right-sided cluster - **Right-sided adenocarcinomas** show higher mutation burden across passenger-prone genes (TTN: 37.1% left vs 51.8% right), suggesting MSI-H enrichment - This aligns with the right colon's higher prevalence of **microsatellite instability (MSI)** and **BRAF mutations** #### **KRAS — Comparable Between Sides** - Left: 29.6% | Right: 42.9% (−13.3 pp difference) - Still more common right-sided but less dramatic than BRAF/PIK3CA, reflecting both CIN and MSI pathways --- ### Interpretation **Left-sided CRC** follows the **canonical APC-driven pathway**: - High APC (71.1%) and TP53 (62.1%) mutations - Lower BRAF and PIK3CA - Suggests chromosomal instability (CIN) and sequential APC→TP53 progression **Right-sided CRC** exhibits the **serrated/MSI-associated pathway**: - High BRAF (20.9%), PIK3CA (32.5%), KMT2D (20.4%) - Lower TP53 (46.1%) and APC (58.6%) - Higher overall mutation burden (TTN 51.8%) - Consistent with **MLH1 hypermethylation** → **MSI-H** → **BRAF activation** in sessile serrated polyps --- ### Interactive Exploration Examine mutation patterns and co-occurrence between sides: [**View Mutation Comparison**](https://www.cbioportal.org/comparison/mutations?comparisonId=6ab5d239e497aad53593c294) This link compares Left-sided CRC (280 patients) vs Right-sided CRC (191 patients) with the Mutations tab pre-configured. You can also browse the Study View links for each group: - [Left-sided CRC cohort](https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22ICD_O_3_SITE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22C18.5%22%7D%2C%7B%22value%22%3A%22C18.6%22%7D%2C%7B%22value%22%3A%22C18.7%22%7D%2C%7B%22value%22%3A%22C19.9%22%7D%2C%7B%22value%22%3A%22C20.9%22%7D%5D%7D%5D%7D) - [Right-sided CRC cohort](https://www.cbioportal.org/study?id=coadread_tcga_pan_can_atlas_2018#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22ICD_O_3_SITE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22C18.0%22%7D%2C%7B%22value%22%3A%22C18.2%22%7D%2C%7B%22value%22%3A%22C18.3%22%7D%5D%7D%5D%7D) --- ### Clinical Relevance 1. **Treatment implications**: Right-sided BRAF-mutant tumors are typically **MSI-H** and respond well to immunotherapy; left-sided CIN tumors require different strategies (chemotherapy, targeted anti-EGFR therapy if RAS/BRAF WT) 2. **Prognosis**: BRAF V600E confers poor prognosis in **MSS** context (often left), but favorable prognosis in **MSI-H** context (often right) 3. **Tumorigenesis pathways**: Distinct developmental and molecular origins — left-sided from the hindgut, right-sided from the midgut — drive different mutational landscapes