Q (sonnet): show me P135L mutations in $p14^{ARF}$ ▶ read_guide { "uri": "cbioportal://gene-resolution-guide" } ◀ result # Gene Resolution Guide Use this guide before querying gene expression, mutation, copy-number, methylation, or structural-variant data when the user's gene term may be ambiguous. ## Routing Triggers Read this guide when the user mentions: - a gene family shorthand: `CD3`, `HLA`, `KRT`, `MUC`, `MT-`, `IGH`, `IGK`, `IGL` - a marker name that may refer to multiple genes or proteins - a gene alias, old symbol, or informal name - a wildcard-like term such as "all CD3 genes" These examples are not exhaustive. Apply this guide to any gene term that may resolve to multiple symbols, aliases, paralogs, family members, or marker genes. ## Core Rule Do not silently aggregate multiple genes when the user names an ambiguous symbol. Either ask for clarification or choose a clearly standard marker and state the choice. For example, "CD3 expression" can refer to `CD3D`, `CD3E`, or `CD3G`; in many immune-marker contexts `CD3E` is the standard marker, but the agent must not average all CD3 genes unless the user asks for a combined signature. ## Gene Discovery Query After validating the gene table exists, search exact symbols first, then prefix/alias-like matches: ```sql SELECT hugo_gene_symbol, entrez_gene_id FROM gene WHERE upper(hugo_gene_symbol) = upper('CD3') OR upper(hugo_gene_symbol) LIKE upper('CD3%') ORDER BY hugo_gene_symbol LIMIT 50; ``` If aliases are available in this deployment, inspect the relevant alias table before assuming no match. If no alias table exists, state that alias resolution is limited to available gene symbols. ## Answer Pattern If multiple plausible genes are found: > "CD3" is ambiguous in cBioPortal gene-symbol terms. I found `CD3D`, `CD3E`, and `CD3G`. Did you mean `CD3E` as a T-cell marker, or should I analyze all three separately? If the user clearly asks for a combined family/signature: - report each gene separately by default - only compute an average/signature if the user explicitly requests it - state exactly how the combined value was calculated ## Do Not - Do not average multiple genes into one expression value without explicit permission. - Do not rewrite an ambiguous symbol to a single gene without telling the user. - Do not treat a prefix match as a validated gene symbol. ▶ read_guide { "uri": "cbioportal://mutation-frequency-guide" } ▶ clickhouse_list_table_columns { "table": "gene_mutation_variants_in_study" } ◀ 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 {"columns":[]} ▶ clickhouse_list_table_columns { "table": "genomic_event_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."}]} ▶ clickhouse_run_select_query { "query": "SELECT hugo_gene_symbol, mutation_variant, mutation_type, mutation_status, COUNT(DISTINCT sample_unique_id) AS n_samples, COUNT(*) AS n_events FROM genomic_event_derived WHERE hugo_gene_symbol = 'CDKN2A' AND variant_type = 'mutation' AND (mutation_variant ILIKE '%135%' OR mutation_variant ILIKE '%P135%') GROUP BY hugo_gene_symbol, mutation_variant, mutation_type, mutation_status ORDER BY n_samples DESC LIMIT 50" } ◀ result {"rows":[{"hugo_gene_symbol":"CDKN2A","mutation_variant":"G135R","mutation_type":"Missense_Mutation","mutation_status":"SOMATIC","n_samples":6,"n_events":6},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"P135Q","mutation_type":"Missense_Mutation","mutation_status":"NA","n_samples":5,"n_events":5},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"G135E","mutation_type":"Missense_Mutation","mutation_status":"NA","n_samples":4,"n_events":4},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"P135S","mutation_type":"Missense_Mutation","mutation_status":"SOMATIC","n_samples":3,"n_events":3},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"P135S","mutation_type":"Missense_Mutation","mutation_status":"NA","n_samples":3,"n_events":3},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"P135S","mutation_type":"Missense_Mutation","mutation_status":"Somatic","n_samples":2,"n_events":2},{"hugo_gene_symbol":"CDKN2A","mutation_variant":"G135E","mutation_type":"Missense_Mutation","mutation_status":"SOMATIC","n_samples":1,"n_events":1}]} ▶ resolve_and_route { "studyIds": [ "msk_impact_50k_2026" ] } ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"msk_impact_50k_2026","name":"MSK-IMPACT 50K Clinical Sequencing Cohort (MSK, Cancer Cell 2026)","sampleCount":54331,"studyViewUrl":"https://www.cbioportal.org/study?id=msk_impact_50k_2026","metadata":{"clinicalAttributeIds":["AGE_AT_DX","ANCESTRY_LABEL","CANCER_TYPE","CANCER_TYPE_DETAILED","DISEASE_STATUS","FACETS_PLOIDY","FACETS_PURITY","FACETS_QC","FACETS_SUITE_VERSION","FACETS_WGD","FRACTION_GENOME_ALTERED","GENE_PANEL","HLA-A1","HLA-A2","HLA-B1","HLA-B2","HLA-C1","HLA-C2","HLA_A1_LOH","HLA_A2_LOH","HLA_B1_LOH","HLA_B2_LOH","HLA_C1_LOH","HLA_C2_LOH","HLA_GENOTYPE_AVAILABLE","METASTATIC_SITE","MSI_SCORE","MSI_TYPE","MUTATION_COUNT","N_OTHER_CANCER_TYPES","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","PRIMARY_SITE","PURITY_ESTIMATE_FROM_MUTATIONS","SAMPLE_COUNT","SAMPLE_COVERAGE","SAMPLE_TYPE","SEX","SOMATIC_STATUS","TMB_SCORE","TUMOR_PURITY"],"molecularProfileIds":["msk_impact_50k_2026_gistic","msk_impact_50k_2026_mutations","msk_impact_50k_2026_structural_variants"],"genericAssayProfiles":["msk_impact_50k_2026_armlevel_cna","msk_impact_50k_2026_loh_hla","msk_impact_50k_2026_mutational_signatures_contribution_v2"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","generic_assay_armlevel_cna","generic_assay_loh_hla","generic_assay_mutational_signature"]}}]}} ▶ navigate_to_results_view { "studyIds": [ "msk_impact_50k_2026" ], "genes": [ "CDKN2A: MUT" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=msk_impact_50k_2026&gene_list=CDKN2A%3A+MUT&case_set_id=msk_impact_50k_2026_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=msk_impact_50k_2026&gene_list=CDKN2A%3A+MUT&case_set_id=msk_impact_50k_2026_all","data":{"studyIds":["msk_impact_50k_2026"],"studies":[{"studyId":"msk_impact_50k_2026","name":"MSK-IMPACT 50K Clinical Sequencing Cohort (MSK, Cancer Cell 2026)","sampleCount":54331}],"genes":["CDKN2A"],"caseSetId":"msk_impact_50k_2026_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ═ answer (success) ## Summary Searching cBioPortal's cross-cohort mutation data for **CDKN2A residue 135** (as it is numbered on the default, p16^INK4a‑frame transcript that cBioPortal uses for annotation), I found **no P135L** variant. What does exist at that position: **P135Q**, **P135S**, plus **G135R/G135E** (a distinct nearby residue call). **Important caveat, not a formality:** p14^ARF and p16^INK4a are two unrelated proteins translated in different reading frames from the same *CDKN2A* locus. cBioPortal annotates *CDKN2A* mutations using the p16^INK4a transcript's amino-acid numbering by default — it does not natively expose p14^ARF-frame protein positions. So "P135L in p14^ARF" isn't a coordinate system I can search directly; a true answer would require re-deriving the amino acid from the underlying genomic position through the ARF reading frame, which I'm not able to confirm reliably here. Two ways to move forward: - If you had a p16-numbered "P135L" in mind, it isn't present in the cohorts I can query (closest are P135Q/P135S). - If you have a specific genomic coordinate (chr9, hg19/hg38) or an HGVSc notation for the ARF-frame variant you're tracking, share it and I can check whether cBioPortal has any recorded mutation at that exact genomic position, independent of which protein's numbering is used. In the meantime, here is the full CDKN2A mutation lollipop/table across the MSK-IMPACT 50K cohort (54,331 samples) so you can inspect all recorded variants yourself: [View CDKN2A mutations — MSK-IMPACT 50K](https://www.cbioportal.org/results/mutations?cancer_study_list=msk_impact_50k_2026&gene_list=CDKN2A%3A+MUT&case_set_id=msk_impact_50k_2026_all) Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for CDKN2A across this cohort.