Q (sonnet-5.5): What is the correlation coefficient between EGFR copy number and EGFR mRNA expression in ovarian cancer? ▶ read_guide { "uri": "cbioportal://gene-expression-guide" } ▶ list_studies { "search": "ovarian" } ◀ 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":"msk_met_2021","name":"MSK MetTropism (MSK, Cell 2021)","type_of_cancer_id":"mixed","sample_count":25775,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=msk_met_2021"},{"cancer_study_identifier":"ov_tcga","name":"Ovarian Serous Cystadenocarcinoma (TCGA, Firehose Legacy)","type_of_cancer_id":"hgsoc","sample_count":617,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ov_tcga"},{"cancer_study_identifier":"hgsoc_tcga_gdc","name":"High-Grade Serous Ovarian Cancer (TCGA GDC, 2025)","type_of_cancer_id":"hgsoc","sample_count":604,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=hgsoc_tcga_gdc"},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","name":"Ovarian Serous Cystadenocarcinoma (TCGA, PanCancer Atlas)","type_of_cancer_id":"hgsoc","sample_count":585,"has_guide":true,"url":"https://www.cbioportal.org/study/summary?id=ov_tcga_pan_can_atlas_2018"},{"cancer_study_identifier":"ovary_geomx_gray_foundation_2024","name":"Ovarian Cancer (Gray Foundation, Cancer Discov 2024)","type_of_cancer_id":"ovary","sample_count":567,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ovary_geomx_gray_foundation_2024"},{"cancer_study_identifier":"ov_tcga_pub","name":"Ovarian Serous Cystadenocarcinoma (TCGA, Nature 2011)","type_of_cancer_id":"hgsoc","sample_count":489,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ov_tcga_pub"},{"cancer_study_identifier":"lgsoc_mapk_msk_2022","name":"Low-Grade Serous Ovarian Cancer (MSK, Clin Cancer Res 2022)","type_of_cancer_id":"lgsoc","sample_count":119,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=lgsoc_mapk_msk_2022"},{"cancer_study_identifier":"ovary_cptac_gdc","name":"Ovarian Cancer (CPTAC GDC, 2025)","type_of_cancer_id":"ovary","sample_count":112,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ovary_cptac_gdc"},{"cancer_study_identifier":"msk_spectrum_tme_2022","name":"Ovarian Cancer - MSK SPECTRUM (MSK, Nature 2022)","type_of_cancer_id":"ovary","sample_count":82,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=msk_spectrum_tme_2022"},{"cancer_study_identifier":"hgsoc_msk_2021","name":"High-Grade Serous Ovarian Cancer (MSK, NPJ Genome Med 2021)","type_of_cancer_id":"hgsoc","sample_count":45,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=hgsoc_msk_2021"},{"cancer_study_identifier":"ucec_msk_2024","name":"Endometrial and Ovarian Cancer (MSK, Nature Medicine 2024)","type_of_cancer_id":"mixed","sample_count":33,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ucec_msk_2024"},{"cancer_study_identifier":"ovarian_msk_2025","name":"Serous Ovarian Cancer (MSK, 2025)","type_of_cancer_id":"ovary","sample_count":31,"has_guide":false,"url":"https://www.cbioportal.org/study/summary?id=ovarian_msk_2025"},{"cancer_study_identifier":"mixed_msk_tcga_2021","name":"RAD51B Associated Mixed Cancers (MSK, N … (162 more chars) ▶ clickhouse_run_select_query { "query": "SELECT cancer_study_identifier, profile_type, count() c FROM genetic_alteration_derived WHERE hugo_gene_symbol='EGFR' AND cancer_study_identifier IN ('ov_tcga','ov_tcga_pan_can_atlas_2018','ov_tcga_pub','hgsoc_tcga_gdc','ovary_cptac_gdc') GROUP BY 1,2 ORDER BY 1,2" } ◀ result {"rows":[{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"cna","c":571},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"mrna_seq_fpkm","c":427},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"mrna_seq_fpkm_Zscores","c":427},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"mrna_seq_read_counts_Zscores","c":427},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"mrna_seq_tpm","c":427},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"mrna_seq_tpm_Zscores","c":427},{"cancer_study_identifier":"hgsoc_tcga_gdc","profile_type":"rna_seq_mrna","c":427},{"cancer_study_identifier":"ov_tcga","profile_type":"gistic","c":579},{"cancer_study_identifier":"ov_tcga","profile_type":"linear_CNA","c":579},{"cancer_study_identifier":"ov_tcga","profile_type":"methylation_hm27","c":592},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna","c":558},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna_U133","c":535},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna_U133_Zscores","c":535},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna_U133_all_sample_Zscores","c":535},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna_median_Zscores","c":558},{"cancer_study_identifier":"ov_tcga","profile_type":"mrna_median_all_sample_Zscores","c":558},{"cancer_study_identifier":"ov_tcga","profile_type":"protein_quantification","c":164},{"cancer_study_identifier":"ov_tcga","profile_type":"protein_quantification_zscores","c":174},{"cancer_study_identifier":"ov_tcga","profile_type":"rna_seq_v2_mrna","c":307},{"cancer_study_identifier":"ov_tcga","profile_type":"rna_seq_v2_mrna_median_Zscores","c":307},{"cancer_study_identifier":"ov_tcga","profile_type":"rna_seq_v2_mrna_median_all_sample_Zscores","c":307},{"cancer_study_identifier":"ov_tcga","profile_type":"rppa","c":436},{"cancer_study_identifier":"ov_tcga","profile_type":"rppa_Zscores","c":436},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"gistic","c":572},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"log2CNA","c":572},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"protein_quantification","c":121},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"protein_quantification_zscores","c":121},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"rna_seq_v2_mrna","c":300},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"rna_seq_v2_mrna_median_Zscores","c":300},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"rna_seq_v2_mrna_median_all_sample_Zscores","c":300},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"rppa","c":414},{"cancer_study_identifier":"ov_tcga_pan_can_atlas_2018","profile_type":"rppa_Zscores","c":414},{"cancer_study_identifier":"ov_tcga_pub","profile_type":"gistic","c":489},{"cancer_study_identifier":"ov_tcga_pub","profile_type":"linear_CNA","c":481},{" … (972 more chars) ▶ clickhouse_run_select_query { "query": "WITH pairs AS (SELECT * FROM (SELECT 'ov_tcga_pan_can_atlas_2018' s,'log2CNA' cp,'rna_seq_v2_mrna' mp UNION ALL SELECT 'ov_tcga','linear_CNA','rna_seq_v2_mrna' UNION ALL SELECT 'ov_tcga','linear_CNA','mrna' UNION ALL SELECT 'ov_tcga_pub','linear_CNA','mrna')) SELECT p.s, p.cp, p.mp, count() n, round(rankCorr(a.v,b.v),3) spearman, round(corr(a.v,b.v),3) pearson FROM pairs p JOIN (SELECT cancer_study_identifier s, profile_type cp, sample_unique_id, toFloat64OrNull(alteration_value) v FROM genetic_alteration_derived WHERE hugo_gene_symbol='EGFR' AND alteration_value NOT IN ('','NA') AND toFloat64OrNull(alteration_value) IS NOT NULL) a ON a.s=p.s AND a.cp=p.cp JOIN (SELECT cancer_study_identifier s, profile_type mp, sample_unique_id, toFloat64OrNull(alteration_value) v FROM genetic_alteration_derived WHERE hugo_gene_symbol='EGFR' AND alteration_value NOT IN ('','NA') AND toFloat64OrNull(alteration_value) IS NOT NULL) b ON b.s=p.s AND b.mp=p.mp AND a.sample_unique_id=b.sample_unique_id GROUP BY p.s,p.cp,p.mp ORDER BY p.s" } ◀ result {"rows":[{"p.s":"ov_tcga","p.cp":"linear_CNA","p.mp":"mrna","n":528,"spearman":0.284,"pearson":0.311},{"p.s":"ov_tcga","p.cp":"linear_CNA","p.mp":"rna_seq_v2_mrna","n":300,"spearman":0.355,"pearson":0.329},{"p.s":"ov_tcga_pan_can_atlas_2018","p.cp":"log2CNA","p.mp":"rna_seq_v2_mrna","n":295,"spearman":0.364,"pearson":0.335},{"p.s":"ov_tcga_pub","p.cp":"linear_CNA","p.mp":"mrna","n":481,"spearman":0.331,"pearson":0.306}]} ▶ navigate_to_results_view { "studyIds": [ "ov_tcga_pan_can_atlas_2018" ], "genes": [ "EGFR" ], "tab": "plots", "plotsHorzSelection": { "dataType": "COPY_NUMBER_ALTERATION", "selectedGeneOption": "EGFR" }, "plotsVertSelection": { "dataType": "MRNA_EXPRESSION", "selectedGeneOption": "EGFR" } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pan_can_atlas_2018&gene_list=EGFR&case_set_id=ov_tcga_pan_can_atlas_2018_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22COPY_NUMBER_ALTERATION%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22MRNA_EXPRESSION%22%7D","url":"https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pan_can_atlas_2018&gene_list=EGFR&case_set_id=ov_tcga_pan_can_atlas_2018_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22COPY_NUMBER_ALTERATION%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22MRNA_EXPRESSION%22%7D","data":{"studyIds":["ov_tcga_pan_can_atlas_2018"],"studies":[{"studyId":"ov_tcga_pan_can_atlas_2018","name":"Ovarian Serous Cystadenocarcinoma (TCGA, PanCancer Atlas)","sampleCount":585}],"genes":["EGFR"],"caseSetId":"ov_tcga_pan_can_atlas_2018_all","pageDescription":"Scatter/box plots: EGFR mRNA expression (y-axis) by EGFR CNA (x-axis)."}} ═ answer (success) In ovarian serous carcinoma, EGFR copy number and EGFR mRNA expression are positively but modestly correlated. Spearman ρ is about 0.36 and Pearson r about 0.34 in the main reference cohort. Cohort: TCGA PanCancer Atlas (ovarian serous cystadenocarcinoma). Unit: samples with both copy number and RNA-seq data (n = 295). Copy number is continuous log2 values and expression is RNA-seq V2 RSEM (not Z-scored). There are several ovarian studies in cBioPortal. I used the TCGA ones because they have both data types. The other TCGA ovarian cohorts give similar values: | Study | Copy number vs. mRNA | n | Spearman | Pearson | |---|---|---|---|---| | **TCGA PanCancer Atlas** | log2 CNA vs. RNA-seq V2 | 295 | **0.364** | 0.335 | | TCGA Firehose Legacy | linear CNA vs. RNA-seq V2 | 300 | 0.355 | 0.329 | | TCGA Firehose Legacy | linear CNA vs. microarray mRNA | 528 | 0.284 | 0.311 | | TCGA Nature 2011 | linear CNA vs. microarray mRNA | 481 | 0.331 | 0.306 | I didn't compute p-values. These TCGA studies overlap heavily in patients, so don't pool the rows. I didn't include the other ovarian cohorts (GDC re-processed TCGA, CPTAC and others). If you want a different one, tell me which. [View the EGFR copy number vs. mRNA plot (TCGA PanCancer Atlas ovarian)](https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pan_can_atlas_2018&gene_list=EGFR&case_set_id=ov_tcga_pan_can_atlas_2018_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22COPY_NUMBER_ALTERATION%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%221956%22%2C%22dataType%22%3A%22MRNA_EXPRESSION%22%7D). It shows EGFR mRNA expression (y-axis) by EGFR copy number (x-axis).