Q (haiku): In MSS colorectal cancer, what is the frequency of BRAF oncogenic mutations (as defined by OncoKB)? Use the 2017 MSK study for this. Can you give me a table of all these mutations, with frequency, count and denominator? ▶ read_guide { "uri": "cbioportal://mutation-frequency-guide" } ▶ read_guide { "uri": "cbioportal://common-pitfalls#16" } ▶ list_studies { "search": "MSK colorectal 2017" } ◀ 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) ◀ result ### 16. 🚨 SILENT QUERY SUBSTITUTION ("did you mean...") When the user's wording differs from canonical terminology (e.g. "V600V" looks like "V600E" with a typo, or "point mutation" sounds like "missense"), it is forbidden to silently rewrite the question and answer the rewritten version. Doing so produces an answer that looks confident but is for a different question — the user cannot tell what was changed. #### ❌ Wrong: silently substitute > User: *"Find patients in colorectal cancer with the V600V alteration in BRAF"* > Agent: *(internally treats this as V600E)* "I found 412 samples with BRAF V600E in colorectal studies..." > User: *"What is the most prevalent TP53 mutation in uterine cancer that is not a point mutation?"* > Agent: *(internally treats "point mutation" = "missense", silently excludes only missense)* "The most prevalent non-missense TP53 mutation is..." #### ✅ Correct: answer the literal question, flag any normalization For an unusual-looking variant the user may have typed deliberately: - Query for what was asked, literally. - If 0 rows come back, **explain *why* zero is the expected answer** before suggesting a likely-intended alternative. For synonymous variants (e.g. BRAF V600V, TP53 R175R), the explanation is: *cBioPortal's mutation tables filter out synonymous (silent) variants in most studies, so 0 hits means "filtered upstream", not "no such variant exists in any patient"*. Then ask: *"Did you mean V600E (the canonical activating variant)? Or would you like me to look for V600V in the studies that do retain synonymous calls?"* - If the wording is ambiguous (e.g. "point mutation"), ask the user which definition they meant before querying — do not pick one silently. #### Mutation-type terminology mapping (use this to disambiguate) | User says | Canonical definition | `mutation_type` filter | |---|---|---| | "point mutation" | Any SNV (single-nucleotide variant) — includes missense, nonsense, synonymous, splice-site SNVs | `mutation_type IN ('Missense_Mutation','Nonsense_Mutation','Silent','Splice_Site')` — **but ask the user to confirm scope first** | | "missense" | Single amino-acid substitution that changes the protein | `mutation_type = 'Missense_Mutation'` | | "nonsense" / "stop-gain" | Premature stop codon | `mutation_type = 'Nonsense_Mutation'` | | "synonymous" / "silent" | Nucleotide change with no amino-acid change | `mutation_type = 'Silent'` (**often filtered out of public datasets** — see below) | | "splice site" | Mutation in canonical splice acceptor/donor | `mutation_type = 'Splice_Site'` | | "frameshift" | Indel changing reading frame | `mutation_type IN ('Frame_Shift_Ins','Frame_Shift_Del')` | | "indel" / "in-frame" | In-frame insertion or deletion | `mutation_type IN ('In_Frame_Ins','In_Frame_Del')` | | "truncating" | Anything that disrupts the protein early | `mutation_type IN ('Nonsense_Mutation','Frame_Shift_Ins','Frame_Shift_Del','Splice_Site','Nonstop_Mutation')` | **Synonymous-variant filter. … (785 more chars) ◀ result {"result":[{"cancer_study_identifier":"crc_msk_2017","name":"Metastatic Colorectal Cancer (MSK, Cancer Cell 2018)","type_of_cancer_id":"coadread","sample_count":1134,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=crc_msk_2017"}]} ▶ get_study_guide { "study_id": "crc_msk_2017" } ▶ read_guide { "uri": "cbioportal://sample-filtering-guide" } ◀ result # Study Guide: Metastatic Colorectal Cancer (MSK, Cancer Cell 2018) **Study ID:** `crc_msk_2017` **Cancer Type:** coadread **Description:** Targeted sequencing of 1134 metastatic colorectal tumor/normal pairs. ## Cohort Statistics - **Patients:** 1,099 - **Samples:** 1,135 ## Available Data Types - **COPY_NUMBER_ALTERATION**: Putative copy-number alterations from GISTIC - **MUTATION_EXTENDED**: Mutations - **STRUCTURAL_VARIANT**: Structural variants ## Gene Panels - **IMPACT410**: 911 samples - **IMPACT341**: 214 samples - **IMPACT468**: 9 samples ## Available Clinical Attributes | Attribute | Samples with Data | |-----------|------------------| | TIME_FROM_MET_DX_SEQUENCING | 1,134 | | METASTASES_SITE_FIRST_LIVER | 1,134 | | PRIMARY_SITE | 1,134 | | METASTATIC_BIOPSY_SITE | 1,134 | | MUTATION_COUNT | 1,134 | | MSI_STATUS | 1,134 | | SOMATIC_STATUS | 1,134 | | METASTASES_SITE_FIRST_PERITONEUM_OMENTUM_ABDOMEN | 1,134 | | METASTASES_SITE_FIRST_BONE | 1,134 | | METASTASES_SITE_FIRST_GYN | 1,134 | | METASTASES_SITE_FIRST_LN | 1,134 | | TIME_TO_METASTASIS_MONTHS | 1,134 | | FRACTION_GENOME_ALTERED | 1,134 | | TMB_NONSYNONYMOUS | 1,134 | | SPECIMEN_TYPE | 1,134 | | METASTASES_SITE_FIRST_LUNG | 1,134 | | STAGE_AT_DIAGNOSIS | 1,134 | | FIRST_SITE_OF_METS | 1,134 | | CHEMO_EXP_SEQ_SPECIMEN | 1,134 | | METASTASES_SITE_FIRST_BRAIN | 1,134 | ## Top Mutated Genes | Gene | Altered Samples | |------|----------------| | APC | 867 | | TP53 | 824 | | KRAS | 495 | | PIK3CA | 229 | | SMAD4 | 173 | | FBXW7 | 145 | | BRAF | 133 | | TCF7L2 | 124 | | SOX9 | 107 | | KMT2D | 107 | ## Sample Types - **Primary**: 601 samples - **Metastasis**: 533 samples ## Query Tips for crc_msk_2017 ```sql -- Get all samples in this study SELECT DISTINCT sample_unique_id, patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017'; -- Get mutations for a specific gene SELECT sample_unique_id, hugo_gene_symbol, mutation_variant, mutation_type FROM genomic_event_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND hugo_gene_symbol = 'TP53' AND variant_type = 'mutation'; -- Get clinical data for specific attributes SELECT sample_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name IN ('CANCER_TYPE', 'SAMPLE_TYPE', 'OS_MONTHS'); ``` ◀ result # Sample and Study Filtering Guide ## Overview Proper filtering is essential for meaningful cBioPortal analysis. This guide covers filtering by studies, sample types, and other criteria. ## Study-Level Filtering ### 1. Always Filter by Study Every query should specify a study to ensure consistent results: ```sql -- Always include study filtering SELECT * FROM your_table WHERE cancer_study_identifier = 'your_study_id' -- Additional filters... ``` ### 2. Find Available Studies ```sql -- Discover available studies SELECT cancer_study_identifier, name, description, type_of_cancer_id FROM cancer_study ORDER BY cancer_study_identifier; ``` ### 3. Study Information ```sql -- Get detailed study information SELECT cs.cancer_study_identifier, cs.name as study_name, cs.description, cs.sample_count, COUNT(DISTINCT p.internal_id) as patient_count FROM cancer_study cs LEFT JOIN patient p ON cs.cancer_study_id = p.cancer_study_id WHERE cs.cancer_study_identifier = 'your_study_id' GROUP BY cs.cancer_study_identifier, cs.name, cs.description, cs.sample_count; ``` ### 4. Find Studies by Available Data Types Use this when the user asks *"which studies have mutation and copy-number data for X"*, *"studies with expression for Y"*, *"is there any imaging data"*, or any *"studies with Z data"* question. `cancer_study` has one precomputed sample count per data type — filter on them. No join and no schema exploration needed. These are the same counts as the portal's study list and its "Data type" filter. **Canonical query — studies with ALL requested data types for a cancer type:** ```sql SELECT cancer_study_identifier, name, sample_count, mutation_sample_count, cna_sample_count FROM cancer_study WHERE type_of_cancer_id = 'luad' -- ← OncoTree code from search_oncotree AND mutation_sample_count > 0 -- ← one condition per required data type AND cna_sample_count > 0 ORDER BY sample_count DESC; ``` **Data type → column** (a count of 0 means the study doesn't have that data): | Data type in the user's question | Column (portal "Data type" filter label) | |---|---| | samples in the study | `sample_count` | | mutation / mutations | `mutation_sample_count` ("Mutations") | | copy-number / CNA / amplification / deletion | `cna_sample_count` ("CNA") | | structural variant / fusion | `structural_variant_sample_count` | | RNA / mRNA / gene expression (any platform) | `mrna_expression_sample_count` — use this for "which studies have expression data" | | specifically the portal's "RNA-Seq" filter | `rna_seq_sample_count` ("RNA-Seq") — counts only the `_rna_seq_v2_mrna` list; 0 for many GDC and iAtlas studies that do have RNA-Seq | | specifically the portal's "RNA (microarray)" filter | `mrna_microarray_sample_count` ("RNA (microarray)") — counts only the `_mrna` list | | microRNA | `mirna_sample_count` ("miRNA") | | protein / RPPA | `rppa_sample_count` ("RPPA") | | mas … (7083 more chars) ▶ clickhouse_list_table_columns { "table": "genomic_event_derived" } ▶ clickhouse_list_table_columns { "table": "clinical_data_derived" } ◀ result {"columns":[{"name":"sample_unique_id","type":"String"},{"name":"hugo_gene_symbol","type":"String","comment":"HUGO gene symbol (e.g., TP53, KRAS, BRAF). Use for gene-specific queries."},{"name":"entrez_gene_id","type":"Int32"},{"name":"gene_panel_stable_id","type":"LowCardinality(String)"},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"genetic_profile_stable_id","type":"LowCardinality(String)"},{"name":"variant_type","type":"LowCardinality(String)","comment":"Type of genomic event: \"mutation\" for SNVs/indels, \"cna\" for copy number alterations, \"structural_variant\" for SVs. Always filter by this."},{"name":"mutation_variant","type":"String","comment":"Protein change notation (e.g., p.V600E, p.R175H). Use for specific variant queries. \"NA\" for non-mutation events."},{"name":"mutation_type","type":"LowCardinality(String)"},{"name":"mutation_status","type":"LowCardinality(String)","comment":"For mutations: Somatic, Germline, UNKNOWN, or UNCALLED. Filter mutation_status != \"UNCALLED\" to exclude uncertain calls. Include all other statuses."},{"name":"driver_filter","type":"LowCardinality(String)"},{"name":"driver_filter_annotation","type":"String"},{"name":"driver_tiers_filter","type":"LowCardinality(String)"},{"name":"driver_tiers_filter_annotation","type":"String"},{"name":"cna_alteration","type":"Nullable(Int8)","comment":"Copy number alteration: only 2 = amplification (AMP) and -2 = deep deletion (HOMDEL) are stored. Shallow deletion (-1), diploid (0) and gain (1) are not in this table; query genetic_alteration_derived WHERE profile_type = 'gistic' (alteration_value is a String, e.g. '-1'). NULL for non-CNA events."},{"name":"cna_cytoband","type":"String"},{"name":"sv_event_info","type":"String"},{"name":"patient_unique_id","type":"String"},{"name":"off_panel","type":"Bool","comment":"Boolean: 1 = mutation outside gene panel coverage (off-panel), 0 = within panel (on-panel). Filter off_panel = 0 for reliable frequency calculations."}]} ◀ 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": " SELECT DISTINCT attribute_value AS msi_status FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' ORDER BY attribute_value " } ◀ result {"rows":[{},{"msi_status":"Inconclusive"},{"msi_status":"MSI"},{"msi_status":"MSS"}]} ▶ clickhouse_run_select_query { "query": " WITH mss_samples AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' AND attribute_value = 'MSS' ), braf_mutations AS ( SELECT ged.mutation_variant, ged.mutation_type, ged.driver_filter, ged.driver_filter_annotation, COUNT(DISTINCT ged.sample_unique_id) AS sample_count FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'crc_msk_2017' AND ged.hugo_gene_symbol = 'BRAF' 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 mss_samples) AND ged.driver_filter != '' -- OncoKB-annotated driver mutations GROUP BY ged.mutation_variant, ged.mutation_type, ged.driver_filter, ged.driver_filter_annotation ORDER BY sample_count DESC ) SELECT * FROM braf_mutations ", "max_rows": 100 } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " -- Check MSS sample count and BRAF mutations (all) WITH mss_samples AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' AND attribute_value = 'MSS' ) SELECT 'MSS_samples' AS query_type, COUNT(*) AS count FROM mss_samples UNION ALL SELECT 'BRAF_mutations_in_MSS', COUNT(DISTINCT sample_unique_id) FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'crc_msk_2017' AND ged.hugo_gene_symbol = 'BRAF' 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 mss_samples) UNION ALL SELECT 'BRAF_driver_annotated_in_study', COUNT(DISTINCT sample_unique_id) FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'crc_msk_2017' AND ged.hugo_gene_symbol = 'BRAF' AND ged.variant_type = 'mutation' AND ged.mutation_status != 'UNCALLED' AND ged.off_panel = 0 AND ged.driver_filter != '' " } ◀ result {"rows":[{"query_type":"BRAF_mutations_in_MSS","count":78},{"query_type":"MSS_samples","count":701},{"query_type":"BRAF_driver_annotated_in_study","count":0}]} ▶ clickhouse_run_select_query { "query": " -- All BRAF mutations in MSS samples (regardless of driver status) WITH mss_samples AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' AND attribute_value = 'MSS' ) SELECT COALESCE(ged.mutation_variant, 'NA') AS mutation_variant, ged.mutation_type, COALESCE(ged.driver_filter, 'Not annotated') AS driver_filter, COUNT(DISTINCT ged.sample_unique_id) AS sample_count FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'crc_msk_2017' AND ged.hugo_gene_symbol = 'BRAF' 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 mss_samples) GROUP BY mutation_variant, mutation_type, driver_filter ORDER BY sample_count DESC ", "max_rows": 50 } ◀ result {"rows":[{"mutation_variant":"V600E","mutation_type":"Missense_Mutation","sample_count":46},{"mutation_variant":"D594G","mutation_type":"Missense_Mutation","sample_count":7},{"mutation_variant":"D594N","mutation_type":"Missense_Mutation","sample_count":3},{"mutation_variant":"T599delinsIP","mutation_type":"In_Frame_Ins","sample_count":2},{"mutation_variant":"N581S","mutation_type":"Missense_Mutation","sample_count":2},{"mutation_variant":"G469E","mutation_type":"Missense_Mutation","sample_count":2},{"mutation_variant":"G469A","mutation_type":"Missense_Mutation","sample_count":2},{"mutation_variant":"F294L","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"K601E","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"G596R","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"P277Hfs*2","mutation_type":"Frame_Shift_Del","sample_count":1},{"mutation_variant":"S602Y","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"E501K","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"D284Efs*4","mutation_type":"Frame_Shift_Ins","sample_count":1},{"mutation_variant":"D594V","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"R354*","mutation_type":"Nonsense_Mutation","sample_count":1},{"mutation_variant":"L312P","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"Y633C","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"A404Cfs*9","mutation_type":"Frame_Shift_Ins","sample_count":1},{"mutation_variant":"Q356K","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"G466V","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"H574Y","mutation_type":"Missense_Mutation","sample_count":1},{"mutation_variant":"N581I","mutation_type":"Missense_Mutation","sample_count":1}]} ▶ clickhouse_run_select_query { "query": " -- Get profiled samples for BRAF in MSS samples WITH mss_samples AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' AND attribute_value = 'MSS' ), -- BRAF-profiled samples in MSS cohort (targeted panel or WES) braf_profiled AS ( SELECT DISTINCT p.sample_unique_id FROM mutation_panel_gene_coverage p WHERE p.cancer_study_identifier = 'crc_msk_2017' AND p.hugo_gene_symbol = 'BRAF' AND p.sample_unique_id IN (SELECT sample_unique_id FROM mss_samples) UNION ALL SELECT DISTINCT p.sample_unique_id FROM mutation_wes_coverage p WHERE p.cancer_study_identifier = 'crc_msk_2017' AND p.sample_unique_id IN (SELECT sample_unique_id FROM mss_samples) ) SELECT COUNT(DISTINCT sample_unique_id) AS braf_profiled_mss FROM braf_profiled " } ◀ result {"rows":[{"braf_profiled_mss":701}]} ▶ clickhouse_run_select_query { "query": " -- Final comprehensive query for BRAF mutations in MSS samples WITH mss_samples AS ( SELECT DISTINCT sample_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'crc_msk_2017' AND attribute_name = 'MSI_STATUS' AND attribute_value = 'MSS' ), braf_mutations_all AS ( SELECT ged.mutation_variant, ged.mutation_type, COALESCE(ged.driver_filter, 'Not annotated') AS driver_status, CASE WHEN ged.driver_filter != '' THEN 1 ELSE 0 END AS is_oncokb_driver, COUNT(DISTINCT ged.sample_unique_id) AS sample_count FROM genomic_event_derived ged WHERE ged.cancer_study_identifier = 'crc_msk_2017' AND ged.hugo_gene_symbol = 'BRAF' 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 mss_samples) GROUP BY ged.mutation_variant, ged.mutation_type, ged.driver_filter ) SELECT mutation_variant, mutation_type, sample_count, 701 AS profiled_denominator, ROUND(sample_count * 100.0 / 701, 2) AS frequency_percent, driver_status, is_oncokb_driver FROM braf_mutations_all ORDER BY sample_count DESC, mutation_variant ", "max_rows": 100 } ◀ result {"rows":[{"mutation_variant":"V600E","mutation_type":"Missense_Mutation","sample_count":46,"profiled_denominator":701,"frequency_percent":6.56,"is_oncokb_driver":0},{"mutation_variant":"D594G","mutation_type":"Missense_Mutation","sample_count":7,"profiled_denominator":701,"frequency_percent":1,"is_oncokb_driver":0},{"mutation_variant":"D594N","mutation_type":"Missense_Mutation","sample_count":3,"profiled_denominator":701,"frequency_percent":0.43,"is_oncokb_driver":0},{"mutation_variant":"G469A","mutation_type":"Missense_Mutation","sample_count":2,"profiled_denominator":701,"frequency_percent":0.29,"is_oncokb_driver":0},{"mutation_variant":"G469E","mutation_type":"Missense_Mutation","sample_count":2,"profiled_denominator":701,"frequency_percent":0.29,"is_oncokb_driver":0},{"mutation_variant":"N581S","mutation_type":"Missense_Mutation","sample_count":2,"profiled_denominator":701,"frequency_percent":0.29,"is_oncokb_driver":0},{"mutation_variant":"T599delinsIP","mutation_type":"In_Frame_Ins","sample_count":2,"profiled_denominator":701,"frequency_percent":0.29,"is_oncokb_driver":0},{"mutation_variant":"A404Cfs*9","mutation_type":"Frame_Shift_Ins","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"D284Efs*4","mutation_type":"Frame_Shift_Ins","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"D594V","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"E501K","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"F294L","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"G466V","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"G596R","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"H574Y","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"K601E","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"L312P","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"N581I","mutation_type":"Missense_Mutation","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"P277Hfs*2","mutation_type":"Frame_Shift_Del","sample_count":1,"profiled_denominator":701,"frequency_percent":0.14,"is_oncokb_driver":0},{"mutation_variant":"Q356K","mutation_ty … (581 more chars) ▶ resolve_and_route { "studyIds": [ "crc_msk_2017" ] } ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"crc_msk_2017","name":"Metastatic Colorectal Cancer (MSK, Cancer Cell 2018)","sampleCount":1134,"studyViewUrl":"https://www.cbioportal.org/study?id=crc_msk_2017","metadata":{"clinicalAttributeIds":["AGE_AT_DIAGNOSIS","CANCER_TYPE","CANCER_TYPE_DETAILED","CHEMO_EXP_SEQ_SPECIMEN","FIRST_SITE_OF_METS","FRACTION_GENOME_ALTERED","GENE_PANEL","MCRC_TYPE","METASTASECTOMY","METASTASECTOMY_SITE","METASTASES_SITE_FIRST_BONE","METASTASES_SITE_FIRST_BRAIN","METASTASES_SITE_FIRST_GYN","METASTASES_SITE_FIRST_LIVER","METASTASES_SITE_FIRST_LN","METASTASES_SITE_FIRST_LUNG","METASTASES_SITE_FIRST_PELVIS","METASTASES_SITE_FIRST_PERITONEUM_OMENTUM_ABDOMEN","METASTATIC_BIOPSY_SITE","MOLECULAR_SUBTYPE","MSI_SCORE","MSI_STATUS","MUTATION_COUNT","ONCOTREE_CODE","OS_MONTHS","OS_MONTHS_ADDITIONAL","OS_STATUS","OTHER_SITES_OF_METS","PATIENT_GRADE","PRIMARY_SITE","PRIMARY_TUMOR_LOCATION","SAMPLE_COUNT","SAMPLE_TYPE","SEX","SOMATIC_STATUS","SPECIMEN_TYPE","STAGE_AT_DIAGNOSIS","TIME_FROM_MET_DX_SEQUENCING","TIME_TO_METASTASIS_MONTHS","TMB_NONSYNONYMOUS","TUMOR_SAMPLE_HISTOLOGY","VITAL_STATUS"],"molecularProfileIds":["crc_msk_2017_gistic","crc_msk_2017_mutations","crc_msk_2017_structural_variants"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations"]}}]}} ▶ navigate_to_study_view { "studyIds": [ "crc_msk_2017" ], "filterJson": { "clinicalDataFilters": [ { "attributeId": "MSI_STATUS", "values": [ { "value": "MSS" } ] } ], "geneFilters": [ { "molecularProfileIds": [ "crc_msk_2017_mutations" ], "geneQueries": [ [ { "hugoGeneSymbol": "BRAF" } ] ] } ] } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/study/summary?id=crc_msk_2017#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MSI_STATUS%22%2C%22values%22%3A%5B%7B%22value%22%3A%22MSS%22%7D%5D%7D%5D%2C%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22BRAF%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22crc_msk_2017_mutations%22%5D%7D%5D%7D","url":"https://www.cbioportal.org/study/summary?id=crc_msk_2017#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MSI_STATUS%22%2C%22values%22%3A%5B%7B%22value%22%3A%22MSS%22%7D%5D%7D%5D%2C%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22BRAF%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22crc_msk_2017_mutations%22%5D%7D%5D%7D","data":{"studyIds":["crc_msk_2017"],"studies":[{"studyId":"crc_msk_2017","name":"Metastatic Colorectal Cancer (MSK, Cancer Cell 2018)","sampleCount":1134}],"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."}} ═ answer (success) Perfect! Now let me provide a comprehensive answer with all the data: --- ## BRAF Oncogenic Mutations in MSS Colorectal Cancer (MSK 2017 Study) ### Key Finding: **No OncoKB-Annotated BRAF Oncogenic Mutations** Unfortunately, **the MSK 2017 colorectal cancer study does NOT have OncoKB driver annotations** for any BRAF mutations. The `driver_filter` field is empty (not annotated) for all BRAF mutations in this cohort. However, I can provide you with the complete inventory of **all BRAF mutations found in MSS samples** (701 profiled for BRAF): ### Overall BRAF Mutation Frequency in MSS CRC: - **Total BRAF-mutant MSS samples:** 78 / 701 profiled = **11.13%** ### Detailed Mutation Breakdown | Mutation Variant | Mutation Type | Count | Profiled | Frequency (%) | OncoKB Driver Status | |---|---|---|---|---|---| | V600E | Missense | 46 | 701 | 6.56% | Not annotated | | D594G | Missense | 7 | 701 | 1.00% | Not annotated | | D594N | Missense | 3 | 701 | 0.43% | Not annotated | | G469A | Missense | 2 | 701 | 0.29% | Not annotated | | G469E | Missense | 2 | 701 | 0.29% | Not annotated | | N581S | Missense | 2 | 701 | 0.29% | Not annotated | | T599delinsIP | In-Frame Insertion | 2 | 701 | 0.29% | Not annotated | | A404Cfs*9 | Frame Shift Insertion | 1 | 701 | 0.14% | Not annotated | | D284Efs*4 | Frame Shift Insertion | 1 | 701 | 0.14% | Not annotated | | D594V | Missense | 1 | 701 | 0.14% | Not annotated | | E501K | Missense | 1 | 701 | 0.14% | Not annotated | | F294L | Missense | 1 | 701 | 0.14% | Not annotated | | G466V | Missense | 1 | 701 | 0.14% | Not annotated | | G596R | Missense | 1 | 701 | 0.14% | Not annotated | | H574Y | Missense | 1 | 701 | 0.14% | Not annotated | | K601E | Missense | 1 | 701 | 0.14% | Not annotated | | L312P | Missense | 1 | 701 | 0.14% | Not annotated | | N581I | Missense | 1 | 701 | 0.14% | Not annotated | | P277Hfs*2 | Frame Shift Deletion | 1 | 701 | 0.14% | Not annotated | | Q356K | Missense | 1 | 701 | 0.14% | Not annotated | | R354* | Nonsense | 1 | 701 | 0.14% | Not annotated | | S602Y | Missense | 1 | 701 | 0.14% | Not annotated | | Y633C | Missense | 1 | 701 | 0.14% | Not annotated | **Note:** V600E is the canonical BRAF oncogenic hotspot variant (activation loop mutation). Although biologically it is known to be oncogenic, **this study's database does not carry OncoKB annotation metadata** for BRAF. ### Access the Filtered Cohort [View MSS colorectal cancer samples with BRAF mutations in cBioPortal](https://www.cbioportal.org/study/summary?id=crc_msk_2017#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MSI_STATUS%22%2C%22values%22%3A%5B%7B%22value%22%3A%22MSS%22%7D%5D%7D%5D%2C%22geneFilters%22%3A%5B%7B%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22BRAF%22%7D%5D%5D%2C%22molecularProfileIds%22%3A%5B%22crc_msk_2017_mutations%22%5D%7D%5D%7D)