Q (sonnet): What are the most frequently administered systemic therapy regimens for lung cancer patients in the MSK-CHORD Study? ▶ read_guide { "uri": "cbioportal://treatment-guide" } ▶ list_studies { "search": "CHORD" } ◀ result # Treatment Data Query Guide ## Overview Treatment data in cBioPortal is stored in **clinical event tables**, separate from clinical attributes. This allows for timeline-based treatment records with start/stop dates. ## Start Here: Treatment Views For "most common treatments / agents / regimens in study X", use the parameterized views (documented in `cbioportal://clinical-data-guide`, Study-View Chart Counts): ```sql -- Patients per agent (the portal's Treatment chart), with type/subtype arrays SELECT * FROM treatment_counts_in_study(study='msk_chord_2024') ORDER BY patients DESC LIMIT 20; -- Same-day agent combinations (investigational, prior-medication and radiation events excluded) SELECT * FROM treatment_regimens_in_study(study='msk_chord_2024') ORDER BY patients DESC LIMIT 20; ``` Write raw event queries (below) only for subgroups, timelines or keys the views do not expose. ## Key Tables | Table | Description | |-------|-------------| | `clinical_event` | Event records with patient_id, event_type, start_date, stop_date | | `clinical_event_data` | Key-value pairs linked to each clinical_event_id | ## Schema ``` clinical_event ├── clinical_event_id (PK) ├── patient_id (FK → patient.internal_id) ├── event_type (Treatment, TREATMENT, Diagnosis, SURGERY, etc.) ├── start_date (days from diagnosis) └── stop_date (days from diagnosis) clinical_event_data ├── clinical_event_id (FK) ├── key (AGENT, SUBTYPE, etc.) └── value ``` ## Event Types Not all studies have all event types. Common ones include: | Event Type | Description | |------------|-------------| | `Treatment` / `TREATMENT` | Drug/therapy administration | | `SURGERY` | Surgical procedures | | `Diagnosis` | Diagnosis events | | `LAB_TEST` | Laboratory results | | `Sequencing` | Sequencing events | | `Sample acquisition` | Sample collection | | `PATHOLOGY` / `Pathology` | Pathology reports | ## Basic Treatment Queries ### List Available Event Types in a Study ```sql SELECT DISTINCT ce.event_type, COUNT(*) as event_count FROM clinical_event ce JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'your_study_id' GROUP BY ce.event_type ORDER BY event_count DESC; ``` ### List Treatment Data Keys in a Study ```sql SELECT DISTINCT ced.key, COUNT(*) as cnt FROM clinical_event ce JOIN clinical_event_data ced ON ce.clinical_event_id = ced.clinical_event_id JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'your_study_id' AND ce.event_type IN ('Treatment', 'TREATMENT') GROUP BY ced.key ORDER BY cnt DESC; ``` ### Get Most Common Treatment Agents ```sql SELECT ced.value as agent, COUNT(DISTINCT ce.patient_id) as patient_count FROM clinical_event ce JOIN clinical_event_data ced ON ce.clinical_event_id = ced.clinical_event_id JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_stud … (6220 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" } ◀ 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) ▶ clickhouse_list_table_columns { "table": "clinical_event_derived" } ▶ clickhouse_run_select_query { "query": "SELECT * FROM treatment_regimens_in_study(study='msk_chord_2024') ORDER BY patients DESC LIMIT 5" } ◀ result {"columns":[{"name":"clinical_event_id","type":"Int64"},{"name":"patient_id","type":"Nullable(Int64)"},{"name":"patient_stable_id","type":"String"},{"name":"start_date","type":"Nullable(Int64)"},{"name":"stop_date","type":"Nullable(Int64)"},{"name":"event_type","type":"LowCardinality(String)"},{"name":"cancer_study_identifier","type":"LowCardinality(String)"}]} ◀ result {"rows":[{"regimen":"CAPECITABINE","n_agents":1,"patients":4434,"treated_patients":21224,"pct_of_treated_patients":20.9},{"regimen":"FLUOROURACIL + LEUCOVORIN + OXALIPLATIN","n_agents":3,"patients":2974,"treated_patients":21224,"pct_of_treated_patients":14},{"regimen":"LEUPROLIDE","n_agents":1,"patients":2846,"treated_patients":21224,"pct_of_treated_patients":13.4},{"regimen":"PACLITAXEL","n_agents":1,"patients":2279,"treated_patients":21224,"pct_of_treated_patients":10.7},{"regimen":"GEMCITABINE","n_agents":1,"patients":2038,"treated_patients":21224,"pct_of_treated_patients":9.6}]} ▶ clickhouse_list_table_columns { "table": "clinical_data_derived" } ▶ clickhouse_list_table_columns { "table": "clinical_event" } ◀ result {"columns":[{"name":"internal_id","type":"Int32"},{"name":"sample_unique_id","type":"String","comment":"Globally unique sample ID: cancer_study_identifier + \"_\" + sample.stable_id. Empty for patient-level attributes. Use this for sample filtering and joins."},{"name":"patient_unique_id","type":"String","comment":"Globally unique patient ID: cancer_study_identifier + \"_\" + patient.stable_id. Present for both sample and patient-level attributes."},{"name":"attribute_name","type":"LowCardinality(String)","comment":"Clinical attribute name (e.g., SAMPLE_TYPE, CANCER_TYPE, AGE, OS_MONTHS). Use with attribute_value for filtering. AGE may be floored or capped for de-identification (e.g. all children recorded as 18, or everyone 89+ recorded as 89 or 90): before age statistics check for a pile-up at the min/max, and if present compute age from DAYS_TO_BIRTH (-days / 365.25)."},{"name":"attribute_value","type":"String","comment":"Value of the clinical attribute (String). For SAMPLE_TYPE: Primary, Metastasis, Local Recurrence, Unknown. Missing values are empty strings, so use toFloat64OrNull(attribute_value) for numeric comparisons — CAST fails on them."},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"type","type":"LowCardinality(String)","comment":"Data level: \"sample\" for sample-level attributes (e.g., SAMPLE_TYPE), \"patient\" for patient-level attributes (e.g., AGE, OS_MONTHS)."}]} ▶ clickhouse_list_table_columns { "table": "clinical_event_data" } ◀ result {"columns":[{"name":"clinical_event_id","type":"Int64"},{"name":"patient_id","type":"Int64"},{"name":"start_date","type":"Int64"},{"name":"stop_date","type":"Nullable(Int64)"},{"name":"event_type","type":"String"}]} ◀ result {"columns":[{"name":"clinical_event_id","type":"Int64"},{"name":"key","type":"String"},{"name":"value","type":"String"}]} ▶ clickhouse_run_select_query { "query": " WITH lung_patients AS ( SELECT DISTINCT patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'CANCER_TYPE' AND attribute_value = 'Non-Small Cell Lung Cancer' ), tx_events AS ( SELECT ce.clinical_event_id, ce.patient_id, ce.start_date, subtype.value AS subtype, inv.value AS investigational FROM clinical_event ce JOIN clinical_event_data subtype ON ce.clinical_event_id = subtype.clinical_event_id AND subtype.key = 'SUBTYPE' LEFT JOIN clinical_event_data inv ON ce.clinical_event_id = inv.clinical_event_id AND inv.key = 'RX_INVESTIGATIVE' JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'msk_chord_2024' AND ce.event_type IN ('Treatment','TREATMENT') AND concat('msk_chord_2024_', p.stable_id) IN (SELECT patient_unique_id FROM lung_patients) AND subtype.value NOT IN ('Radiation Therapy', 'Prior Medications to MSK') AND (inv.value IS NULL OR inv.value != 'Y') ), regimens AS ( SELECT clinical_event_id, patient_id, start_date, arraySort(groupArray(agent.value)) AS agents FROM tx_events te JOIN clinical_event_data agent ON te.clinical_event_id = agent.clinical_event_id AND agent.key = 'AGENT' GROUP BY clinical_event_id, patient_id, start_date ), same_day_regimens AS ( SELECT patient_id, start_date, arraySort(arrayDistinct(arrayFlatten(groupArray(agents)))) AS regimen_agents FROM regimens GROUP BY patient_id, start_date ) SELECT arrayStringConcat(regimen_agents, ' + ') AS regimen, length(regimen_agents) AS n_agents, COUNT(DISTINCT patient_id) AS patients FROM same_day_regimens GROUP BY regimen_agents ORDER BY patients DESC LIMIT 15 " } ◀ 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: Identifier 'te.clinical_event_id' cannot be resolved from subquery with name te. In scope regimens. Maybe you meant: ['ce.clinical_event_id']. (UNKNOWN_IDENTIFIER) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " WITH lung_patients AS ( SELECT DISTINCT patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'CANCER_TYPE' AND attribute_value = 'Non-Small Cell Lung Cancer' ), tx_events AS ( SELECT ce.clinical_event_id AS clinical_event_id, ce.patient_id AS patient_id, ce.start_date AS start_date FROM clinical_event ce JOIN clinical_event_data subtype ON ce.clinical_event_id = subtype.clinical_event_id AND subtype.key = 'SUBTYPE' LEFT JOIN clinical_event_data inv ON ce.clinical_event_id = inv.clinical_event_id AND inv.key = 'RX_INVESTIGATIVE' JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'msk_chord_2024' AND ce.event_type IN ('Treatment','TREATMENT') AND concat('msk_chord_2024_', p.stable_id) IN (SELECT patient_unique_id FROM lung_patients) AND subtype.value NOT IN ('Radiation Therapy', 'Prior Medications to MSK') AND (inv.value IS NULL OR inv.value != 'Y') ), regimens AS ( SELECT te.clinical_event_id AS clinical_event_id, te.patient_id AS patient_id, te.start_date AS start_date, arraySort(groupArray(agent.value)) AS agents FROM tx_events te JOIN clinical_event_data agent ON te.clinical_event_id = agent.clinical_event_id AND agent.key = 'AGENT' GROUP BY te.clinical_event_id, te.patient_id, te.start_date ), same_day_regimens AS ( SELECT patient_id, start_date, arraySort(arrayDistinct(arrayFlatten(groupArray(agents)))) AS regimen_agents FROM regimens GROUP BY patient_id, start_date ) SELECT arrayStringConcat(regimen_agents, ' + ') AS regimen, length(regimen_agents) AS n_agents, COUNT(DISTINCT patient_id) AS patients FROM same_day_regimens GROUP BY regimen_agents ORDER BY patients DESC LIMIT 15 " } ◀ result {"rows":[{"regimen":"CARBOPLATIN + PEMETREXED","n_agents":2,"patients":1184},{"regimen":"OSIMERTINIB","n_agents":1,"patients":1062},{"regimen":"PEMBROLIZUMAB","n_agents":1,"patients":745},{"regimen":"GEMCITABINE","n_agents":1,"patients":708},{"regimen":"CISPLATIN + PEMETREXED","n_agents":2,"patients":685},{"regimen":"CARBOPLATIN + PEMBROLIZUMAB + PEMETREXED","n_agents":3,"patients":624},{"regimen":"NIVOLUMAB","n_agents":1,"patients":533},{"regimen":"ZOLEDRONIC ACID","n_agents":1,"patients":525},{"regimen":"ERLOTINIB","n_agents":1,"patients":483},{"regimen":"MEGESTROL","n_agents":1,"patients":475},{"regimen":"BEVACIZUMAB + CARBOPLATIN + PEMETREXED","n_agents":3,"patients":444},{"regimen":"CARBOPLATIN + PACLITAXEL","n_agents":2,"patients":430},{"regimen":"DOCETAXEL","n_agents":1,"patients":425},{"regimen":"CARBOPLATIN","n_agents":1,"patients":392},{"regimen":"BEVACIZUMAB","n_agents":1,"patients":319}]} ▶ clickhouse_run_select_query { "query": " WITH lung_patients AS ( SELECT DISTINCT patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'msk_chord_2024' AND attribute_name = 'CANCER_TYPE' AND attribute_value = 'Non-Small Cell Lung Cancer' ) SELECT COUNT(DISTINCT ce.patient_id) AS treated_lung_patients FROM clinical_event ce JOIN clinical_event_data subtype ON ce.clinical_event_id = subtype.clinical_event_id AND subtype.key = 'SUBTYPE' JOIN patient p ON ce.patient_id = p.internal_id JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'msk_chord_2024' AND ce.event_type IN ('Treatment','TREATMENT') AND concat('msk_chord_2024_', p.stable_id) IN (SELECT patient_unique_id FROM lung_patients) AND subtype.value NOT IN ('Radiation Therapy', 'Prior Medications to MSK') " } ▶ resolve_and_route { "studyIds": [ "msk_chord_2024" ] } ◀ result {"rows":[{"treated_lung_patients":6111}]} ◀ 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", "attributeIds": [ "CANCER_TYPE" ] } ◀ result {"success":true,"message":"Successfully retrieved StudyView filter options","data":{"studyId":"msk_chord_2024","attributes":[{"attributeId":"CANCER_TYPE","displayName":"Cancer Type","description":"The main cancer type as defined by the Oncotree cancer classification system for precision oncology. Source: MPath","datatype":"STRING","values":["Non-Small Cell Lung Cancer","Colorectal Cancer","Prostate Cancer","Pancreatic Cancer","Breast Cancer"]}]}} ▶ navigate_to_study_view { "studyIds": [ "msk_chord_2024" ], "filterJson": { "clinicalDataFilters": [ { "attributeId": "CANCER_TYPE", "values": [ { "value": "Non-Small Cell Lung Cancer" } ] } ] } } ◀ 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%22Non-Small%20Cell%20Lung%20Cancer%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%22Non-Small%20Cell%20Lung%20Cancer%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) ## Most Frequently Administered Systemic Therapy Regimens — NSCLC Patients, MSK-CHORD The MSK-CHORD study ([MSK, *Nature* 2024](https://www.cbioportal.org/study/summary?id=msk_chord_2024)) contains 7,809 patients with Non-Small Cell Lung Cancer — the only lung cancer type in this cohort (there is no small-cell lung cancer designation). Of these, **6,111 patients** have at least one recorded systemic therapy event (chemotherapy, immunotherapy, targeted therapy, hormone therapy, or biologic agent; radiation and pre-MSK prior medications excluded). Regimens are defined as agents administered on the same start date (same-day combinations), following the portal's own regimen logic: | Regimen | # Agents | Patients | |---|---|---| | Carboplatin + Pemetrexed | 2 | 1,184 | | Osimertinib | 1 | 1,062 | | Pembrolizumab | 1 | 745 | | Gemcitabine | 1 | 708 | | Cisplatin + Pemetrexed | 2 | 685 | | Carboplatin + Pembrolizumab + Pemetrexed | 3 | 624 | | Nivolumab | 1 | 533 | | Zoledronic acid | 1 | 525 | | Erlotinib | 1 | 483 | | Megestrol | 1 | 475 | | Bevacizumab + Carboplatin + Pemetrexed | 3 | 444 | | Carboplatin + Paclitaxel | 2 | 430 | | Docetaxel | 1 | 425 | | Carboplatin | 1 | 392 | | Bevacizumab | 1 | 319 | **Key observations** (counts only, no percentages calculated — see caveat below): The leading regimen is the platinum-doublet **carboplatin + pemetrexed**, consistent with standard first-line chemotherapy for non-squamous NSCLC. **Osimertinib** (EGFR-mutant targeted therapy) and **pembrolizumab** (checkpoint immunotherapy, alone or combined with chemo) also rank highly, reflecting the biomarker-driven treatment landscape captured in this MSK-IMPACT-sequenced cohort. *Caveat: Treatment records in cBioPortal cannot distinguish "never received" from "not collected," so patient counts should not be converted to percentages of the cohort. Regimens reflect same-day co-administered agents; sequential lines of therapy are not distinguished.* For interactive exploration of this NSCLC subgroup (clinical and genomic charts): [View NSCLC Patients in MSK-CHORD Study View](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%22Non-Small%20Cell%20Lung%20Cancer%22%7D%5D%7D%5D%7D) From there, use the Treatment chart in the Clinical Data / Summary tabs to browse individual agents and regimens interactively.