Q (sonnet): How does methylation of the MGMT gene promoter affect the prognosis and treatment response in patients with glioblastoma? ▶ list_studies { "search": "glioblastoma" } ▶ read_guide { "uri": "cbioportal://clinical-data-guide" } ◀ result {"result":[{"cancer_study_identifier":"gbm_tcga","name":"Glioblastoma Multiforme (TCGA, Firehose Legacy)","type_of_cancer_id":"difg","sample_count":619,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_tcga"},{"cancer_study_identifier":"gbm_tcga_gdc","name":"Glioblastoma Multiforme (TCGA GDC, 2025)","type_of_cancer_id":"difg","sample_count":611,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_tcga_gdc"},{"cancer_study_identifier":"gbm_tcga_pan_can_atlas_2018","name":"Glioblastoma Multiforme (TCGA, PanCancer Atlas)","type_of_cancer_id":"difg","sample_count":592,"has_guide":true,"url":"https://www.cbioportal.org/study/summary?id=gbm_tcga_pan_can_atlas_2018"},{"cancer_study_identifier":"gbm_tcga_pub2013","name":"Glioblastoma (TCGA, Cell 2013)","type_of_cancer_id":"difg","sample_count":577,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_tcga_pub2013"},{"cancer_study_identifier":"gbm_tcga_pub","name":"Glioblastoma (TCGA, Nature 2008)","type_of_cancer_id":"difg","sample_count":206,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_tcga_pub"},{"cancer_study_identifier":"gbm_cptac_2021","name":"Glioblastoma (CPTAC, Cell 2021)","type_of_cancer_id":"difg","sample_count":99,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_cptac_2021"},{"cancer_study_identifier":"gbm_columbia_2019","name":"Glioblastoma (Columbia, Nat Med. 2019)","type_of_cancer_id":"difg","sample_count":42,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_columbia_2019"},{"cancer_study_identifier":"gbm_iatlas_prins_2019","name":"Glioblastoma (Randomized Clinical Trial, Nat Med. 2019) - iAtlas Harmonized","type_of_cancer_id":"adifg","sample_count":30,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=gbm_iatlas_prins_2019"}]} ◀ result # Clinical Data Query Guide ## Overview Clinical data in cBioPortal is stored at both patient and sample levels. Understanding the distinction is crucial for accurate analysis. ## Data Organization ### Patient-Level vs Sample-Level Data - **Patient-level**: Demographics, overall survival, disease stage (stored once per patient) - **Sample-level**: Sample type, sequencing platform, purity (can have multiple per patient) ### Key Tables - `clinical_patient`: Patient-level clinical attributes - `clinical_sample`: Sample-level clinical attributes - `clinical_data_derived`: Pre-joined view combining both levels - `clinical_attribute_meta`: Metadata about available clinical attributes ## Recommended Approach: Use clinical_data_derived The `clinical_data_derived` table is pre-joined and optimized for most queries: ```sql -- Get clinical data for specific attributes SELECT sample_unique_id, patient_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name IN ('CANCER_TYPE', 'SAMPLE_TYPE', 'TMB_NONSYNONYMOUS'); ``` ## Clinical Attribute Discovery ### Use clinical_attribute_meta for Discovering Available Attributes **Always start here** to see what clinical attributes are available for a specific study: ```sql -- Discover available clinical attributes for a study SELECT attr_id, description, patient_attribute, cancer_study_id FROM clinical_attribute_meta WHERE cancer_study_id = ( SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier = 'your_study_id' ) ORDER BY patient_attribute, attr_id; ``` **Key Fields:** - **attr_id**: matches attr_id in clinical_sample/clinical_patient tables - **description**: human-readable description of the attribute - **patient_attribute**: true = patient attribute, false = sample attribute - **cancer_study_id**: links to cancer_study table (filter by study) ## Attribute Semantics and Matching ### Case-Insensitive Matching for Attribute Values Clinical values are free text across studies and may differ only by case. For example, a controlled-looking value such as germline mutation status may appear as `GERMLINE`, `Germline`, or another case variant. When filtering `clinical_data_derived.attribute_value`, use case-insensitive matching unless you have already profiled the exact values in the target study: ```sql -- Correct: case-insensitive clinical value filter SELECT DISTINCT sample_unique_id, patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name = 'MUTATION_STATUS' AND upper(attribute_value) = 'GERMLINE'; ``` Do not write `attribute_value = 'GERMLINE'` without first checking all distinct values for that attribute in the study. ### Query the Requested Attribute, Not a Proxy Do not infer one clinical attribute from a related subtype or marker. Query the actual requested attribute when it … (17073 more chars) ▶ clickhouse_run_select_query { "query": " SELECT attr_id, description, patient_attribute FROM clinical_attribute_meta WHERE cancer_study_id = (SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier = 'gbm_tcga_pan_can_atlas_2018') AND (upper(attr_id) LIKE '%MGMT%' OR upper(description) LIKE '%MGMT%') " } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": " SELECT cs.cancer_study_identifier, cam.attr_id, cam.description, cam.patient_attribute FROM clinical_attribute_meta cam JOIN cancer_study cs ON cs.cancer_study_id = cam.cancer_study_id WHERE cs.cancer_study_identifier IN ('gbm_tcga','gbm_tcga_gdc','gbm_tcga_pub2013','gbm_tcga_pub','gbm_cptac_2021','gbm_columbia_2019','gbm_iatlas_prins_2019') AND (upper(cam.attr_id) LIKE '%MGMT%' OR upper(cam.description) LIKE '%MGMT%') " } ◀ result {"rows":[{"cancer_study_identifier":"gbm_tcga_pub2013","attr_id":"MGMT_STATUS","description":"MGMT Status","patient_attribute":0}]} ▶ clickhouse_run_select_query { "query": " SELECT attribute_value, count(DISTINCT sample_unique_id) AS n_samples FROM clinical_data_derived WHERE cancer_study_identifier = 'gbm_tcga_pub2013' AND attribute_name = 'MGMT_STATUS' GROUP BY attribute_value ORDER BY n_samples DESC " } ▶ clickhouse_run_select_query { "query": " SELECT count(DISTINCT sample_unique_id) as total_samples FROM clinical_data_derived WHERE cancer_study_identifier = 'gbm_tcga_pub2013' " } ◀ result {"rows":[{"n_samples":227},{"attribute_value":"UNMETHYLATED","n_samples":180},{"attribute_value":"METHYLATED","n_samples":170}]} ◀ result {"rows":[{"total_samples":578}]} ▶ clickhouse_run_select_query { "query": " WITH mgmt AS ( SELECT patient_unique_id, any(attribute_value) AS mgmt_status FROM clinical_data_derived WHERE cancer_study_identifier = 'gbm_tcga_pub2013' AND attribute_name = 'MGMT_STATUS' GROUP BY patient_unique_id ), os AS ( SELECT patient_unique_id, maxIf(toFloat64OrNull(attribute_value), attribute_name = 'OS_MONTHS') AS os_months, maxIf(attribute_value, attribute_name = 'OS_STATUS') AS os_status FROM clinical_data_derived WHERE cancer_study_identifier = 'gbm_tcga_pub2013' AND attribute_name IN ('OS_MONTHS','OS_STATUS') GROUP BY patient_unique_id ) SELECT m.mgmt_status AS group_name, count() AS n_patients, countIf(startsWith(os.os_status, '1')) AS n_events, countIf(startsWith(os.os_status, '0')) AS n_censored, round(min(os.os_months),1) AS min_followup, round(max(os.os_months),1) AS max_followup FROM mgmt m JOIN os ON os.patient_unique_id = m.patient_unique_id WHERE os.os_months IS NOT NULL AND os.os_status != '' GROUP BY group_name " } ◀ result {"rows":[{"n_patients":193,"n_events":171,"n_censored":22,"min_followup":0.1,"max_followup":115.9},{"group_name":"UNMETHYLATED","n_patients":179,"n_events":131,"n_censored":48,"min_followup":0.1,"max_followup":127.6},{"group_name":"METHYLATED","n_patients":169,"n_events":115,"n_censored":54,"min_followup":0.1,"max_followup":100}]} ▶ resolve_and_route { "studyIds": [ "gbm_tcga_pub2013" ] } ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"gbm_tcga_pub2013","name":"Glioblastoma (TCGA, Cell 2013)","sampleCount":577,"studyViewUrl":"https://www.cbioportal.org/study?id=gbm_tcga_pub2013","metadata":{"clinicalAttributeIds":["AGE","CANCER_TYPE","CANCER_TYPE_DETAILED","DFS_MONTHS","DFS_STATUS","EXPRESSION_SUBTYPE","FRACTION_GENOME_ALTERED","G_CIMP_METHYLATION","IDH1_MUTATION","METHYLATION_STATUS","MGMT_STATUS","MUTATION_COUNT","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","SAMPLE_COUNT","SAMPLE_TYPE","SEX","SOMATIC_STATUS","THERAPY","TMB_NONSYNONYMOUS"],"molecularProfileIds":["gbm_tcga_pub2013_gistic","gbm_tcga_pub2013_linear_CNA","gbm_tcga_pub2013_mutations","gbm_tcga_pub2013_protein_quantification","gbm_tcga_pub2013_protein_quantification_zscores","gbm_tcga_pub2013_rna_seq_v2_mrna","gbm_tcga_pub2013_rna_seq_v2_mrna_median_Zscores","gbm_tcga_pub2013_rna_seq_v2_mrna_median_all_sample_Zscores"],"heatmapProfileIds":["gbm_tcga_pub2013_protein_quantification_zscores","gbm_tcga_pub2013_rna_seq_v2_mrna_median_Zscores","gbm_tcga_pub2013_rna_seq_v2_mrna_median_all_sample_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna","protein"]}}]}} ▶ get_studyviewfilter_options { "studyId": "gbm_tcga_pub2013", "attributeIds": [ "MGMT_STATUS" ] } ◀ result {"success":true,"message":"Successfully retrieved StudyView filter options","data":{"studyId":"gbm_tcga_pub2013","attributes":[{"attributeId":"MGMT_STATUS","displayName":"MGMT Status","description":"MGMT Status","datatype":"STRING","values":["NA","METHYLATED","UNMETHYLATED"]}]}} ▶ navigate_to_group_comparison { "studyIds": [ "gbm_tcga_pub2013" ], "tab": "survival", "groups": [ { "name": "Methylated", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "MGMT_STATUS", "values": [ { "value": "METHYLATED" } ] } ] } }, { "name": "Unmethylated", "studyViewFilter": { "clinicalDataFilters": [ { "attributeId": "MGMT_STATUS", "values": [ { "value": "UNMETHYLATED" } ] } ] } } ] } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d0ade497aad53593c289","url":"https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d0ade497aad53593c289","data":{"description":"Group comparison (2 custom groups)","studies":["gbm_tcga_pub2013"],"totalGroups":2,"groups":[{"name":"Methylated","sampleCount":170},{"name":"Unmethylated","sampleCount":180}],"studyViewUrl":"https://www.cbioportal.org/study?id=gbm_tcga_pub2013","groupUrls":[{"groupName":"Methylated","url":"https://www.cbioportal.org/study?id=gbm_tcga_pub2013#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MGMT_STATUS%22%2C%22values%22%3A%5B%7B%22value%22%3A%22METHYLATED%22%7D%5D%7D%5D%7D"},{"groupName":"Unmethylated","url":"https://www.cbioportal.org/study?id=gbm_tcga_pub2013#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22MGMT_STATUS%22%2C%22values%22%3A%5B%7B%22value%22%3A%22UNMETHYLATED%22%7D%5D%7D%5D%7D"}],"pageDescription":"Kaplan-Meier survival analysis comparing Methylated (170) vs Unmethylated (180)."}} ═ answer (success) [Kaplan–Meier survival comparison: MGMT Methylated (170 samples) vs Unmethylated (180 samples)](https://www.cbioportal.org/comparison/survival?comparisonId=6ab5d0ade497aad53593c289) — this will compute the actual log-rank p-value and survival curves that I can't calculate directly. [Study overview: Glioblastoma (TCGA, Cell 2013)](https://www.cbioportal.org/study/summary?id=gbm_tcga_pub2013) This cohort also has a `THERAPY` clinical attribute recorded, so if you want to stratify by treatment (e.g. temozolomide) in addition to methylation status, that's available in the Group Comparison / Study View interface as well. --- ## General background (not from cBioPortal — flagging explicitly) Outside of what the database shows, it's well established in the neuro-oncology literature that MGMT (O⁶-methylguanine-DNA methyltransferase) promoter methylation silences a DNA repair enzyme that would otherwise reverse the cytotoxic DNA damage caused by alkylating chemotherapy (temozolomide). This is generally associated with: - **Improved prognosis** — longer progression-free and overall survival, largely independent of treatment. - **Greater sensitivity to alkylating chemotherapy** — landmark trials (e.g., Hegi et al., NEJM 2005) found that patients with a methylated MGMT promoter derived the most survival benefit from adding temozolomide to radiotherapy, while unmethylated tumors show comparatively limited benefit from temozolomide alone. I have not verified this against any external literature database in this conversation — it reflects general medical knowledge and should not be treated as a clinical recommendation. For an actual research decision or patient management question, please consult primary literature or a clinical oncologist. If you'd like, I can also check whether any glioblastoma cohort in the database captures treatment (temozolomide) history alongside MGMT status so you can build your own contingency analysis of response by methylation group.