Q (sonnet): Show me cases where PALB2 or ATM have germline mutations ▶ read_guide { "uri": "cbioportal://germline-guide" } ◀ result Germline Variant Guide ====================== Overview -------- cBioPortal stores both somatic AND germline variant data. Many cBioPortal features work identically for both variant types. This guide explains how to query germline variants and what to be aware of. How Germline Data is Stored --------------------------- ### mutation_status is free text — always compare case-insensitively Each study loads its own spelling. Germline calls appear as `'Germline'`, `'GERMLINE'` and `'germline'`; somatic calls as `'Somatic'`, `'SOMATIC'` and `'somatic'`; unannotated mutations as `'NA'`, `'.'`, `'Unknown'`, `'UNKNOWN'`, `'__UNKNOWN__'` and others. Matching one spelling silently drops whole studies (`mutation_status = 'Germline'` misses `all_stjude_2013`, `aml_stjude_2024` and `pog570_bcgsc_2020`). - **Germline:** `upper(mutation_status) = 'GERMLINE'` - **Somatic:** `upper(mutation_status) = 'SOMATIC'` — but only when the user asks for somatic-only. Many studies label their somatic calls `'NA'` or `'UNKNOWN'`, so for ordinary mutation questions follow common-pitfalls #3 and exclude only `'UNCALLED'`. - When unsure, list the values first: `SELECT mutation_status, count() FROM genomic_event_derived WHERE cancer_study_identifier = '{study_id}' AND variant_type = 'mutation' GROUP BY mutation_status` ### Where the column lives - `genomic_event_derived.mutation_status` (preferred): mutations, and structural variants (from `sv_status`: `'SOMATIC'`, `'Somatic'`, `'GERMLINE'`) - `mutation_derived.mutationStatus`: the same values for mutations Identifying Studies with Germline Data -------------------------------------- Not all studies include germline data. Always check before querying: ```sql -- Find studies containing germline mutations SELECT cancer_study_identifier, COUNT(*) as germline_count FROM genomic_event_derived WHERE variant_type = 'mutation' AND upper(mutation_status) = 'GERMLINE' GROUP BY cancer_study_identifier ORDER BY germline_count DESC ``` Common Query Patterns --------------------- ### Count germline vs somatic mutations per gene in a study ```sql SELECT hugo_gene_symbol, upper(mutation_status) AS status, COUNT(*) as count FROM genomic_event_derived WHERE cancer_study_identifier = '{study_id}' AND variant_type = 'mutation' AND upper(mutation_status) IN ('GERMLINE', 'SOMATIC') GROUP BY hugo_gene_symbol, status ORDER BY count DESC LIMIT 20 ``` ### Find patients with germline mutations in a specific gene ```sql SELECT DISTINCT patient_unique_id, sample_unique_id, mutation_variant, mutation_type FROM genomic_event_derived WHERE hugo_gene_symbol = '{GENE}' AND upper(mutation_status) = 'GERMLINE' AND cancer_study_identifier = '{study_id}' AND variant_type = 'mutation' ``` ### Germline mutation frequency The numerator is samples with a germline mutation in the gene; the denominator is samples **profiled** for the gene — not samples that happen to have a mutation in it. Take the denominator from mutation-frequency-guide Step 2 (or … (2222 more chars) ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, hugo_gene_symbol, COUNT(*) AS germline_count FROM genomic_event_derived WHERE variant_type = 'mutation' AND hugo_gene_symbol IN ('PALB2', 'ATM') AND upper(mutation_status) = 'GERMLINE' GROUP BY cancer_study_identifier, hugo_gene_symbol ORDER BY germline_count DESC ", "max_rows": 200 } ◀ result {"rows":[{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","germline_count":11},{"cancer_study_identifier":"prad_su2c_2019","hugo_gene_symbol":"ATM","germline_count":8},{"cancer_study_identifier":"pog570_bcgsc_2020","hugo_gene_symbol":"ATM","germline_count":6},{"cancer_study_identifier":"kirc_tcga_pub","hugo_gene_symbol":"ATM","germline_count":3},{"cancer_study_identifier":"lung_nci_2022","hugo_gene_symbol":"ATM","germline_count":2},{"cancer_study_identifier":"pog570_bcgsc_2020","hugo_gene_symbol":"PALB2","germline_count":2}]} ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, hugo_gene_symbol, patient_unique_id, sample_unique_id, mutation_variant, mutation_type FROM genomic_event_derived WHERE variant_type = 'mutation' AND hugo_gene_symbol IN ('PALB2', 'ATM') AND upper(mutation_status) = 'GERMLINE' ORDER BY cancer_study_identifier, hugo_gene_symbol, patient_unique_id ", "max_rows": 100 } ◀ result {"rows":[{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-A2-A0T7","sample_unique_id":"brca_tcga_pub_TCGA-A2-A0T7-01","mutation_variant":"R3047*","mutation_type":"Nonsense_Mutation"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-A8-A08L","sample_unique_id":"brca_tcga_pub_TCGA-A8-A08L-01","mutation_variant":"G2023R","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-AN-A041","sample_unique_id":"brca_tcga_pub_TCGA-AN-A041-01","mutation_variant":"D1815Tfs*13","mutation_type":"Frame_Shift_Del"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-AN-A049","sample_unique_id":"brca_tcga_pub_TCGA-AN-A049-01","mutation_variant":"Q95*","mutation_type":"Nonsense_Mutation"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-AN-A0XL","sample_unique_id":"brca_tcga_pub_TCGA-AN-A0XL-01","mutation_variant":"X166_splice","mutation_type":"Splice_Site"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-B6-A0RV","sample_unique_id":"brca_tcga_pub_TCGA-B6-A0RV-01","mutation_variant":"X2032_splice","mutation_type":"Splice_Site"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-B6-A0WY","sample_unique_id":"brca_tcga_pub_TCGA-B6-A0WY-01","mutation_variant":"R2547_S2549del","mutation_type":"In_Frame_Del"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-BH-A0DD","sample_unique_id":"brca_tcga_pub_TCGA-BH-A0DD-01","mutation_variant":"R2912G","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-C8-A12X","sample_unique_id":"brca_tcga_pub_TCGA-C8-A12X-01","mutation_variant":"N1650S","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-D8-A13Z","sample_unique_id":"brca_tcga_pub_TCGA-D8-A13Z-01","mutation_variant":"X2544_splice","mutation_type":"Splice_Site"},{"cancer_study_identifier":"brca_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"brca_tcga_pub_TCGA-E2-A154","sample_unique_id":"brca_tcga_pub_TCGA-E2-A154-01","mutation_variant":"G2023R","mutation_type":"Missense_Mutation"},{"cancer_study_identifier":"kirc_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"kirc_tcga_pub_TCGA-B0-5097","sample_unique_id":"kirc_tcga_pub_TCGA-B0-5097-01","mutation_variant":"S496Ifs*16","mutation_type":"Frame_Shift_Del"},{"cancer_study_identifier":"kirc_tcga_pub","hugo_gene_symbol":"ATM","patient_unique_id":"kirc_tcga_pub_TCGA-BP-4988","sample_unique_id":"kirc_tcga_pub_TCGA-BP-4988-01","mutation_variant":"X9 … (4448 more chars) ▶ resolve_and_route { "studyIds": [ "brca_tcga_pub", "prad_su2c_2019", "pog570_bcgsc_2020", "kirc_tcga_pub", "lung_nci_2022" ] } ◀ result {"success":true,"message":"Found 5 matching studies. 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":5,"studiesWithMetadata":[{"studyId":"brca_tcga_pub","name":"Breast Invasive Carcinoma (TCGA, Nature 2012)","sampleCount":825,"studyViewUrl":"https://www.cbioportal.org/study?id=brca_tcga_pub","metadata":{"clinicalAttributeIds":["AGE","CANCER_TYPE","CANCER_TYPE_DETAILED","CN_CLUSTER","CONVERTED_STAGE","ER_STATUS","FRACTION_GENOME_ALTERED","HER2_STATUS","INTEGRATED_CLUSTERS_NO_EXP","INTEGRATED_CLUSTERS_UNSUP_EXP","INTEGRATED_CLUSTERS_WITH_PAM50","METASTASIS","METASTASIS_CODED","METHYLATION_CLUSTER","MIRNA_CLUSTER","MUTATION_COUNT","NODES","NODE_CODED","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","PAM50_SUBTYPE","PR_STATUS","RPPA_CLUSTER","SAMPLE_COUNT","SAMPLE_TYPE","SEX","SIGCLUST_INTRINSIC_MRNA","SIGCLUST_UNSUPERVISED_MRNA","SOMATIC_STATUS","SURVIVAL_DATA_FORM","TMB_NONSYNONYMOUS","TUMOR_STAGE","TUMOR_T1_CODED"],"molecularProfileIds":["brca_tcga_pub_gistic","brca_tcga_pub_linear_CNA","brca_tcga_pub_methylation_hm27","brca_tcga_pub_mirna","brca_tcga_pub_mirna_median_Zscores","brca_tcga_pub_mrna","brca_tcga_pub_mrna_median_Zscores","brca_tcga_pub_mrna_median_all_sample_Zscores","brca_tcga_pub_mrna_merged_median_Zscores","brca_tcga_pub_mutations","brca_tcga_pub_rppa","brca_tcga_pub_rppa_Zscores"],"heatmapProfileIds":["brca_tcga_pub_methylation_hm27","brca_tcga_pub_mrna_median_Zscores","brca_tcga_pub_mrna_median_all_sample_Zscores","brca_tcga_pub_mrna_merged_median_Zscores","brca_tcga_pub_rppa_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna","protein","dna_methylation"]}},{"studyId":"prad_su2c_2019","name":"Metastatic Prostate Adenocarcinoma (SU2C/PCF Dream Team, PNAS 2019)","sampleCount":444,"studyViewUrl":"https://www.cbioportal.org/study?id=prad_su2c_2019","metadata":{"clinicalAttributeIds":["ABI_ENZA_EXPOSURE_STATUS","AGE_AT_DIAGNOSIS","AGE_AT_PROCUREMENT","AR_CAPTURE_SCORE","AR_POLYA_SCORE","AR_SCORE","CANCER_TYPE","CANCER_TYPE_DETAILED","CAPTURE_ARV7_SRPM","CHEMO_REGIMEN_CATEGORY","ETS_FUSION_DETAILS","ETS_FUSION_SEQ","FRACTION_GENOME_ALTERED","GLEASON_SCORE","MUTATION_COUNT","NEPC_CAPTURE_SCORE","NEPC_POLYA_SCORE","NEPC_SCORE","NEUROENDOCRINE_FEATURES","OFF_ARSI","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER_SAMPLE_ID","PATHOLOGY_CLASSIFICATION","POLYA_ARV7_SRPM","PSA","RACE","RAF1_BRAF_STATUS","SAMPLE_COUNT","SEX","SOMATIC_STATUS","TAXANE_EXPOSURE_STATUS","TISSUE_SITE","TISSUE_SOURCE_SITE","TMB_NONSYNONYMOUS","UNIQUE_PAPER_SAMPLES"],"molecularProfileIds":["prad_su2c_2019_gistic","prad_su2c_2019_mrna_seq_fpkm_capture","prad_su2c_2019_mrna_seq_fpkm_capture_Zscores","prad_su2c_2019_mrna_seq_fpkm_capture_all_sample_Zscores","prad_su2c_2019_mrna_seq_fpkm_polya","prad_su2c_2019_mrna_seq_fpkm_polya_Zscores","prad_su2c_2019_mrna_seq_fpkm_poly … (3930 more chars) ▶ navigate_to_results_view { "studyIds": [ "brca_tcga_pub" ], "genes": [ "PALB2", "ATM" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=brca_tcga_pub&gene_list=PALB2%0AATM&case_set_id=brca_tcga_pub_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=brca_tcga_pub&gene_list=PALB2%0AATM&case_set_id=brca_tcga_pub_all","data":{"studyIds":["brca_tcga_pub"],"studies":[{"studyId":"brca_tcga_pub","name":"Breast Invasive Carcinoma (TCGA, Nature 2012)","sampleCount":825}],"genes":["PALB2","ATM"],"caseSetId":"brca_tcga_pub_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ▶ navigate_to_results_view { "studyIds": [ "prad_su2c_2019" ], "genes": [ "PALB2", "ATM" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=prad_su2c_2019&gene_list=PALB2%0AATM&case_set_id=prad_su2c_2019_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=prad_su2c_2019&gene_list=PALB2%0AATM&case_set_id=prad_su2c_2019_all","data":{"studyIds":["prad_su2c_2019"],"studies":[{"studyId":"prad_su2c_2019","name":"Metastatic Prostate Adenocarcinoma (SU2C/PCF Dream Team, PNAS 2019)","sampleCount":444}],"genes":["PALB2","ATM"],"caseSetId":"prad_su2c_2019_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ▶ navigate_to_results_view { "studyIds": [ "pog570_bcgsc_2020" ], "genes": [ "PALB2", "ATM" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=pog570_bcgsc_2020&gene_list=PALB2%0AATM&case_set_id=pog570_bcgsc_2020_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=pog570_bcgsc_2020&gene_list=PALB2%0AATM&case_set_id=pog570_bcgsc_2020_all","data":{"studyIds":["pog570_bcgsc_2020"],"studies":[{"studyId":"pog570_bcgsc_2020","name":"Pan-cancer Analysis of Advanced and Metastatic Tumors (BCGSC, Nature Cancer 2020)","sampleCount":570}],"genes":["PALB2","ATM"],"caseSetId":"pog570_bcgsc_2020_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ▶ navigate_to_results_view { "studyIds": [ "kirc_tcga_pub" ], "genes": [ "PALB2", "ATM" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=kirc_tcga_pub&gene_list=PALB2%0AATM&case_set_id=kirc_tcga_pub_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=kirc_tcga_pub&gene_list=PALB2%0AATM&case_set_id=kirc_tcga_pub_all","data":{"studyIds":["kirc_tcga_pub"],"studies":[{"studyId":"kirc_tcga_pub","name":"Kidney Renal Clear Cell Carcinoma (TCGA, Nature 2013)","sampleCount":446}],"genes":["PALB2","ATM"],"caseSetId":"kirc_tcga_pub_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ▶ navigate_to_results_view { "studyIds": [ "lung_nci_2022" ], "genes": [ "PALB2", "ATM" ], "tab": "mutations" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/mutations?cancer_study_list=lung_nci_2022&gene_list=PALB2%0AATM&case_set_id=lung_nci_2022_all","url":"https://www.cbioportal.org/results/mutations?cancer_study_list=lung_nci_2022&gene_list=PALB2%0AATM&case_set_id=lung_nci_2022_all","data":{"studyIds":["lung_nci_2022"],"studies":[{"studyId":"lung_nci_2022","name":"Lung Cancer in Never Smokers (NCI, Nature Genetics 2021)","sampleCount":232}],"genes":["PALB2","ATM"],"caseSetId":"lung_nci_2022_all","pageDescription":"Detailed mutation table with lollipop plot showing mutation positions, types, and frequencies for queried genes."}} ═ answer (success) Direct links to each cohort's mutation table for PALB2/ATM (each shows both somatic and germline calls — use the "Mutation Status" column in the table to filter to germline only): - [Breast Invasive Carcinoma (TCGA, Nature 2012) — 11 germline ATM cases](https://www.cbioportal.org/results/mutations?cancer_study_list=brca_tcga_pub&gene_list=PALB2%0AATM&case_set_id=brca_tcga_pub_all) - [Metastatic Prostate Adenocarcinoma (SU2C/PCF, PNAS 2019) — 8 germline ATM cases](https://www.cbioportal.org/results/mutations?cancer_study_list=prad_su2c_2019&gene_list=PALB2%0AATM&case_set_id=prad_su2c_2019_all) - [Pan-cancer Analysis of Advanced and Metastatic Tumors (POG570, BCGSC 2020) — 6 germline ATM + 2 germline PALB2 cases](https://www.cbioportal.org/results/mutations?cancer_study_list=pog570_bcgsc_2020&gene_list=PALB2%0AATM&case_set_id=pog570_bcgsc_2020_all) - [Kidney Renal Clear Cell Carcinoma (TCGA, Nature 2013) — 3 germline ATM cases](https://www.cbioportal.org/results/mutations?cancer_study_list=kirc_tcga_pub&gene_list=PALB2%0AATM&case_set_id=kirc_tcga_pub_all) - [Lung Cancer in Never Smokers (NCI, Nature Genetics 2021) — 2 germline ATM cases](https://www.cbioportal.org/results/mutations?cancer_study_list=lung_nci_2022&gene_list=PALB2%0AATM&case_set_id=lung_nci_2022_all) Let me know if you'd like this narrowed to a single study, an aggregated frequency (% of profiled samples) for one cohort, or a group comparison of germline-mutation carriers vs. non-carriers within one of these studies.