Q (sonnet): What are the top 5 most frequently copy number altered genes in the Osteosarcoma study from TARGET? ▶ list_guides {} ▶ resolve_and_route { "studyKeywords": [ "TARGET", "osteosarcoma" ] } ◀ result {"result":[{"uri":"cbioportal://mutation-frequency-guide","description":"Comprehensive guide for calculating gene mutation frequencies with gene-specific profiling denominators"},{"uri":"cbioportal://clinical-data-guide","description":"Guide for querying clinical data including patient vs sample level considerations"},{"uri":"cbioportal://sample-filtering-guide","description":"Guide for filtering samples and studies in cBioPortal queries"},{"uri":"cbioportal://common-pitfalls","description":"Guide to avoid common mistakes when querying cBioPortal data. If you already know which numbered pitfall applies, fetch just that section via read_guide(\"cbioportal://common-pitfalls#\") (e.g. #16) instead of the full guide"},{"uri":"cbioportal://treatment-guide","description":"Guide for querying treatment/clinical event data including drug agents, timelines, and linking to genomic data"},{"uri":"cbioportal://faq-guide","description":"General cBioPortal FAQ: history, how to cite, data types, reference genome, abbreviations, GISTIC thresholds, API access"},{"uri":"cbioportal://statistical-tests-guide","description":"Statistical test selection guide — decision matrix for choosing Fisher's exact, Wilcoxon, chi-squared, t-test, ANOVA, etc. based on data type and group count"},{"uri":"cbioportal://gene-expression-guide","description":"Gene expression / copy-number / methylation analysis. Covers genetic_alteration_derived, profile_type discovery, and the gene_pair_coexpression view for Spearman correlation between two genes"},{"uri":"cbioportal://external-resources-guide","description":"Guide for finding external linked resources such as imaging, pathology, Minerva, HTAN, or other resource_* table links before declaring data unavailable"},{"uri":"cbioportal://gene-resolution-guide","description":"Guide for resolving ambiguous gene symbols, aliases, gene families, and shorthand such as CD3 before querying expression or alteration data"},{"uri":"cbioportal://study-resolution-guide","description":"Guide for resolving requested studies, avoiding silent substitute cohorts, and redirecting to known external cBioPortal instances when data is not in this deployment"},{"uri":"cbioportal://germline-guide","description":"Guide for querying germline variant data — storage columns, study discovery, query patterns, and somatic vs germline considerations"},{"uri":"cbioportal://study-guide/{study_id}","description":"Dynamic study-specific guide - use get_study_guide(study_id) tool to generate"}]} ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"os_target_gdc","name":"Osteosarcoma (TARGET GDC, 2025)","sampleCount":159,"studyViewUrl":"https://www.cbioportal.org/study?id=os_target_gdc","metadata":{"clinicalAttributeIds":["AGE","CANCER_TYPE","CANCER_TYPE_DETAILED","DAYS_TO_BIRTH","DAYS_TO_DEATH","DISEASE_TYPE","ETHNICITY","MUTATION_COUNT","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","PRIMARY_DIAGNOSIS","PRIMARY_SITE_PATIENT","PROJECT_ID","RACE","SAMPLE_COUNT","SEX","SPECIMEN_TYPE","TMB_NONSYNONYMOUS","VITAL_STATUS"],"molecularProfileIds":["os_target_gdc_cna","os_target_gdc_mrna_seq_fpkm","os_target_gdc_mrna_seq_fpkm_Zscores","os_target_gdc_mrna_seq_read_counts_Zscores","os_target_gdc_mrna_seq_tpm","os_target_gdc_mrna_seq_tpm_Zscores","os_target_gdc_mutations","os_target_gdc_rna_seq_mrna"],"heatmapProfileIds":["os_target_gdc_mrna_seq_fpkm_Zscores","os_target_gdc_mrna_seq_read_counts_Zscores","os_target_gdc_mrna_seq_tpm_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna"]}}]}} ▶ read_guide { "uri": "cbioportal://mutation-frequency-guide" } ▶ clickhouse_list_table_columns { "table": "genomic_event_derived" } ◀ 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":[{"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 * FROM top_cna_genes_in_study(study = 'os_target_gdc', top_n = 5)" } ◀ result {"rows":[{"hugo_gene_symbol":"LINC00901","cytoband":"3q13.31","cna_type":"HOMDEL","altered_samples":32,"profiled_samples":81,"frequency_pct":39.5},{"hugo_gene_symbol":"RN7SL442P","cytoband":"17p11.2","cna_type":"AMP","altered_samples":31,"profiled_samples":81,"frequency_pct":38.3},{"hugo_gene_symbol":"ALKBH5","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"ATPAF2","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"BRI3P3","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37}]} ▶ clickhouse_run_select_query { "query": "SELECT * FROM top_cna_genes_in_study(study = 'os_target_gdc', top_n = 20)" } ◀ result {"rows":[{"hugo_gene_symbol":"LINC00901","cytoband":"3q13.31","cna_type":"HOMDEL","altered_samples":32,"profiled_samples":81,"frequency_pct":39.5},{"hugo_gene_symbol":"RN7SL442P","cytoband":"17p11.2","cna_type":"AMP","altered_samples":31,"profiled_samples":81,"frequency_pct":38.3},{"hugo_gene_symbol":"ALKBH5","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"ATPAF2","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"BRI3P3","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"CARS1P2","cytoband":"8q23.3","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"DRC3","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"DRG2","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"FLII","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"GID4","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"LLGL1","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"MIEF2","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"MYO15A","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"NCOR1","cytoband":"17p12-p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"RNU5E-8P","cytoband":"3q13.31","cna_type":"HOMDEL","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"RNU6-314P","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"RNU6-862P","cytoband":"17p11.2","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"RPL22P21","cytoband":"17p12","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"RPLP1P11","cytoband":"17p12","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37},{"hugo_gene_symbol":"TRPS1-AS1","cytoband":"8q23.3","cna_type":"AMP","altered_samples":30,"profiled_samples":81,"frequency_pct":37}]} ▶ navigate_to_results_view { "studyIds": [ "os_target_gdc" ], "genes": [ "LINC00901", "RN7SL442P", "ALKBH5", "ATPAF2", "BRI3P3", "NCOR1", "FLII" ], "tab": "oncoprint" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/oncoprint?cancer_study_list=os_target_gdc&gene_list=LINC00901%0ARN7SL442P%0AALKBH5%0AATPAF2%0ABRI3P3%0ANCOR1%0AFLII&case_set_id=os_target_gdc_all","url":"https://www.cbioportal.org/results/oncoprint?cancer_study_list=os_target_gdc&gene_list=LINC00901%0ARN7SL442P%0AALKBH5%0AATPAF2%0ABRI3P3%0ANCOR1%0AFLII&case_set_id=os_target_gdc_all","data":{"studyIds":["os_target_gdc"],"studies":[{"studyId":"os_target_gdc","name":"Osteosarcoma (TARGET GDC, 2025)","sampleCount":159}],"genes":["LINC00901","RN7SL442P","ALKBH5","ATPAF2","BRI3P3","NCOR1","FLII"],"caseSetId":"os_target_gdc_all","pageDescription":"Visual summary of alterations in queried genes across samples."}} ▶ navigate_to_study_view { "studyIds": [ "os_target_gdc" ] } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/study/summary?id=os_target_gdc","url":"https://www.cbioportal.org/study/summary?id=os_target_gdc","data":{"studyIds":["os_target_gdc"],"studies":[{"studyId":"os_target_gdc","name":"Osteosarcoma (TARGET GDC, 2025)","sampleCount":159}],"tab":"summary","hasFilters":false,"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) ## Top 5 Most Frequently Copy-Number-Altered Genes — Osteosarcoma (TARGET GDC, 2025) Study: `os_target_gdc` — 159 samples total, 81 samples profiled for discrete CNA. | Rank | Gene | Cytoband | CNA Type | Altered / Profiled | Frequency | |------|------|----------|----------|---------------------|-----------| | 1 | **LINC00901** | 3q13.31 | HOMDEL | 32/81 | 39.5% | | 2 | **RN7SL442P** | 17p11.2 | AMP | 31/81 | 38.3% | | 3 | **ALKBH5** | 17p11.2 | AMP | 30/81 | 37.0% | | 4 | **ATPAF2** | 17p11.2 | AMP | 30/81 | 37.0% | | 5 | **BRI3P3** | 17p11.2 | AMP | 30/81 | 37.0% | **Notes:** - These frequencies use the panel-aware denominator (81 samples profiled for discrete CNA), not the full 159-sample cohort. - Ranks 2–5 (and many more genes beyond top 5, e.g. NCOR1, FLII, LLGL1, MYO15A — all 17p11.2, 30/81 = 37.0%) reflect a broad amplified segment at 17p11.2–p12, a recurrent copy-number event in osteosarcoma. Several of the top hits (LINC00901, RN7SL442P, BRI3P3) are non-coding RNAs/pseudogenes swept up within these large segments rather than individually distinctive drivers — protein-coding genes in the same amplicon (e.g., **NCOR1**, **ALKBH5**, **FLII**) are co-amplified at essentially the same frequency. - This reflects raw copy-number alteration frequency only; no driver/oncogenicity annotation was queried, so these should not be interpreted as confirmed cancer drivers. **Navigate:** - [OncoPrint — CNA genes in Osteosarcoma (TARGET GDC)](https://www.cbioportal.org/results/oncoprint?cancer_study_list=os_target_gdc&gene_list=LINC00901%0ARN7SL442P%0AALKBH5%0AATPAF2%0ABRI3P3%0ANCOR1%0AFLII&case_set_id=os_target_gdc_all) - [Study View — Osteosarcoma (TARGET GDC, 2025)](https://www.cbioportal.org/study/summary?id=os_target_gdc)