Q (sonnet): Is there a correlation between ERBB2 gene amplification and ERBB2 protein expression levels in breast cancer samples from the MSK-CHORD Study? ▶ read_guide { "uri": "cbioportal://gene-expression-guide" } ▶ list_studies { "search": "MSK CHORD" } ◀ 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) ◀ result {"result":[{"cancer_study_identifier":"msk_chord_2024","name":"MSK-CHORD (MSK, Nature 2024)","type_of_cancer_id":"mixed","sample_count":25040,"has_guide":true,"url":"https://www.cbioportal.org/study/summary?id=msk_chord_2024"}]} ▶ get_study_guide { "study_id": "msk_chord_2024" } ▶ clickhouse_run_select_query { "query": "SELECT DISTINCT profile_type FROM genetic_alteration_derived WHERE cancer_study_identifier = 'msk_chord_2024' ORDER BY profile_type" } ◀ result # MSK-CHORD (MSK, Nature 2024) **Study ID:** `msk_chord_2024` ## Overview Targeted sequencing via MSK-IMPACT panels. Clinical annotations include some derived from natural language processing (denoted NLP). **Exactly five cancer types** (`CANCER_TYPE`, patients): Non-Small Cell Lung Cancer 7,809, Colorectal Cancer 5,543, Breast Cancer 5,368, Prostate Cancer 3,211, Pancreatic Cancer 3,109. There is **no melanoma** or any other cancer type; say so up front if asked, instead of substituting another type. **No therapy-response variable.** There is no RECIST, objective response, or best-response attribute or event. For treatment-outcome questions (e.g. immunotherapy response), say this first; the only proxies are `OS_MONTHS`/`OS_STATUS`, or NLP radiology progression events (`Diagnosis` events with `SUBTYPE = 'Progression'`, key `PROGRESSION` = Y/N/Indeterminate), in patients with `Treatment` events of the relevant `SUBTYPE` (e.g. `Immuno`: 3,341 patients). Hand off the comparison to cBioPortal group comparison / survival. **Nearly one sample per patient: 24,950 patients / 25,040 samples.** Only 90 patients have more than one sample, and all 90 have samples from two different cancer types (second primaries); only 26 have both a `Primary` and a `Metastasis` sample. There is no meaningful same-patient (paired) primary-vs-metastasis cohort. For "same patient" / paired questions, say this up front, then offer the **unpaired** comparison of all `Primary` vs `Metastasis` samples (`SAMPLE_TYPE`), labelled as unpaired. ```sql SELECT countIf(n > 1) AS multi_sample_patients, -- 90 countIf(has_p AND has_m) AS primary_and_met -- 26 FROM (SELECT patient_unique_id, count() AS n, has(groupArray(attribute_value), 'Primary') AS has_p, has(groupArray(attribute_value), 'Metastasis') AS has_m FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'SAMPLE_TYPE' GROUP BY patient_unique_id); ``` ## Gene Panels This study uses multiple MSK-IMPACT panel versions: - **IMPACT341**: Earlier version, 341 genes - **IMPACT410**: 410 genes - **IMPACT468**: 468 genes - **IMPACT505**: Latest version, 505 genes **Important:** Different samples may have different gene coverage. Always use gene-specific denominators when calculating mutation frequencies. ## Clinical Attributes - Semantic Guide ### Cancer Classification | Attribute | Description | Values | |-----------|-------------|--------| | `CANCER_TYPE` | Broad cancer category | e.g., "Non-Small Cell Lung Cancer", "Breast Cancer" | | `CANCER_TYPE_DETAILED` | Specific subtype | e.g., "Lung Adenocarcinoma", "Invasive Ductal Carcinoma" | | `ONCOTREE_CODE` | OncoTree classification code | Standardized cancer type codes | ### Sample Information | Attribute | Description | Values | |-----------|-------------|--------| | `SAMPLE_TYPE` | Sample origin | Primary, Metastasis, Local Recurrence, Unknown | | `SAMPLE_CLASS` | Sample … (5439 more chars) ◀ result {"rows":[{"profile_type":"cna"}]} ▶ clickhouse_run_select_query { "query": "SELECT table FROM (SELECT 'resource_study' AS table) LIMIT 1" } ◀ result {"rows":[{"table":"resource_study"}]} ▶ clickhouse_run_select_query { "query": "SELECT DISTINCT attribute_value, count(DISTINCT sample_unique_id) AS n FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'HER2' GROUP BY attribute_value ORDER BY n DESC" } ◀ result {"rows":[{"n":1},{"attribute_value":"Yes","n":1},{"attribute_value":"No","n":1}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_value, count(DISTINCT sample_unique_id) AS n FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'HER2' GROUP BY attribute_value ORDER BY n DESC" } ▶ clickhouse_run_select_query { "query": "SELECT count(*) FROM resource_study WHERE cancer_study_identifier = 'msk_chord_2024'" } ◀ result {"rows":[{"n":1},{"attribute_value":"Yes","n":1},{"attribute_value":"No","n":1}]} ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 47\n Code: 47. DB::Exception: Unknown expression or function identifier `cancer_study_identifier` in scope SELECT count(*) FROM resource_study WHERE cancer_study_identifier = 'msk_chord_2024'. (UNKNOWN_IDENTIFIER) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_list_table_columns { "table": "resource_study" } ◀ result {"columns":[{"name":"internal_id","type":"Int64"},{"name":"resource_id","type":"String"},{"name":"url","type":"String"}]} ▶ clickhouse_run_select_query { "query": "SELECT attribute_value, count() AS n FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'HER2' GROUP BY attribute_value" } ◀ result {"rows":[{"n":19582},{"attribute_value":"Yes","n":866},{"attribute_value":"No","n":4502}]} ▶ resolve_and_route { "studyIds": [ "msk_chord_2024" ] } ◀ result {"success":true,"message":"Found 1 study. Use the metadata to call the appropriate navigation tool(s).","data":{"totalCount":1,"studiesWithMetadata":[{"studyId":"msk_chord_2024","name":"MSK-CHORD (MSK, Nature 2024)","sampleCount":25040,"studyViewUrl":"https://www.cbioportal.org/study?id=msk_chord_2024","metadata":{"clinicalAttributeIds":["ADRENAL_GLANDS","BONE","CANCER_TYPE","CANCER_TYPE_DETAILED","CLINICAL_GROUP","CLINICAL_SUMMARY","CNS_BRAIN","CURRENT_AGE_DEID","DIAGNOSIS_DESCRIPTION","ETHNICITY","FRACTION_GENOME_ALTERED","GENDER","GENE_PANEL","GLEASON_FIRST_REPORTED","GLEASON_HIGHEST_REPORTED","GLEASON_SAMPLE_LEVEL","HER2","HISTORY_OF_PDL1","HR","ICD_O_HISTOLOGY_DESCRIPTION","INTRA_ABDOMINAL","LIVER","LUNG","LYMPH_NODES","METASTATIC_SITE","MSI_COMMENT","MSI_SCORE","MSI_TYPE","MUTATION_COUNT","NUM_ICDO_DX","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER","PATHOLOGICAL_GROUP","PDL1_POSITIVE","PLEURA","PRIMARY_SITE","PRIOR_MED_TO_MSK","RACE","REPRODUCTIVE_ORGANS","SAMPLE_CLASS","SAMPLE_COUNT","SAMPLE_COVERAGE","SAMPLE_TYPE","SMOKING_PREDICTIONS_3_CLASSES","SOMATIC_STATUS","STAGE_HIGHEST_RECORDED","TMB_NONSYNONYMOUS","TUMOR_PURITY"],"molecularProfileIds":["msk_chord_2024_cna","msk_chord_2024_mutations","msk_chord_2024_structural_variants"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations"]}}]}} ▶ get_studyviewfilter_options { "studyId": "msk_chord_2024", "geneSpecificQueries": [ { "hugoGeneSymbol": "ERBB2", "profileType": "cna" } ] } ◀ result {"success":true,"message":"Successfully retrieved StudyView filter options","data":{"studyId":"msk_chord_2024","geneSpecificCounts":[{"hugoGeneSymbol":"ERBB2","profileType":"cna","counts":[{"value":"NA","label":"NA","count":6},{"value":"0","label":"Diploid","count":24070},{"value":"-2","label":"Homozygously deleted","count":4},{"value":"2","label":"Amplified","count":960}]}]}} ▶ navigate_to_study_view { "studyIds": [ "msk_chord_2024" ], "filterJson": { "clinicalDataFilters": [ { "attributeId": "CANCER_TYPE", "values": [ { "value": "Breast Cancer" } ] } ], "genomicDataFilters": [ { "hugoGeneSymbol": "ERBB2", "profileType": "cna", "values": [ { "value": "2" } ] } ] } } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/study/summary?id=msk_chord_2024#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22CANCER_TYPE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22Breast%20Cancer%22%7D%5D%7D%5D%2C%22genomicDataFilters%22%3A%5B%7B%22hugoGeneSymbol%22%3A%22ERBB2%22%2C%22profileType%22%3A%22cna%22%2C%22values%22%3A%5B%7B%22value%22%3A%222%22%7D%5D%7D%5D%7D","url":"https://www.cbioportal.org/study/summary?id=msk_chord_2024#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22CANCER_TYPE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22Breast%20Cancer%22%7D%5D%7D%5D%2C%22genomicDataFilters%22%3A%5B%7B%22hugoGeneSymbol%22%3A%22ERBB2%22%2C%22profileType%22%3A%22cna%22%2C%22values%22%3A%5B%7B%22value%22%3A%222%22%7D%5D%7D%5D%7D","data":{"studyIds":["msk_chord_2024"],"studies":[{"studyId":"msk_chord_2024","name":"MSK-CHORD (MSK, Nature 2024)","sampleCount":25040}],"tab":"summary","hasFilters":true,"hasPlotsConfig":false,"pageDescription":"Overview of all study data displayed as interactive charts summarizing available clinical and genomic data. Click within a chart to filter. Additional charts may be available in the Charts menu."}} ═ answer (success) ## Summary **A gene-amplification–vs–protein-expression correlation is not computable in MSK-CHORD** because the study contains no protein expression data (no RPPA, no proteomics) and no mRNA expression profile — it's a targeted MSK-IMPACT panel study whose only molecular readouts are copy number, mutations, and structural variants. What the data does show, across MSK-CHORD's 25,040 samples: - **ERBB2 copy-number status** (all cancer types): 960 samples amplified, 24,070 diploid, 4 homozygously deleted, 6 not profiled. - A separate categorical clinical field, **`HER2`** (Yes/No — likely an abstracted IHC/FISH call, not a numeric expression value), recorded for 866 "Yes" and 4,502 "No" samples (mostly in the breast cancer cohort; other cancer types largely leave this blank). You could compare ERBB2 amplification status against this categorical `HER2` field as a rough concordance check, but that is not the same as a quantitative amplification-vs-expression correlation. [View ERBB2-amplified breast cancer samples in MSK-CHORD](https://www.cbioportal.org/study/summary?id=msk_chord_2024#filterJson=%7B%22clinicalDataFilters%22%3A%5B%7B%22attributeId%22%3A%22CANCER_TYPE%22%2C%22values%22%3A%5B%7B%22value%22%3A%22Breast%20Cancer%22%7D%5D%7D%5D%2C%22genomicDataFilters%22%3A%5B%7B%22hugoGeneSymbol%22%3A%22ERBB2%22%2C%22profileType%22%3A%22cna%22%2C%22values%22%3A%5B%7B%22value%22%3A%222%22%7D%5D%7D%5D%7D) — from here you can cross-tabulate against the HER2 clinical attribute in the chart panel. If you'd like the actual amplification-vs-protein-expression correlation, that requires a cohort with proteomic data. Good candidates in cBioPortal are **Breast Cancer (TCGA, PanCancer Atlas)** or **METABRIC**, both of which include RPPA/protein data alongside CNA calls for ERBB2/HER2. Let me know if you'd like me to run that analysis in either of those studies instead.