Q (sonnet): show me cholangio with idh1 mutations other than r132 ▶ read_guide { "uri": "cbioportal://mutation-frequency-guide" } ▶ search_oncotree { "search_term": "cholangiocarcinoma" } ◀ 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) ▶ resolve_and_route { "studyKeywords": [ "cholangiocarcinoma" ] } ◀ result {"result":[{"code":"CHOL","name":"Cholangiocarcinoma","score":80,"mainType":"Hepatobiliary Cancer","tissue":"Biliary Tract","hierarchy":"BILIARY_TRACT > IPN > CHOL"},{"code":"EHCH","name":"Extrahepatic Cholangiocarcinoma","score":50,"mainType":"Hepatobiliary Cancer","tissue":"Biliary Tract","hierarchy":"BILIARY_TRACT > IPN > CHOL > EHCH"},{"code":"HCCIHCH","name":"Hepatocellular Carcinoma plus Intrahepatic Cholangiocarcinoma","score":50,"mainType":"Hepatobiliary Cancer","tissue":"Liver","hierarchy":"LIVER > HCCIHCH"},{"code":"IHCH","name":"Intrahepatic Cholangiocarcinoma","score":50,"mainType":"Hepatobiliary Cancer","tissue":"Biliary Tract","hierarchy":"BILIARY_TRACT > IPN > CHOL > IHCH"},{"code":"PHCH","name":"Perihilar Cholangiocarcinoma","score":50,"mainType":"Hepatobiliary Cancer","tissue":"Biliary Tract","hierarchy":"BILIARY_TRACT > IPN > CHOL > PHCH"}]} ◀ result {"success":true,"message":"Found 13 matching studies (top 5 with full metadata, rest with basic info). 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":13,"studiesWithMetadata":[{"studyId":"chol_icgc_2017","name":"Cholangiocarcinoma (ICGC, Cancer Discov 2017)","sampleCount":489,"studyViewUrl":"https://www.cbioportal.org/study?id=chol_icgc_2017","metadata":{"clinicalAttributeIds":["AGE_AT_SURGERY","ANATOMICAL_SUBTYPE","CANCER_TYPE","CANCER_TYPE_DETAILED","ETHNICITY","HBV","HCV","HISTOLOGY","LIVER_FLUKE_STATUS","MUTATION_COUNT","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","PSC","SAMPLE_COUNT","SEX","STAGE","TARGETED_SEQ","TMB_NONSYNONYMOUS","TNM_STAGE","WHOLE_EXOME_SEQUENCING","WHOLE_GENOME_SEQUENCING"],"molecularProfileIds":["chol_icgc_2017_mutations"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations"]}},{"studyId":"ihch_msk_2021","name":"Intrahepatic Cholangiocarcinoma (MSK, Hepatology 2021)","sampleCount":412,"studyViewUrl":"https://www.cbioportal.org/study?id=ihch_msk_2021","metadata":{"clinicalAttributeIds":["ADJUVANT_CHEMO","AGE","BMI","CA19","CA19_HIGH","CANCER_TYPE","CANCER_TYPE_DETAILED","CHRONIC_HEPATITIS_ANY_TYPE","CIRRHOSIS","CLIN_PSC","DIABETES_STATUS","DUCT_TYPE","DZ_EXTENT","ECOG_BIN","FRACTION_GENOME_ALTERED","HAIC","HEP_B","HEP_C","LVI","MUTATION_COUNT","NEOADJ_CHEMO","ONCOTREE_CODE","OS_MONTHS","OS_MONTHS_FROM_RX","OS_STATUS","PD_INF","PNI","POSITIVE_LYMPH_NODE","POSITIVE_MARGIN","RFS_MONTHS","RFS_STATUS","SAMPLE_COUNT","SEX","SMOKING_STATUS","STEATOSIS","SYSTEMIC_CHEMO","TMB_NONSYNONYMOUS","TREATMENT_GROUP","TUMOR_GRADE","TUMOR_SIZE"],"molecularProfileIds":["ihch_msk_2021_cna","ihch_msk_2021_mutations","ihch_msk_2021_structural_variants"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations"]}},{"studyId":"ihch_mskcc_2020","name":"Intrahepatic Cholangiocarcinoma (MSK, Clin Cancer Res 2021)","sampleCount":219,"studyViewUrl":"https://www.cbioportal.org/study?id=ihch_mskcc_2020","metadata":{"clinicalAttributeIds":["AGE_AT_SEQ_REPORT","CANCER_TYPE","CANCER_TYPE_DETAILED","GENE_PANEL","INSTITUTE","METASTATIC_SITE","MSI_COMMENT","MSI_SCORE","MSI_TYPE","MUTATION_COUNT","ONCOTREE_CODE","PRIMARY_SITE","PROJECT_CODE","SAMPLE_COUNT","SAMPLE_COVERAGE","SOMATIC_STATUS","TMB_NONSYNONYMOUS","TUMOR_PURITY"],"molecularProfileIds":["ihch_mskcc_2020_cna","ihch_mskcc_2020_mutations","ihch_mskcc_2020_structural_variants"],"availableComparisonTabs":["overlap","clinical","alterations","mutations"]}},{"studyId":"chol_msk_2018","name":"Cholangiocarcinoma (MSK, Clin Cancer Res 2018)","sampleCount":195,"studyViewUrl":"https://www.cbioportal.org/study?id=chol_msk_2018","metadata":{"clinicalAttributeIds":["AGE","AGE_AT_SEQ_REPORT","AGE_CURRENT","CANCER_TYPE","CANCER_TYPE_DETAILED","ETHNICITY","FRACTION_GENOME_ALTERED","GENE_PANEL","INSTIT … (3552 more chars) ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, sample_unique_id, mutation_variant, mutation_type, mutation_status FROM genomic_event_derived WHERE cancer_study_identifier IN ('chol_msk_2018','chol_icgc_2017','ihch_msk_2021','ihch_mskcc_2020','chol_tcga_pan_can_atlas_2018','chol_tcga','chol_tcga_gdc','chol_jhu_2013','chol_nccs_2013','chol_nus_2012','ihch_smmu_2014','ihch_ismms_2015','hccihch_pku_2019') AND variant_type = 'mutation' AND hugo_gene_symbol = 'IDH1' AND mutation_status != 'UNCALLED' ORDER BY cancer_study_identifier, mutation_variant " } ◀ result {"rows":[{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_BR_1","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_FR_9","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_4","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_RO_23","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_RO_25","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_RO_5","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_SG_15","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_SG_28","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_SG_3","mutation_variant":"R132C","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_2","mutation_variant":"R132G","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_5","mutation_variant":"R132G","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_SG_34","mutation_variant":"R132G","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_TH_27","mutation_variant":"R132G","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_1","mutation_variant":"R132L","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_3","mutation_variant":"R132L","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_TH_27","mutation_variant":"R132L","mutation_type":"Missense_Mutation","mutation_status":"NA"},{"cancer_study_identifier":"chol_icgc_2017","sample_unique_id":"chol_icgc_2017_CCA_JP_1","mutation_variant":"R132S","mutation_type":"Missense_Mutation","mutation_status … (15784 more chars) ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, sample_unique_id, mutation_variant, mutation_type FROM genomic_event_derived WHERE cancer_study_identifier IN ('chol_msk_2018','chol_icgc_2017','ihch_msk_2021','ihch_mskcc_2020','chol_tcga_pan_can_atlas_2018','chol_tcga','chol_tcga_gdc','chol_jhu_2013','chol_nccs_2013','chol_nus_2012','ihch_smmu_2014','ihch_ismms_2015','hccihch_pku_2019') AND variant_type = 'mutation' AND hugo_gene_symbol = 'IDH1' AND mutation_status != 'UNCALLED' AND mutation_variant NOT LIKE 'R132%' ORDER BY cancer_study_identifier, mutation_variant " } ◀ result {"rows":[{"cancer_study_identifier":"chol_tcga_gdc","sample_unique_id":"chol_tcga_gdc_TCGA-ZH-A8Y7-01","mutation_variant":"G123E","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"hccihch_pku_2019","sample_unique_id":"hccihch_pku_2019_Mix_23T","mutation_variant":"A268S","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"ihch_msk_2021","sample_unique_id":"ihch_msk_2021_P-0011223-T01-IM5","mutation_variant":"N349S","mutation_type":"Missense_Mutation"}]} ▶ navigate_to_results_view { "studyIds": [ "chol_tcga_gdc", "hccihch_pku_2019", "ihch_msk_2021" ], "genes": [ "IDH1: MUT != R132C != R132G != R132L != R132S != R132H" ], "tab": "mutations" } ◀ result {"success":false,"error":"Invalid OQL syntax in genes","details":{"error":"Expected \"(\", \"(-\", \"-::\", \"-::FUSION\", \"::\", \"::FUSION\", \"AMP\", \"CNA\", \"CNA_\", \"DRIVER\", \"EXP\", \"FRAMESHIFT\", \"FUSION\", \"FUSION::\", \"FUSION::-\", \"GAIN\", \"GERMLINE\", \"HETLOSS\", \"HOMDEL\", \"INFRAME\", \"MISSENSE\", \"MUT\", \"NONSENSE\", \"NONSTART\", \"NONSTOP\", \"PROMOTER\", \"PROT\", \"SOMATIC\", \"SPLICE\", \"TRUNC\", \"[\", [ \\t\\r], [,; \\t\\r\\n], [GPAVLIMCFYWHKRQNEDST], [\\-_./a-zA-Z0-9*], [\\-_.@/a-zA-Z0-9*], [a-zA-Z0-9], or end of input but \"!\" found.","location":{"start":{"offset":19,"line":1,"column":20},"end":{"offset":20,"line":1,"column":21}}}} ▶ navigate_to_study_view { "studyIds": [ "chol_msk_2018", "chol_icgc_2017", "ihch_msk_2021", "ihch_mskcc_2020", "chol_tcga_pan_can_atlas_2018", "chol_tcga", "chol_tcga_gdc", "chol_jhu_2013", "chol_nccs_2013", "chol_nus_2012", "ihch_smmu_2014", "ihch_ismms_2015", "hccihch_pku_2019" ], "filterJson": { "geneFilters": [ { "molecularProfileIds": [ "chol_msk_2018_mutations" ], "geneQueries": [ [ { "hugoGeneSymbol": "IDH1" } ] ] } ] } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/study/summary?id=chol_msk_2018%2Cchol_icgc_2017%2Cihch_msk_2021%2Cihch_mskcc_2020%2Cchol_tcga_pan_can_atlas_2018%2Cchol_tcga%2Cchol_tcga_gdc%2Cchol_jhu_2013%2Cchol_nccs_2013%2Cchol_nus_2012%2Cihch_smmu_2014%2Cihch_ismms_2015%2Chccihch_pku_2019#filterJson=%7B%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22IDH1%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22chol_msk_2018_mutations%22%5D%7D%5D%7D","url":"https://www.cbioportal.org/study/summary?id=chol_msk_2018%2Cchol_icgc_2017%2Cihch_msk_2021%2Cihch_mskcc_2020%2Cchol_tcga_pan_can_atlas_2018%2Cchol_tcga%2Cchol_tcga_gdc%2Cchol_jhu_2013%2Cchol_nccs_2013%2Cchol_nus_2012%2Cihch_smmu_2014%2Cihch_ismms_2015%2Chccihch_pku_2019#filterJson=%7B%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22IDH1%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22chol_msk_2018_mutations%22%5D%7D%5D%7D","data":{"studyIds":["chol_msk_2018","chol_icgc_2017","ihch_msk_2021","ihch_mskcc_2020","chol_tcga_pan_can_atlas_2018","chol_tcga","chol_tcga_gdc","chol_jhu_2013","chol_nccs_2013","chol_nus_2012","ihch_smmu_2014","ihch_ismms_2015","hccihch_pku_2019"],"studies":[{"studyId":"chol_msk_2018","name":"Cholangiocarcinoma (MSK, Clin Cancer Res 2018)","sampleCount":195},{"studyId":"chol_icgc_2017","name":"Cholangiocarcinoma (ICGC, Cancer Discov 2017)","sampleCount":489},{"studyId":"ihch_msk_2021","name":"Intrahepatic Cholangiocarcinoma (MSK, Hepatology 2021)","sampleCount":412},{"studyId":"ihch_mskcc_2020","name":"Intrahepatic Cholangiocarcinoma (MSK, Clin Cancer Res 2021)","sampleCount":219},{"studyId":"chol_tcga_pan_can_atlas_2018","name":"Cholangiocarcinoma (TCGA, PanCancer Atlas)","sampleCount":36},{"studyId":"chol_tcga","name":"Cholangiocarcinoma (TCGA, Firehose Legacy)","sampleCount":51},{"studyId":"chol_tcga_gdc","name":"Cholangiocarcinoma (TCGA GDC, 2025)","sampleCount":51},{"studyId":"chol_jhu_2013","name":"Intrahepatic Cholangiocarcinoma (JHU, Nat Genet 2013)","sampleCount":40},{"studyId":"chol_nccs_2013","name":"Cholangiocarcinoma (National Cancer Centre of Singapore, Nat Genet 2013)","sampleCount":15},{"studyId":"chol_nus_2012","name":"Cholangiocarcinoma (National University of Singapore, Nat Genet 2012)","sampleCount":8},{"studyId":"ihch_smmu_2014","name":"Intrahepatic Cholangiocarcinoma (Shanghai, Nat Commun 2014)","sampleCount":103},{"studyId":"ihch_ismms_2015","name":"Intrahepatic Cholangiocarcinoma (Mount Sinai 2015)","sampleCount":8},{"studyId":"hccihch_pku_2019","name":"Combined Hepatocellular and Intrahepatic Cholangiocarcinoma (Peking University, Cancer Cell 2019)","sampleCount":173}],"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": [ "chol_tcga_gdc", "hccihch_pku_2019", "ihch_msk_2021" ], "genes": [ "IDH1" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=chol_tcga_gdc%2Chccihch_pku_2019%2Cihch_msk_2021&gene_list=IDH1&case_set_id=all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=chol_tcga_gdc%2Chccihch_pku_2019%2Cihch_msk_2021&gene_list=IDH1&case_set_id=all","data":{"studyIds":["chol_tcga_gdc","hccihch_pku_2019","ihch_msk_2021"],"studies":[{"studyId":"chol_tcga_gdc","name":"Cholangiocarcinoma (TCGA GDC, 2025)","sampleCount":51},{"studyId":"hccihch_pku_2019","name":"Combined Hepatocellular and Intrahepatic Cholangiocarcinoma (Peking University, Cancer Cell 2019)","sampleCount":173},{"studyId":"ihch_msk_2021","name":"Intrahepatic Cholangiocarcinoma (MSK, Hepatology 2021)","sampleCount":412}],"genes":["IDH1"],"caseSetId":"all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ═ answer (success) ### Links **[IDH1 Mutations — Lollipop/Table View](https://www.cbioportal.org/results/mutations?cancer_study_list=chol_tcga_gdc%2Chccihch_pku_2019%2Cihch_msk_2021&gene_list=IDH1&case_set_id=all)** Shows the three studies harboring the non-R132 variants (G123E, A268S, N349S) alongside the R132 hotspot mutations for comparison. Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes. **[Cholangiocarcinoma Cohort Overview — All Studies, IDH1-filtered](https://www.cbioportal.org/study/summary?id=chol_msk_2018%2Cchol_icgc_2017%2Cihch_msk_2021%2Cihch_mskcc_2020%2Cchol_tcga_pan_can_atlas_2018%2Cchol_tcga%2Cchol_tcga_gdc%2Cchol_jhu_2013%2Cchol_nccs_2013%2Cchol_nus_2012%2Cihch_smmu_2014%2Cihch_ismms_2015%2Chccihch_pku_2019#filterJson=%7B%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22IDH1%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22chol_msk_2018_mutations%22%5D%7D%5D%7D)** Overview of all study data displayed as interactive charts summarizing available clinical and genomic data across all 13 cholangiocarcinoma/hepatobiliary cohorts (1,800 total samples). Click within a chart to filter. *Note: The OncoPrint's default OQL doesn't support excluding multiple named variants at once (e.g., `MUT != R132C != R132G...`), so the mutations-tab link above shows all IDH1 variants — use the lollipop plot to visually distinguish the R132 cluster from the three non-R132 outliers.*