Q (sonnet): Is BRCA1 promoter methylation associated with decreased BRCA1 mRNA expression in ovarian cancer? ▶ list_guides {} ▶ resolve_and_route { "studyKeywords": [ "ovarian", "TCGA" ] } ◀ result {"result":[{"uri":"cbioportal://mutation-frequency-guide","description":"Comprehensive guide for calculating gene mutation frequencies with gene-specific profiling denominators"},{"uri":"cbioportal://clinical-data-guide","description":"Guide for querying clinical data including patient vs sample level considerations"},{"uri":"cbioportal://sample-filtering-guide","description":"Guide for filtering samples and studies in cBioPortal queries"},{"uri":"cbioportal://common-pitfalls","description":"Guide to avoid common mistakes when querying cBioPortal data. If you already know which numbered pitfall applies, fetch just that section via read_guide(\"cbioportal://common-pitfalls#\") (e.g. #16) instead of the full guide"},{"uri":"cbioportal://treatment-guide","description":"Guide for querying treatment/clinical event data including drug agents, timelines, and linking to genomic data"},{"uri":"cbioportal://faq-guide","description":"General cBioPortal FAQ: history, how to cite, data types, reference genome, abbreviations, GISTIC thresholds, API access"},{"uri":"cbioportal://statistical-tests-guide","description":"Statistical test selection guide — decision matrix for choosing Fisher's exact, Wilcoxon, chi-squared, t-test, ANOVA, etc. based on data type and group count"},{"uri":"cbioportal://gene-expression-guide","description":"Gene expression / copy-number / methylation analysis. Covers genetic_alteration_derived, profile_type discovery, and the gene_pair_coexpression view for Spearman correlation between two genes"},{"uri":"cbioportal://external-resources-guide","description":"Guide for finding external linked resources such as imaging, pathology, Minerva, HTAN, or other resource_* table links before declaring data unavailable"},{"uri":"cbioportal://gene-resolution-guide","description":"Guide for resolving ambiguous gene symbols, aliases, gene families, and shorthand such as CD3 before querying expression or alteration data"},{"uri":"cbioportal://study-resolution-guide","description":"Guide for resolving requested studies, avoiding silent substitute cohorts, and redirecting to known external cBioPortal instances when data is not in this deployment"},{"uri":"cbioportal://germline-guide","description":"Guide for querying germline variant data — storage columns, study discovery, query patterns, and somatic vs germline considerations"},{"uri":"cbioportal://study-guide/{study_id}","description":"Dynamic study-specific guide - use get_study_guide(study_id) tool to generate"}]} ◀ 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":"ov_tcga","name":"Ovarian Serous Cystadenocarcinoma (TCGA, Firehose Legacy)","sampleCount":617,"studyViewUrl":"https://www.cbioportal.org/study?id=ov_tcga","metadata":{"clinicalAttributeIds":["AGE","AJCC_PATHOLOGIC_TUMOR_STAGE","AJCC_STAGING_EDITION","CANCER_TYPE","CANCER_TYPE_DETAILED","CLINICAL_STAGE","CLIN_M_STAGE","CLIN_N_STAGE","CLIN_T_STAGE","DAYS_TO_COLLECTION","DAYS_TO_INITIAL_PATHOLOGIC_DIAGNOSIS","DAYS_TO_PATIENT_PROGRESSION_FREE","DAYS_TO_SPECIMEN_COLLECTION","DAYS_TO_TUMOR_PROGRESSION","DFS_MONTHS","DFS_STATUS","DISEASE_CODE","ECOG_SCORE","ETHNICITY","EXTRANODAL_INVOLVEMENT","FORM_COMPLETION_DATE","FRACTION_GENOME_ALTERED","GRADE","HISTOLOGICAL_DIAGNOSIS","HISTORY_NEOADJUVANT_TRTYN","HISTORY_OTHER_MALIGNANCY","ICD_10","ICD_O_3_HISTOLOGY","ICD_O_3_SITE","INFORMED_CONSENT_VERIFIED","INITIAL_PATHOLOGIC_DX_YEAR","IS_FFPE","JEWISH_RELIGION_HERITAGE_INDICATOR","KARNOFSKY_PERFORMANCE_SCORE","LONGEST_DIMENSION","LYMPHOVASCULAR_INVASION_INDICATOR","METHOD_OF_INITIAL_SAMPLE_PROCUREMENT","METHOD_OF_INITIAL_SAMPLE_PROCUREMENT_OTHER","METHOD_OF_SAMPLE_PROCUREMENT","MUTATION_COUNT","NEW_TUMOR_EVENT_AFTER_INITIAL_TREATMENT","OCT_EMBEDDED","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER_METHOD_OF_SAMPLE_PROCUREMENT","OTHER_PATIENT_ID","OTHER_SAMPLE_ID","PATHOLOGY_REPORT_FILE_NAME","PATHOLOGY_REPORT_UUID","PATH_M_STAGE","PATH_N_STAGE","PATH_T_STAGE","PERFORMANCE_STATUS_TIMING","PHARMACEUTICAL_TX_ADJUVANT","PRIMARY_SITE","PROJECT_CODE","PROSPECTIVE_COLLECTION","RACE","RADIATION_TREATMENT_ADJUVANT","RESIDUAL_TUMOR","RETROSPECTIVE_COLLECTION","SAMPLE_COUNT","SAMPLE_INITIAL_WEIGHT","SAMPLE_TYPE","SAMPLE_TYPE_ID","SEX","SHORTEST_DIMENSION","SOMATIC_STATUS","SPECIMEN_CURRENT_WEIGHT","SPECIMEN_FREEZING_METHOD","SPECIMEN_SECOND_LONGEST_DIMENSION","STAGE_OTHER","TIME_BETWEEN_CLAMPING_AND_FREEZING","TIME_BETWEEN_EXCISION_AND_FREEZING","TISSUE_SOURCE_SITE","TMB_NONSYNONYMOUS","TREATMENT_OUTCOME_FIRST_COURSE","TUMOR_STATUS","TUMOR_TISSUE_SITE","VASCULAR_INVASION_INDICATOR","VIAL_NUMBER"],"molecularProfileIds":["ov_tcga_gistic","ov_tcga_linear_CNA","ov_tcga_methylation_hm27","ov_tcga_mrna","ov_tcga_mrna_U133","ov_tcga_mrna_U133_Zscores","ov_tcga_mrna_U133_all_sample_Zscores","ov_tcga_mrna_median_Zscores","ov_tcga_mrna_median_all_sample_Zscores","ov_tcga_mutations","ov_tcga_protein_quantification","ov_tcga_protein_quantification_zscores","ov_tcga_rna_seq_v2_mrna","ov_tcga_rna_seq_v2_mrna_median_Zscores","ov_tcga_rna_seq_v2_mrna_median_all_sample_Zscores","ov_tcga_rppa","ov_tcga_rppa_Zscores"],"genericAssayProfiles":["ov_tcga_phosphoprotein_quantification"],"heatmapProfileIds":["ov_tcga_methylation_hm27","ov_tcga_mrna_U133_Zscores","ov_tcga_mrna_U133_all_sample_Zscores"," … (6173 more chars) ▶ read_guide { "uri": "cbioportal://gene-expression-guide" } ◀ 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 | `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 | | `brca_metabric` | ESR1 | PGR | `mrna` | 0.487 | 1980 | ESR1↔PGR is the textbook breast-cancer estrogen-receptor coregula … (2785 more chars) ▶ clickhouse_run_select_query { "query": " WITH meth AS ( SELECT sample_unique_id, toFloat64OrNull(alteration_value) AS v FROM genetic_alteration_derived WHERE cancer_study_identifier = 'ov_tcga_pub' AND profile_type = 'methylation_hm27' AND hugo_gene_symbol = 'BRCA1' AND alteration_value NOT IN ('', 'NA') AND toFloat64OrNull(alteration_value) IS NOT NULL ), expr AS ( SELECT sample_unique_id, toFloat64OrNull(alteration_value) AS v FROM genetic_alteration_derived WHERE cancer_study_identifier = 'ov_tcga_pub' AND profile_type = 'mrna' AND hugo_gene_symbol = 'BRCA1' AND alteration_value NOT IN ('', 'NA') AND toFloat64OrNull(alteration_value) IS NOT NULL ) SELECT rankCorr(meth.v, expr.v) AS spearman_correlation, count() AS num_samples FROM meth INNER JOIN expr USING (sample_unique_id) " } ◀ result {"rows":[{"spearman_correlation":-0.3642538233235566,"num_samples":489}]} ▶ clickhouse_run_select_query { "query": " WITH meth AS ( SELECT sample_unique_id, toFloat64OrNull(alteration_value) AS v FROM genetic_alteration_derived WHERE cancer_study_identifier = 'ov_tcga_pub' AND profile_type = 'methylation_hm27' AND hugo_gene_symbol = 'BRCA1' AND alteration_value NOT IN ('', 'NA') AND toFloat64OrNull(alteration_value) IS NOT NULL ), expr AS ( SELECT sample_unique_id, toFloat64OrNull(alteration_value) AS v FROM genetic_alteration_derived WHERE cancer_study_identifier = 'ov_tcga_pub' AND profile_type = 'mrna' AND hugo_gene_symbol = 'BRCA1' AND alteration_value NOT IN ('', 'NA') AND toFloat64OrNull(alteration_value) IS NOT NULL ), joined AS ( SELECT meth.v AS meth_v, expr.v AS expr_v FROM meth INNER JOIN expr USING (sample_unique_id) ), ranked AS ( SELECT *, ntile(3) OVER (ORDER BY meth_v) AS tertile FROM joined ) SELECT tertile, count() AS n, round(avg(meth_v),3) AS mean_methylation, round(avg(expr_v),3) AS mean_mrna_expression FROM ranked GROUP BY tertile ORDER BY tertile " } ◀ result {"rows":[{"tertile":1,"n":163,"mean_methylation":0.034,"mean_mrna_expression":0.202},{"tertile":2,"n":163,"mean_methylation":0.071,"mean_mrna_expression":0.133},{"tertile":3,"n":163,"mean_methylation":0.289,"mean_mrna_expression":-0.344}]} ▶ navigate_to_results_view { "studyIds": [ "ov_tcga_pub" ], "genes": [ "BRCA1" ], "tab": "plots", "plotsHorzSelection": { "dataType": "molecular_profile", "selectedGeneOption": "BRCA1", "selectedDataSourceOption": "ov_tcga_pub_methylation_hm27" }, "plotsVertSelection": { "dataType": "molecular_profile", "selectedGeneOption": "BRCA1", "selectedDataSourceOption": "ov_tcga_pub_mrna" } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pub&gene_list=BRCA1&case_set_id=ov_tcga_pub_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_methylation_hm27%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_mrna%22%7D","url":"https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pub&gene_list=BRCA1&case_set_id=ov_tcga_pub_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_methylation_hm27%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_mrna%22%7D","data":{"studyIds":["ov_tcga_pub"],"studies":[{"studyId":"ov_tcga_pub","name":"Ovarian Serous Cystadenocarcinoma (TCGA, Nature 2011)","sampleCount":489}],"genes":["BRCA1"],"caseSetId":"ov_tcga_pub_all","pageDescription":"Scatter/box plots: BRCA1 molecular_profile (y-axis) by BRCA1 molecular_profile (x-axis)."}} ═ answer (success) ## Yes — an inverse correlation is present **Cohort:** TCGA Ovarian Serous Cystadenocarcinoma (Nature 2011), n = 489 samples with paired BRCA1 methylation (HM27 array) and mRNA (microarray) data. | Metric | Value | |---|---| | Spearman correlation (methylation vs. mRNA) | **ρ = −0.364** | | Samples | 489 | **By methylation tertile:** | Tertile | n | Mean β-value (methylation) | Mean mRNA expression | |---|---|---|---| | Low methylation | 163 | 0.034 | 0.202 | | Mid methylation | 163 | 0.071 | 0.133 | | High methylation | 163 | 0.289 | −0.344 | Samples in the highest BRCA1 promoter methylation tertile show markedly lower mean BRCA1 mRNA expression than the lowest tertile, consistent with a moderate negative (inverse) correlation across the full cohort (ρ = −0.36). This is consistent with epigenetic silencing of BRCA1 via promoter hypermethylation, a well-documented mechanism in a subset of high-grade serous ovarian cancers as an alternative to BRCA1 mutation/deletion for functional BRCA1 loss. **Caveats:** This is a Spearman correlation on bulk-tumor array data, not a formal statistical test with p-value/confidence interval, and correlation does not establish causal silencing mechanism — it is consistent with, but does not prove, promoter methylation directly driving reduced transcription (other confounders, e.g. tumor purity, could contribute). [Explore BRCA1 methylation vs. mRNA expression scatter plot](https://www.cbioportal.org/results/plots?cancer_study_list=ov_tcga_pub&gene_list=BRCA1&case_set_id=ov_tcga_pub_all&plots_horz_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_methylation_hm27%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A%22672%22%2C%22dataType%22%3A%22molecular_profile%22%2C%22selectedDataSourceOption%22%3A%22ov_tcga_pub_mrna%22%7D) Scatter/box plots: BRCA1 methylation (x-axis) vs. BRCA1 mRNA expression (y-axis) across all 489 samples in the study.