Q (sonnet-5.5): show me gbm with mgmt hypermethylation ▶ read_guide { "uri": "cbioportal://gene-expression-guide" } ▶ list_studies { "search": "glioblastoma", "limit": 50 } ◀ result # Gene Expression Analysis Guide This guide covers continuous-value genomic data: gene **expression**, **copy number** values, **methylation**, and related profile types. Mutation/CNA/SV *frequency* analysis lives in `cbioportal://mutation-frequency-guide`. ## Where this data lives Continuous per-sample-per-gene values are stored in `genetic_alteration_derived`: | Column | Description | |---|---| | `sample_unique_id` | `_` | | `cancer_study_identifier` | study scope | | `hugo_gene_symbol` | gene | | `profile_type` | which assay/normalization (see below) | | `alteration_value` | the actual value — stored as Nullable(String); cast with `toFloat64OrNull` | `alteration_value` is a string because the same column hosts many different value scales. The `''` and `'NA'` sentinels mean "missing"; always filter them out and use `toFloat64OrNull(alteration_value) IS NOT NULL` for downstream math. ## Discovering profile types for a study Different studies expose different profile types depending on what assays were run and how the data was normalized. Always check what a specific study supports before picking one: ```sql SELECT DISTINCT profile_type FROM genetic_alteration_derived WHERE cancer_study_identifier = 'brca_metabric' ORDER BY profile_type; ``` Common values across the public portal: | Family | Profile types | |---|---| | mRNA expression | `rna_seq_v2_mrna`, `rna_seq_v2_mrna_median_Zscores`, `rna_seq_v2_mrna_median_all_sample_Zscores` (TCGA PanCancer Atlas), `mrna`, `mrna_median_Zscores`, `mrna_seq_v2_rsem`, `mrna_seq_v2_rsem_Zscores`, `mrna_seq_cpm`, `mrna_seq_fpkm`, `mrna_U133`, `mrna_outliers` | | Copy number (continuous) | `cna`, `linear_CNA`, `log2CNA`, `cna_consensus`, `cna_rae`, `gistic` | | Methylation | `methylation_hm27`, `methylation_hm450`, `methylation_epic`, `methylation_promoters_rrbs` | | miRNA | `mirna`, `mirna_median_Zscores` | | Protein | `protein_quantification`, `protein_level`, `RPPA` | **Z-score vs raw choice.** When the user asks "is X correlated with Y", either works for Spearman (rank-based) — Pearson would care. Default to the non-Z-score variant if both exist, and call out which one in the response. ## Canonical recipe — Spearman correlation between two genes ```sql SELECT * FROM gene_pair_coexpression( study = 'brca_metabric', gene_a = 'TP53', gene_b = 'MYC', profile_type = 'mrna' ); ``` Returns one row: `(gene_a, gene_b, profile_type, spearman_correlation, num_samples)`. - `spearman_correlation` in [−1, 1]; `NULL` when fewer than 3 valid paired samples. - Mirrors cbioportal-backend's `ClickhouseCoExpressionMapper.getCoExpressions`, simplified to a pair lookup (the backend computes one ref gene vs ALL other genes for the coexpression page; here the agent asks about a specific pair). ### Verified examples | Study | gene_a | gene_b | profile_type | spearman | n | |---|---|---|---|---|---| | `brca_metabric` | TP53 | MYC | `mrna` | 0.118 | 1980 | | … (4931 more chars) ◀ 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"}]} ═ answer (success) Several glioblastoma (GBM) studies match your request. Which one do you want? - [Glioblastoma Multiforme (TCGA, PanCancer Atlas)](https://www.cbioportal.org/study/summary?id=gbm_tcga_pan_can_atlas_2018) (`gbm_tcga_pan_can_atlas_2018`): 592 samples - [Glioblastoma Multiforme (TCGA, Firehose Legacy)](https://www.cbioportal.org/study/summary?id=gbm_tcga) (`gbm_tcga`): 619 samples - [Glioblastoma Multiforme (TCGA GDC, 2025)](https://www.cbioportal.org/study/summary?id=gbm_tcga_gdc) (`gbm_tcga_gdc`): 611 samples - [Glioblastoma (TCGA, Cell 2013)](https://www.cbioportal.org/study/summary?id=gbm_tcga_pub2013) (`gbm_tcga_pub2013`): 577 samples - [Glioblastoma (TCGA, Nature 2008)](https://www.cbioportal.org/study/summary?id=gbm_tcga_pub) (`gbm_tcga_pub`): 206 samples - [Glioblastoma (CPTAC, Cell 2021)](https://www.cbioportal.org/study/summary?id=gbm_cptac_2021) (`gbm_cptac_2021`): 99 samples - [Glioblastoma (Columbia, Nat Med. 2019)](https://www.cbioportal.org/study/summary?id=gbm_columbia_2019) (`gbm_columbia_2019`): 42 samples - [Glioblastoma (Randomized Clinical Trial, Nat Med. 2019), iAtlas Harmonized](https://www.cbioportal.org/study/summary?id=gbm_iatlas_prins_2019) (`gbm_iatlas_prins_2019`): 30 samples You can also say "all of them." I also need to know what you mean by "MGMT hypermethylation": 1. **MGMT promoter methylation status.** This is the clinical methylated or unmethylated call, where it is recorded. 2. **MGMT methylation levels.** These are the continuous probe-level values, such as HM27 or HM450 beta values, with a threshold you choose for "hyper." I'll then count the MGMT-hypermethylated samples in the study you pick and link the cohort in cBioPortal.