Q (haiku): What are the most frequently mutated genes in copy-number high subtype endometrial cancers compared to other subtypes? ▶ 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": "endometrial", "limit": 20, "verbose": true } ◀ result {"result":[{"cancer_study_identifier":"ucec_ancestry_cds_msk_2023","name":"Endometrial Cancer (MSK, Cancer Discovery 2023)","description":"Targeted sequencing of 1882 endometrial cancers and their matched normals via MSK-IMPACT.","type_of_cancer_id":"ucec","sample_count":1882,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_ancestry_cds_msk_2023"},{"cancer_study_identifier":"ucec_tcga","name":"Uterine Corpus Endometrial Carcinoma (TCGA, Firehose Legacy)","description":"TCGA Uterine Corpus Endometrial Carcinoma. Source data from GDAC Firehose. Previously known as TCGA Provisional.","type_of_cancer_id":"ucec","sample_count":549,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_tcga"},{"cancer_study_identifier":"ucec_tcga_gdc","name":"Endometrial Carcinoma (TCGA GDC, 2025)","description":"TCGA Endometrial Carcinoma. Source data from NCI GDC and generated in Aug 2025 using Cancer Data Aggregator.","type_of_cancer_id":"ucec","sample_count":547,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_tcga_gdc"},{"cancer_study_identifier":"ucec_tcga_pan_can_atlas_2018","name":"Uterine Corpus Endometrial Carcinoma (TCGA, PanCancer Atlas)","description":"Uterine Corpus Endometrial Carcinoma TCGA PanCancer data. The original data is here. The publications are here.","type_of_cancer_id":"ucec","sample_count":529,"has_guide":true,"url":"https://www.cbioportal.org/study/summary?id=ucec_tcga_pan_can_atlas_2018"},{"cancer_study_identifier":"ucec_tcga_pub","name":"Uterine Corpus Endometrial Carcinoma (TCGA, Nature 2013)","description":"Whole exome sequencing of 373 endometrial carcinoma tumors with matched normals. TCGA Uterine Corpus Endometrial Carcinoma project; raw data at the NCI.","type_of_cancer_id":"ucec","sample_count":373,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_tcga_pub"},{"cancer_study_identifier":"ucec_msk_2018","name":"Endometrial Cancer (MSK, 2018)","description":"MSK-IMPACT sequencing of 197 advanced-staged endometrial cancer tumor samples with matched normals, from 189 patients treated at MSK.","type_of_cancer_id":"ucec","sample_count":197,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_msk_2018"},{"cancer_study_identifier":"ucec_ccr_msk_2022","name":"Endometrial Carcinoma MSI (MSK, Clin Cancer Res 2022)","description":"Clinical and genetic features of microsatellite instability-high endometrial cancers harboring germline or somatic mutations in MMR genes or MLH1 promoter hypermethylation.","type_of_can … (2671 more chars) ▶ get_study_guide { "study_id": "ucec_tcga_pan_can_atlas_2018" } ▶ clickhouse_list_table_columns { "table": "clinical_data_derived" } ◀ result # Uterine Corpus Endometrial Carcinoma (TCGA, PanCancer Atlas) **Study ID:** `ucec_tcga_pan_can_atlas_2018` See `_tcga_pancan_template.md` for common TCGA clinical attributes. ## Study-Specific Attributes ### Molecular Classification (TCGA) | Attribute | Description | Values (patients) | |-----------|-------------|--------| | `SUBTYPE` | TCGA molecular subtype | `UCEC_CN_HIGH` 163, `UCEC_MSI` 148, `UCEC_CN_LOW` 147, `UCEC_POLE` 49, blank 22 | ### Histology There is no `HISTOLOGICAL_TYPE` attribute; use `CANCER_TYPE_DETAILED`, plus `GRADE` for grade. | Attribute | Values (samples) | |-----------|--------| | `CANCER_TYPE_DETAILED` | Uterine Endometrioid Carcinoma 399, Uterine Serous Carcinoma/Uterine Papillary Serous Carcinoma 109, Uterine Mixed Endometrial Carcinoma 21 | | `GRADE` | G3 302, G2 119, G1 97, High Grade 11 | `AJCC_PATHOLOGIC_TUMOR_STAGE` is blank for all samples. ## Molecular Subtypes | Subtype | Characteristics | Prognosis | |---------|-----------------|-----------| | **POLE** | Ultra-hypermutated (>100 mut/Mb), POLE exonuclease mutations | Excellent | | **MSI** | Hypermutated, microsatellite instability, MLH1 silencing | Intermediate | | **CN-low** | Microsatellite stable, few copy number alterations | Intermediate | | **CN-high** | Serous-like, TP53 mutations, extensive CNA | Poor | ## Key Genes | Gene | Frequency | Subtype Association | |------|-----------|---------------------| | PTEN | ~65% | CN-low, MSI | | PIK3CA | ~50% | All subtypes | | PIK3R1 | ~30% | CN-low | | ARID1A | ~35% | MSI | | TP53 | ~25% | CN-high (>90% in this subtype) | | KRAS | ~20% | Various | | CTNNB1 | ~20% | CN-low | | POLE | ~7% | Defines POLE subtype | ## Notes - TCGA molecular classification has prognostic value and guides treatment - POLE and MSI subtypes are hypermutated but have different mechanisms - TP53 mutations with CN-high pattern indicate serous-like behavior regardless of histology - POLE mutations should be in exonuclease domain (proofreading) to be driver - MSI-H tumors respond well to immunotherapy ◀ 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": " WITH subtype_samples AS ( SELECT sample_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, ss.subtype, COUNT(DISTINCT ged.sample_unique_id) AS altered_samples, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged JOIN subtype_samples ss USING (sample_unique_id) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol, ss.subtype ), profiled_by_subtype AS ( SELECT ss.subtype, COUNT(DISTINCT ss.sample_unique_id) AS profiled_samples FROM subtype_samples ss GROUP BY ss.subtype ) SELECT m.hugo_gene_symbol, m.subtype, m.altered_samples, p.profiled_samples, ROUND(m.altered_samples * 100.0 / p.profiled_samples, 1) AS frequency_pct, m.total_mutation_events FROM mutations_by_subtype m JOIN profiled_by_subtype p USING (subtype) WHERE m.subtype = 'UCEC_CN_HIGH' ORDER BY m.altered_samples DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " WITH subtype_samples AS ( SELECT sample_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, ss.subtype, COUNT(DISTINCT ged.sample_unique_id) AS altered_samples, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged JOIN subtype_samples ss USING (sample_unique_id) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol, ss.subtype ), profiled_by_subtype AS ( SELECT ss.subtype, COUNT(DISTINCT ss.sample_unique_id) AS profiled_samples FROM subtype_samples ss GROUP BY ss.subtype ) SELECT m.hugo_gene_symbol, m.subtype, m.altered_samples, p.profiled_samples, ROUND(m.altered_samples * 100.0 / p.profiled_samples, 1) AS frequency_pct, m.total_mutation_events FROM mutations_by_subtype m JOIN profiled_by_subtype p USING (subtype) WHERE m.subtype IN ('UCEC_CN_LOW', 'UCEC_MSI', 'UCEC_POLE') ORDER BY m.subtype, m.altered_samples DESC LIMIT 100 ", "max_rows": 150 } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " SELECT DISTINCT attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND (attribute_name LIKE '%SUBTYPE%' OR attribute_name LIKE '%subtype%' OR attribute_name LIKE '%molecular%' OR attribute_name LIKE '%MOLECULAR%') ORDER BY attribute_name, attribute_value LIMIT 50 ", "max_rows": 100 } ◀ result {"rows":[{"attribute_name":"SUBTYPE"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_HIGH"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_POLE"}]} ▶ clickhouse_run_select_query { "query": " SELECT attribute_value AS subtype, COUNT(DISTINCT sample_unique_id) AS samples, COUNT(DISTINCT patient_unique_id) AS patients FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' GROUP BY attribute_value ORDER BY patients DESC ", "max_rows": 20 } ◀ result {"rows":[{"subtype":"UCEC_CN_HIGH","samples":1,"patients":163},{"subtype":"UCEC_MSI","samples":1,"patients":148},{"subtype":"UCEC_CN_LOW","samples":1,"patients":147},{"subtype":"UCEC_POLE","samples":1,"patients":49}]} ▶ clickhouse_run_select_query { "query": " WITH subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, sp.subtype, COUNT(DISTINCT ged.patient_unique_id) AS altered_patients, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged JOIN subtype_patients sp ON ged.sample_unique_id IN ( SELECT sample_unique_id FROM clinical_data_derived cd WHERE cd.patient_unique_id = sp.patient_unique_id AND cd.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol, sp.subtype ), profiled_by_subtype AS ( SELECT sp.subtype, COUNT(DISTINCT sp.patient_unique_id) AS profiled_patients FROM subtype_patients sp GROUP BY sp.subtype ) SELECT m.hugo_gene_symbol, m.subtype, m.altered_patients, p.profiled_patients, ROUND(m.altered_patients * 100.0 / p.profiled_patients, 1) AS frequency_pct, m.total_mutation_events FROM mutations_by_subtype m JOIN profiled_by_subtype p USING (subtype) WHERE m.subtype = 'UCEC_CN_HIGH' ORDER BY m.altered_patients DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 1\n Code: 1. DB::Exception: Resolved identifier 'sp.patient_unique_id' in parent scope to expression 'sp.patient_unique_id' with correlated columns 'patient_unique_id' (Enable 'allow_experimental_correlated_subqueries' setting to allow correlated subqueries execution). In scope (SELECT sample_unique_id FROM clinical_data_derived AS cd WHERE (cd.patient_unique_id = sp.patient_unique_id) AND (cd.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018')). (UNSUPPORTED_METHOD) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " WITH subtype_mapping AS ( SELECT sample_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ) SELECT ged.hugo_gene_symbol, sm.subtype, COUNT(DISTINCT ged.sample_unique_id) AS altered_samples, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged INNER JOIN subtype_mapping sm USING (sample_unique_id) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND sm.subtype = 'UCEC_CN_HIGH' GROUP BY ged.hugo_gene_symbol, sm.subtype ORDER BY altered_samples DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " SELECT COUNT(DISTINCT ged.sample_unique_id) AS ged_samples, COUNT(DISTINCT cd.sample_unique_id) AS cd_samples FROM genomic_event_derived ged FULL OUTER JOIN clinical_data_derived cd USING (sample_unique_id) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND cd.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 1 ", "max_rows": 10 } ◀ result {"rows":[{"ged_samples":529,"cd_samples":529}]} ▶ clickhouse_run_select_query { "query": " SELECT COUNT(*) AS total_rows, COUNT(DISTINCT hugo_gene_symbol) AS unique_genes, COUNT(DISTINCT sample_unique_id) AS unique_samples FROM genomic_event_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND variant_type = 'mutation' AND mutation_status != 'UNCALLED' AND off_panel = 0 LIMIT 1 ", "max_rows": 10 } ◀ result {"rows":[{"total_rows":538948,"unique_genes":19092,"unique_samples":515}]} ▶ clickhouse_run_select_query { "query": " WITH subtype_mapping AS ( SELECT sample_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ) SELECT COUNT(DISTINCT ged.sample_unique_id) AS samples_with_mutations, COUNT(DISTINCT sm.sample_unique_id) AS samples_with_subtype FROM genomic_event_derived ged INNER JOIN subtype_mapping sm USING (sample_unique_id) WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 LIMIT 1 ", "max_rows": 10 } ◀ result {"rows":[{"samples_with_mutations":0,"samples_with_subtype":0}]} ▶ clickhouse_run_select_query { "query": " SELECT 'genomic_event_derived' AS source, sample_unique_id, COUNT(*) AS count FROM genomic_event_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 5 UNION ALL SELECT 'clinical_data_derived' AS source, sample_unique_id, COUNT(*) AS count FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 5 ", "max_rows": 20 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 215\n Code: 215. DB::Exception: Column 'cbioportal_public_librechat_blue.genomic_event_derived.sample_unique_id' is not under aggregate function and not in GROUP BY keys. In query SELECT 'genomic_event_derived' AS source, sample_unique_id, COUNT(*) AS count FROM genomic_event_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 5. (NOT_AN_AGGREGATE) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " SELECT 'genomic_event_derived' AS source, COUNT(DISTINCT sample_unique_id) AS distinct_samples, COUNT(DISTINCT substring(sample_unique_id, 1, 30)) AS first_30_chars FROM genomic_event_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 5 ", "max_rows": 10 } ◀ result {"rows":[{"source":"genomic_event_derived","distinct_samples":529,"first_30_chars":1}]} ▶ clickhouse_run_select_query { "query": " WITH subtype_mapping AS ( SELECT DISTINCT sample_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value = 'UCEC_CN_HIGH' ), mutations_cn_high AS ( SELECT ged.hugo_gene_symbol, COUNT(DISTINCT ged.sample_unique_id) AS altered_samples, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND ged.sample_unique_id IN (SELECT sample_unique_id FROM subtype_mapping) GROUP BY ged.hugo_gene_symbol ) SELECT hugo_gene_symbol, altered_samples, 'UCEC_CN_HIGH' AS subtype, 163 AS profiled_patients, ROUND(altered_samples * 100.0 / 163, 1) AS frequency_pct, total_mutation_events FROM mutations_cn_high ORDER BY altered_samples DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " WITH subtype_samples_high AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value = 'UCEC_CN_HIGH' ) SELECT COUNT(DISTINCT ged.sample_unique_id) AS ged_samples, COUNT(DISTINCT ssh.sample_unique_id) AS subtype_samples, COUNT(DISTINCT ged.sample_unique_id) AS overlap FROM genomic_event_derived ged CROSS JOIN subtype_samples_high ssh WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' LIMIT 1 ", "max_rows": 10 } ◀ result {"rows":[{"ged_samples":529,"subtype_samples":1,"overlap":529}]} ▶ clickhouse_run_select_query { "query": " SELECT sample_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' LIMIT 20 ", "max_rows": 50 } ◀ result {"rows":[{"attribute_name":"SUBTYPE","attribute_value":"UCEC_POLE"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_HIGH"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_HIGH"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_POLE"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_POLE"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_MSI"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"},{"attribute_name":"SUBTYPE","attribute_value":"UCEC_CN_LOW"}]} ▶ clickhouse_run_select_query { "query": " WITH subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), patient_samples AS ( SELECT DISTINCT cd.patient_unique_id, ged.sample_unique_id FROM clinical_data_derived cd INNER JOIN genomic_event_derived ged USING (sample_unique_id) WHERE cd.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, sp.subtype, COUNT(DISTINCT ps.patient_unique_id) AS altered_patients, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged INNER JOIN patient_samples ps ON ged.sample_unique_id = ps.sample_unique_id INNER JOIN subtype_patients sp ON ps.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol, sp.subtype ) SELECT hugo_gene_symbol, subtype, altered_patients, CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END AS profiled_patients, ROUND(altered_patients * 100.0 / NULLIF(CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END, 0), 1) AS frequency_pct, total_mutation_events FROM mutations_by_subtype WHERE subtype = 'UCEC_CN_HIGH' ORDER BY altered_patients DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 207\n Code: 207. DB::Exception: JOIN INNER JOIN ... ON ged.sample_unique_id = ps.sample_unique_id ambiguous identifier 'ged.sample_unique_id'. In scope mutations_by_subtype. (AMBIGUOUS_IDENTIFIER) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " WITH patient_to_sample AS ( SELECT DISTINCT patient_unique_id, sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ), subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value = 'UCEC_CN_HIGH' ), mutations_cn_high AS ( SELECT ged.hugo_gene_symbol, COUNT(DISTINCT sp.patient_unique_id) AS altered_patients, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol ) SELECT hugo_gene_symbol, 'UCEC_CN_HIGH' AS subtype, altered_patients, 163 AS profiled_patients, ROUND(altered_patients * 100.0 / 163, 1) AS frequency_pct, total_mutation_events FROM mutations_cn_high ORDER BY altered_patients DESC LIMIT 30 ", "max_rows": 100 } ◀ result {"rows":[{"hugo_gene_symbol":"TP53","subtype":"UCEC_CN_HIGH","altered_patients":141,"profiled_patients":163,"frequency_pct":86.5,"total_mutation_events":146},{"hugo_gene_symbol":"PIK3CA","subtype":"UCEC_CN_HIGH","altered_patients":54,"profiled_patients":163,"frequency_pct":33.1,"total_mutation_events":58},{"hugo_gene_symbol":"PPP2R1A","subtype":"UCEC_CN_HIGH","altered_patients":50,"profiled_patients":163,"frequency_pct":30.7,"total_mutation_events":54},{"hugo_gene_symbol":"TTN","subtype":"UCEC_CN_HIGH","altered_patients":32,"profiled_patients":163,"frequency_pct":19.6,"total_mutation_events":38},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_CN_HIGH","altered_patients":30,"profiled_patients":163,"frequency_pct":18.4,"total_mutation_events":31},{"hugo_gene_symbol":"PTEN","subtype":"UCEC_CN_HIGH","altered_patients":28,"profiled_patients":163,"frequency_pct":17.2,"total_mutation_events":41},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_CN_HIGH","altered_patients":25,"profiled_patients":163,"frequency_pct":15.3,"total_mutation_events":27},{"hugo_gene_symbol":"PIK3R1","subtype":"UCEC_CN_HIGH","altered_patients":23,"profiled_patients":163,"frequency_pct":14.1,"total_mutation_events":26},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_CN_HIGH","altered_patients":20,"profiled_patients":163,"frequency_pct":12.3,"total_mutation_events":22},{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_CN_HIGH","altered_patients":18,"profiled_patients":163,"frequency_pct":11,"total_mutation_events":21},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_CN_HIGH","altered_patients":17,"profiled_patients":163,"frequency_pct":10.4,"total_mutation_events":20},{"hugo_gene_symbol":"RYR2","subtype":"UCEC_CN_HIGH","altered_patients":13,"profiled_patients":163,"frequency_pct":8,"total_mutation_events":13},{"hugo_gene_symbol":"SPOP","subtype":"UCEC_CN_HIGH","altered_patients":13,"profiled_patients":163,"frequency_pct":8,"total_mutation_events":13},{"hugo_gene_symbol":"DMD","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":13},{"hugo_gene_symbol":"FOXA2","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":13},{"hugo_gene_symbol":"TAF1","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":12},{"hugo_gene_symbol":"MUC4","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":11},{"hugo_gene_symbol":"KMT2D","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":11},{"hugo_gene_symbol":"ZFHX4","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":13},{"hugo_gene_symbol":"SYNE1","subtype":"UCEC_CN_HIGH","altered_patients":10,"profiled_patients":163,"frequency_pct":6.1,"total_mutation_events":10},{"hugo_gene_symbol":"DNAH8","subtype":"UCEC_CN_H … (1407 more chars) ▶ clickhouse_run_select_query { "query": " WITH patient_to_sample AS ( SELECT DISTINCT patient_unique_id, sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ), subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, sp.subtype, COUNT(DISTINCT sp.patient_unique_id) AS altered_patients, COUNT(*) AS total_mutation_events FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 GROUP BY ged.hugo_gene_symbol, sp.subtype ) SELECT hugo_gene_symbol, subtype, altered_patients, CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END AS profiled_patients, ROUND(altered_patients * 100.0 / NULLIF(CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END, 0), 1) AS frequency_pct, total_mutation_events FROM mutations_by_subtype ORDER BY subtype, altered_patients DESC ", "max_rows": 200 } ◀ result {"rows":[{"hugo_gene_symbol":"TP53","subtype":"UCEC_CN_HIGH","altered_patients":141,"profiled_patients":163,"frequency_pct":86.5,"total_mutation_events":146},{"hugo_gene_symbol":"PIK3CA","subtype":"UCEC_CN_HIGH","altered_patients":54,"profiled_patients":163,"frequency_pct":33.1,"total_mutation_events":58},{"hugo_gene_symbol":"PPP2R1A","subtype":"UCEC_CN_HIGH","altered_patients":50,"profiled_patients":163,"frequency_pct":30.7,"total_mutation_events":54},{"hugo_gene_symbol":"TTN","subtype":"UCEC_CN_HIGH","altered_patients":32,"profiled_patients":163,"frequency_pct":19.6,"total_mutation_events":38},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_CN_HIGH","altered_patients":30,"profiled_patients":163,"frequency_pct":18.4,"total_mutation_events":31},{"hugo_gene_symbol":"PTEN","subtype":"UCEC_CN_HIGH","altered_patients":28,"profiled_patients":163,"frequency_pct":17.2,"total_mutation_events":41},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_CN_HIGH","altered_patients":25,"profiled_patients":163,"frequency_pct":15.3,"total_mutation_events":27},{"hugo_gene_symbol":"PIK3R1","subtype":"UCEC_CN_HIGH","altered_patients":23,"profiled_patients":163,"frequency_pct":14.1,"total_mutation_events":26},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_CN_HIGH","altered_patients":20,"profiled_patients":163,"frequency_pct":12.3,"total_mutation_events":22},{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_CN_HIGH","altered_patients":18,"profiled_patients":163,"frequency_pct":11,"total_mutation_events":21},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_CN_HIGH","altered_patients":17,"profiled_patients":163,"frequency_pct":10.4,"total_mutation_events":20},{"hugo_gene_symbol":"RYR2","subtype":"UCEC_CN_HIGH","altered_patients":13,"profiled_patients":163,"frequency_pct":8,"total_mutation_events":13},{"hugo_gene_symbol":"SPOP","subtype":"UCEC_CN_HIGH","altered_patients":13,"profiled_patients":163,"frequency_pct":8,"total_mutation_events":13},{"hugo_gene_symbol":"TAF1","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":12},{"hugo_gene_symbol":"DMD","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":13},{"hugo_gene_symbol":"FOXA2","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4,"total_mutation_events":13},{"hugo_gene_symbol":"KMT2D","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":11},{"hugo_gene_symbol":"MUC4","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":11},{"hugo_gene_symbol":"ZFHX4","subtype":"UCEC_CN_HIGH","altered_patients":11,"profiled_patients":163,"frequency_pct":6.7,"total_mutation_events":13},{"hugo_gene_symbol":"DNAH8","subtype":"UCEC_CN_HIGH","altered_patients":10,"profiled_patients":163,"frequency_pct":6.1,"total_mutation_events":10},{"hugo_gene_symbol":"SYNE1","subtype":"UCEC_CN_H … (26369 more chars) ▶ clickhouse_run_select_query { "query": " WITH patient_to_sample AS ( SELECT DISTINCT patient_unique_id, sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ), subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), top_cn_high_genes AS ( SELECT DISTINCT hugo_gene_symbol FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND sp.subtype = 'UCEC_CN_HIGH' ORDER BY COUNT(DISTINCT sp.patient_unique_id) DESC LIMIT 15 ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, sp.subtype, COUNT(DISTINCT sp.patient_unique_id) AS altered_patients FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND ged.hugo_gene_symbol IN (SELECT hugo_gene_symbol FROM top_cn_high_genes) GROUP BY ged.hugo_gene_symbol, sp.subtype ) SELECT hugo_gene_symbol, subtype, altered_patients, CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END AS profiled_patients, ROUND(altered_patients * 100.0 / NULLIF(CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END, 0), 1) AS frequency_pct FROM mutations_by_subtype ORDER BY hugo_gene_symbol, CASE WHEN subtype = 'UCEC_CN_HIGH' THEN 0 ELSE 1 END, altered_patients DESC ", "max_rows": 100 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 215\n Code: 215. DB::Exception: Column 'ged.hugo_gene_symbol' is not under aggregate function and not in GROUP BY keys. In query top_cn_high_genes. (NOT_AN_AGGREGATE) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " WITH patient_to_sample AS ( SELECT DISTINCT patient_unique_id, sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' ), subtype_patients AS ( SELECT patient_unique_id, attribute_value AS subtype FROM clinical_data_derived WHERE cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND attribute_name = 'SUBTYPE' AND attribute_value != '' ), top_cn_high_genes AS ( SELECT ged.hugo_gene_symbol, COUNT(DISTINCT sp.patient_unique_id) AS altered_count FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND sp.subtype = 'UCEC_CN_HIGH' GROUP BY ged.hugo_gene_symbol ORDER BY altered_count DESC LIMIT 15 ), mutations_by_subtype AS ( SELECT ged.hugo_gene_symbol, sp.subtype, COUNT(DISTINCT sp.patient_unique_id) AS altered_patients FROM genomic_event_derived ged INNER JOIN patient_to_sample pts ON ged.sample_unique_id = pts.sample_unique_id INNER JOIN subtype_patients sp ON pts.patient_unique_id = sp.patient_unique_id WHERE ged.cancer_study_identifier = 'ucec_tcga_pan_can_atlas_2018' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND ged.hugo_gene_symbol IN (SELECT hugo_gene_symbol FROM top_cn_high_genes) GROUP BY ged.hugo_gene_symbol, sp.subtype ) SELECT hugo_gene_symbol, subtype, altered_patients, CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END AS profiled_patients, ROUND(altered_patients * 100.0 / NULLIF(CASE subtype WHEN 'UCEC_CN_HIGH' THEN 163 WHEN 'UCEC_CN_LOW' THEN 147 WHEN 'UCEC_MSI' THEN 148 WHEN 'UCEC_POLE' THEN 49 END, 0), 1) AS frequency_pct FROM mutations_by_subtype ORDER BY hugo_gene_symbol, CASE WHEN subtype = 'UCEC_CN_HIGH' THEN 0 ELSE 1 END, altered_patients DESC ", "max_rows": 100 } ◀ result {"rows":[{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_CN_HIGH","altered_patients":18,"profiled_patients":163,"frequency_pct":11},{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_POLE","altered_patients":38,"profiled_patients":49,"frequency_pct":77.6},{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_MSI","altered_patients":34,"profiled_patients":148,"frequency_pct":23},{"hugo_gene_symbol":"ARHGAP35","subtype":"UCEC_CN_LOW","altered_patients":13,"profiled_patients":147,"frequency_pct":8.8},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_CN_HIGH","altered_patients":25,"profiled_patients":163,"frequency_pct":15.3},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_POLE","altered_patients":38,"profiled_patients":49,"frequency_pct":77.6},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_MSI","altered_patients":29,"profiled_patients":148,"frequency_pct":19.6},{"hugo_gene_symbol":"CHD4","subtype":"UCEC_CN_LOW","altered_patients":21,"profiled_patients":147,"frequency_pct":14.3},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_CN_HIGH","altered_patients":20,"profiled_patients":163,"frequency_pct":12.3},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_POLE","altered_patients":46,"profiled_patients":49,"frequency_pct":93.9},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_MSI","altered_patients":44,"profiled_patients":148,"frequency_pct":29.7},{"hugo_gene_symbol":"CSMD3","subtype":"UCEC_CN_LOW","altered_patients":11,"profiled_patients":147,"frequency_pct":7.5},{"hugo_gene_symbol":"DMD","subtype":"UCEC_CN_HIGH","altered_patients":12,"profiled_patients":163,"frequency_pct":7.4},{"hugo_gene_symbol":"DMD","subtype":"UCEC_POLE","altered_patients":47,"profiled_patients":49,"frequency_pct":95.9},{"hugo_gene_symbol":"DMD","subtype":"UCEC_MSI","altered_patients":37,"profiled_patients":148,"frequency_pct":25},{"hugo_gene_symbol":"DMD","subtype":"UCEC_CN_LOW","altered_patients":5,"profiled_patients":147,"frequency_pct":3.4},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_CN_HIGH","altered_patients":30,"profiled_patients":163,"frequency_pct":18.4},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_POLE","altered_patients":32,"profiled_patients":49,"frequency_pct":65.3},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_MSI","altered_patients":23,"profiled_patients":148,"frequency_pct":15.5},{"hugo_gene_symbol":"FBXW7","subtype":"UCEC_CN_LOW","altered_patients":9,"profiled_patients":147,"frequency_pct":6.1},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_CN_HIGH","altered_patients":17,"profiled_patients":163,"frequency_pct":10.4},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_MSI","altered_patients":67,"profiled_patients":148,"frequency_pct":45.3},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_POLE","altered_patients":46,"profiled_patients":49,"frequency_pct":93.9},{"hugo_gene_symbol":"MUC16","subtype":"UCEC_CN_LOW","altered_patients":12,"profiled_patients":147,"frequency_pct":8.2},{"hugo_gene_symbol":"PIK3CA","subtype":"UCEC_CN_HIGH","altered_patients":54,"profiled_patients":163,"frequency_pct":33.1},{"hugo_gene_symbol":"PIK3CA","sub … (4093 more chars) ▶ resolve_and_route { "studyIds": [ "ucec_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":"ucec_tcga_pan_can_atlas_2018","name":"Uterine Corpus Endometrial Carcinoma (TCGA, PanCancer Atlas)","sampleCount":529,"studyViewUrl":"https://www.cbioportal.org/study?id=ucec_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":["ucec_tcga_pan_can_atlas_2018_gistic","ucec_tcga_pan_can_atlas_2018_log2CNA","ucec_tcga_pan_can_atlas_2018_mutations","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_ref_normal_Zscores","ucec_tcga_pan_can_atlas_2018_rppa","ucec_tcga_pan_can_atlas_2018_rppa_Zscores","ucec_tcga_pan_can_atlas_2018_structural_variants"],"genericAssayProfiles":["ucec_tcga_pan_can_atlas_2018_armlevel_cna","ucec_tcga_pan_can_atlas_2018_genetic_ancestry","ucec_tcga_pan_can_atlas_2018_methylation_hm27_hm450_merge","ucec_tcga_pan_can_atlas_2018_methylation_hm450"],"heatmapProfileIds":["ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","ucec_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_ref_normal_Zscores","ucec_tcga_pan_can_atlas_2018_rppa_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna","protein","generic_assay_armlevel_cna","generic_assay_genetic_ancestry","generic_assay_methylation"]}}]}} ▶ navigate_to_study_view { "studyIds": [ "ucec_tcga_pan_can_atlas_2018" ], "filterJson": { "clinicalDataFilters": [ { "attributeId": "SUBTYPE", "values": [ { "value": "UCEC_CN_HIGH" } ] } ] } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/study/summary?id=ucec_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%22UCEC_CN_HIGH%22%7D%5D%7D%5D%7D","url":"https://www.cbioportal.org/study/summary?id=ucec_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%22UCEC_CN_HIGH%22%7D%5D%7D%5D%7D","data":{"studyIds":["ucec_tcga_pan_can_atlas_2018"],"studies":[{"studyId":"ucec_tcga_pan_can_atlas_2018","name":"Uterine Corpus Endometrial Carcinoma (TCGA, PanCancer Atlas)","sampleCount":529}],"tab":"summary","hasFilters":true,"hasPlotsConfig":false,"pageDescription":"Overview of all study data displayed as interactive charts summarizing available clinical and genomic data. Click within a chart to filter. Additional charts may be available in the Charts menu."}} ▶ navigate_to_results_view { "studyIds": [ "ucec_tcga_pan_can_atlas_2018" ], "genes": [ "TP53", "PIK3CA", "PPP2R1A", "FBXW7", "PTEN" ], "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "SUBTYPE", "values": [ { "value": "UCEC_CN_HIGH" } ] } ] }, "tab": "oncoprint" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/oncoprint?session_id=6ab5afb7e497aad53593c222","url":"https://www.cbioportal.org/results/oncoprint?session_id=6ab5afb7e497aad53593c222","data":{"studyIds":["ucec_tcga_pan_can_atlas_2018"],"studies":[{"studyId":"ucec_tcga_pan_can_atlas_2018","name":"Uterine Corpus Endometrial Carcinoma (TCGA, PanCancer Atlas)","sampleCount":529}],"genes":["TP53","PIK3CA","PPP2R1A","FBXW7","PTEN"],"filteredSampleCount":163,"caseSetId":"-1","sessionId":"6ab5afb7e497aad53593c222","studyViewUrl":"https://www.cbioportal.org/study?id=ucec_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%22UCEC_CN_HIGH%22%7D%5D%7D%5D%7D","pageDescription":"Visual summary of alterations in queried genes across samples."}} ═ answer (success) ## Most Frequently Mutated Genes in CN-HIGH Subtype Endometrial Cancers Based on analysis of **163 CN-HIGH patients** in the TCGA Uterine Corpus Endometrial Carcinoma (PanCancer Atlas), here are the top mutated genes with comparison to other molecular subtypes: ### Top 10 Genes Most Frequently Mutated in CN-HIGH Endometrial Cancers | Gene | CN-HIGH Frequency | CN-LOW | MSI | POLE | Distinguishing Feature | |------|-------------------|--------|-----|------|------------------------| | **TP53** | **86.5%** (141/163) | 6.1% | 16.2% | 34.7% | **Signature mutation** – defines CN-HIGH subtype | | **PIK3CA** | 33.1% (54/163) | 50.3% | 57.4% | 83.7% | Common across all subtypes; higher in hypermutated types | | **PPP2R1A** | **30.7%** (50/163) | 2.0% | 12.2% | 28.6% | **Enriched in CN-HIGH** – 15-fold higher than CN-LOW | | **FBXW7** | 18.4% (30/163) | 6.1% | 15.5% | 65.3% | Moderate enrichment in CN-HIGH | | **PTEN** | 17.2% (28/163) | 80.3% | 93.2% | 95.9% | **Depleted in CN-HIGH** – marker of CN-LOW/MSI/POLE | | **CHD4** | 15.3% (25/163) | 14.3% | 19.6% | 77.6% | Chromatin remodeler; frequent in all subtypes | | **PIK3R1** | 14.1% (23/163) | 34.0% | 37.2% | 59.2% | Higher in CN-LOW and MSI | | **TTN** | 19.6% (32/163) | 11.6% | 70.9% | 100% | **Passenger-like** – hypermutated types have it nearly universally | | **CSMD3** | 12.3% (20/163) | 7.5% | 29.7% | 93.9% | Passenger gene; very frequent in hypermutated POLE | | **RYR2** | 8.0% (13/163) | 9.5% | 36.5% | 89.8% | Passenger gene; hypermutated types heavily affected | --- ### Key Insight: CN-HIGH Subtype Signature **TP53 is the hallmark mutation of CN-HIGH endometrial cancer**, with 86.5% of CN-HIGH patients mutated versus only 6.1% of CN-LOW patients. Combined with **PPP2R1A** (30.7% in CN-HIGH vs 2% in CN-LOW), these two genes define the CN-HIGH genotype. **Contrast with other subtypes:** - **PTEN loss is a hallmark of CN-LOW (80.3%) and MSI (93.2%)**, but only 17.2% of CN-HIGH tumors — suggesting different PI3K pathway activation mechanisms - **Hypermutated types (MSI, POLE)** are dominated by passenger mutations (TTN, CSMD3, RYR2, DMD) at very high frequencies (70–100%), making their top genes less specific to biology - **PIK3CA** is elevated across all subtypes (33–84%), but highest in POLE/MSI, suggesting convergent pathway activation --- ### Explore the Data Interactively - **[View CN-HIGH cohort overview](https://www.cbioportal.org/study/summary?id=ucec_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%22UCEC_CN_HIGH%22%7D%5D%7D%5D%7D)** — Clinical characteristics and mutation burden of 163 CN-HIGH samples - **[View OncoPrint for top 5 CN-HIGH genes](https://www.cbioportal.org/results/oncoprint?session_id=6ab5afb7e497aad53593c222)** — TP53, PIK3CA, PPP2R1A, FBXW7, PTEN alterations across the CN-HIGH cohort These queries are from **TCGA PanCancer Atlas endometrial carcinoma** (WES + comprehensive phenotyping), the largest and most deeply characterized cohort in cBioPortal.