Q (sonnet): Which cBioPortal studies include lung adenocarcinoma samples with mutation and copy-number data? ▶ read_guide { "uri": "cbioportal://sample-filtering-guide" } ▶ search_oncotree { "search_term": "lung adenocarcinoma" } ◀ 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) ◀ result {"result":[{"code":"LUAD","name":"Lung Adenocarcinoma","score":80,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > NSCLC > LUAD"},{"code":"LAIS","name":"Lung Adenocarcinoma In Situ","score":60,"mainType":"Non-Small Cell Lung Cancer","tissue":"Lung","hierarchy":"LUNG > LAIS"}]} ▶ clickhouse_run_select_query { "query": "SELECT cancer_study_identifier, name, sample_count, mutation_sample_count, cna_sample_count FROM cancer_study WHERE type_of_cancer_id = 'luad' AND mutation_sample_count > 0 AND cna_sample_count > 0 ORDER BY sample_count DESC", "max_rows": 100 } ◀ result {"rows":[{"cancer_study_identifier":"luad_mskcc_2023_met_organotropism","name":"Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)","sample_count":2653,"mutation_sample_count":2653,"cna_sample_count":2422},{"cancer_study_identifier":"lung_msk_2017","name":"Non-Small Cell Cancer (MSK, Cancer Discov 2017)","sample_count":915,"mutation_sample_count":915,"cna_sample_count":915},{"cancer_study_identifier":"luad_mskcc_2020","name":"Lung Adenocarcinoma (MSK, J Thorac Oncol 2020)","sample_count":604,"mutation_sample_count":604,"cna_sample_count":604},{"cancer_study_identifier":"luad_tcga","name":"Lung Adenocarcinoma (TCGA, Firehose Legacy)","sample_count":586,"mutation_sample_count":230,"cna_sample_count":516},{"cancer_study_identifier":"luad_tcga_gdc","name":"Lung Adenocarcinoma (TCGA GDC, 2025)","sample_count":571,"mutation_sample_count":559,"cna_sample_count":508},{"cancer_study_identifier":"luad_tcga_pan_can_atlas_2018","name":"Lung Adenocarcinoma (TCGA, PanCancer Atlas)","sample_count":566,"mutation_sample_count":566,"cna_sample_count":511},{"cancer_study_identifier":"luad_msk_npjpo_2021","name":"Lung Adenocarcinoma (MSK, NPJ Precision Oncology 2021)","sample_count":426,"mutation_sample_count":426,"cna_sample_count":426},{"cancer_study_identifier":"luad_oncosg_2020","name":"Lung Adenocarcinoma (OncoSG, Nat Genet 2020)","sample_count":305,"mutation_sample_count":302,"cna_sample_count":302},{"cancer_study_identifier":"luad_cptac_gdc","name":"Lung Adenocarcinoma (CPTAC GDC, 2025)","sample_count":241,"mutation_sample_count":236,"cna_sample_count":232},{"cancer_study_identifier":"luad_tcga_pub","name":"Lung Adenocarcinoma (TCGA, Nature 2014)","sample_count":230,"mutation_sample_count":230,"cna_sample_count":230},{"cancer_study_identifier":"luad_mskimpact_2021","name":"Lung Adenocarcinoma (MSK, 2021)","sample_count":186,"mutation_sample_count":186,"cna_sample_count":186},{"cancer_study_identifier":"luad_broad","name":"Lung Adenocarcinoma (Broad, Cell 2012)","sample_count":183,"mutation_sample_count":183,"cna_sample_count":183},{"cancer_study_identifier":"luad_cptac_2020","name":"Lung Adenocarcinoma (CPTAC, Cell 2020)","sample_count":110,"mutation_sample_count":110,"cna_sample_count":110}]} ═ answer (success) **13 studies** in cBioPortal contain lung adenocarcinoma (LUAD) samples with both mutation and copy-number (CNA) data. Sample counts shown are totals per study; mutation/CNA counts are the profiled subset (denominator for any frequency calculation): | Study | Total samples | Mutation-profiled | CNA-profiled | |---|---|---|---| | [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) | 2,653 | 2,653 | 2,422 | | [Non-Small Cell Cancer (MSK, Cancer Discov 2017)](https://www.cbioportal.org/study/summary?id=lung_msk_2017) | 915 | 915 | 915 | | [Lung Adenocarcinoma (MSK, J Thorac Oncol 2020)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2020) | 604 | 604 | 604 | | [Lung Adenocarcinoma (TCGA, Firehose Legacy)](https://www.cbioportal.org/study/summary?id=luad_tcga) | 586 | 230 | 516 | | [Lung Adenocarcinoma (TCGA GDC, 2025)](https://www.cbioportal.org/study/summary?id=luad_tcga_gdc) | 571 | 559 | 508 | | [Lung Adenocarcinoma (TCGA, PanCancer Atlas)](https://www.cbioportal.org/study/summary?id=luad_tcga_pan_can_atlas_2018) | 566 | 566 | 511 | | [Lung Adenocarcinoma (MSK, NPJ Precision Oncology 2021)](https://www.cbioportal.org/study/summary?id=luad_msk_npjpo_2021) | 426 | 426 | 426 | | [Lung Adenocarcinoma (OncoSG, Nat Genet 2020)](https://www.cbioportal.org/study/summary?id=luad_oncosg_2020) | 305 | 302 | 302 | | [Lung Adenocarcinoma (CPTAC GDC, 2025)](https://www.cbioportal.org/study/summary?id=luad_cptac_gdc) | 241 | 236 | 232 | | [Lung Adenocarcinoma (TCGA, Nature 2014)](https://www.cbioportal.org/study/summary?id=luad_tcga_pub) | 230 | 230 | 230 | | [Lung Adenocarcinoma (MSK, 2021)](https://www.cbioportal.org/study/summary?id=luad_mskimpact_2021) | 186 | 186 | 186 | | [Lung Adenocarcinoma (Broad, Cell 2012)](https://www.cbioportal.org/study/summary?id=luad_broad) | 183 | 183 | 183 | | [Lung Adenocarcinoma (CPTAC, Cell 2020)](https://www.cbioportal.org/study/summary?id=luad_cptac_2020) | 110 | 110 | 110 | Note: totals across studies aren't additive — cohorts overlap (e.g., MSK-IMPACT studies share patients across releases). For the most commonly used reference cohort, here's the TCGA PanCancer Atlas overview with mutation and CNA data pre-filtered: [View TCGA LUAD PanCancer Atlas — Study Overview](https://www.cbioportal.org/study/summary?id=luad_tcga_pan_can_atlas_2018) If you'd like, I can open any specific study (e.g., the largest — MSK Met Organotropism 2023) or cross-study OncoPrint analysis instead — just let me know which cohort(s) to focus on.