Q (haiku): is there any imaging data? ▶ read_guide { "uri": "cbioportal://external-resources-guide" } ◀ result # External Resources Guide Use this guide when the user asks about data that may be linked from cBioPortal rather than stored directly in molecular or clinical tables. ## Routing Triggers Read this guide before answering or refusing questions that mention: - imaging, radiology, CT, MRI, pathology slides, histology, Minerva, viewer - external portal, external resource, image data, spatial data - HTAN studies or study-specific linked viewers ## Core Rule Do not say cBioPortal has no imaging or external-resource data until you have checked: - `resource_definition` - `resource_study` - `resource_sample` - `resource_patient` cBioPortal may store links to external viewers or portals even when it does not store raw images. ## Which Studies Have Imaging Data For "which studies have imaging / pathology slides / CT" or "how many samples have images", read `cancer_study.resource_sample_counts` — per-study sample counts keyed by resource display name, the same numbers as the portal's "Data type" filter. One query, no joins: ```sql SELECT cancer_study_identifier, name, resource_sample_counts['Slide Microscopy'] AS slide_microscopy_samples FROM cancer_study WHERE resource_sample_counts['Slide Microscopy'] > 0 ORDER BY slide_microscopy_samples DESC; ``` List the resource names that exist with `SELECT DISTINCT arrayJoin(mapKeys(resource_sample_counts)) FROM cancer_study` (e.g. `'Slide Microscopy'`, `'Computed Tomography'`, `'Magnetic Resonance'`, `'H&E Slide'`, `'MxIF Image'`). The map counts sample- and patient-level resources only. For study-level links (`resource_study`) and for the URLs themselves, use the queries below. ## Discovery Query Start with table and column validation, then use this pattern: ```sql SELECT rd.resource_id, rd.display_name, rd.description, rd.resource_type, rs.cancer_study_identifier, rs.url FROM resource_study rs JOIN resource_definition rd ON rs.resource_id = rd.resource_id WHERE lower(rd.display_name) LIKE '%minerva%' OR lower(rd.description) LIKE '%minerva%' OR lower(rd.display_name) LIKE '%image%' OR lower(rd.description) LIKE '%image%' OR lower(rd.display_name) LIKE '%pathology%' OR lower(rd.description) LIKE '%pathology%' OR lower(rd.display_name) LIKE '%histology%' OR lower(rd.description) LIKE '%histology%' ORDER BY rs.cancer_study_identifier, rd.display_name LIMIT 100; ``` If no study-level rows appear, check sample- and patient-level resource links: ```sql SELECT rd.resource_id, rd.display_name, rd.description, rs.cancer_study_identifier, rs.sample_unique_id, rs.url FROM resource_sample rs JOIN resource_definition rd ON rs.resource_id = rd.resource_id WHERE lower(rd.display_name) LIKE '%minerva%' OR lower(rd.description) LIKE '%minerva%' OR lower(rd.display_name) LIKE '%image%' OR lower(rd.description) LIKE '%image%' OR lower(rd.display_name) LIKE '%pathology%' OR lower(rd.description) LIKE '%pathology%' … (981 more chars) ▶ clickhouse_list_table_columns { "table": "resource_definition" } ▶ clickhouse_list_table_columns { "table": "resource_study" } ◀ result {"columns":[{"name":"resource_id","type":"String"},{"name":"display_name","type":"String"},{"name":"description","type":"Nullable(String)"},{"name":"resource_type","type":"String"},{"name":"open_by_default","type":"Nullable(Int32)"},{"name":"priority","type":"Int64"},{"name":"cancer_study_id","type":"Int64"},{"name":"custom_metadata","type":"Nullable(String)"}]} ▶ clickhouse_list_table_columns { "table": "cancer_study" } ◀ result {"columns":[{"name":"internal_id","type":"Int64"},{"name":"resource_id","type":"String"},{"name":"url","type":"String"}]} ◀ result {"columns":[{"name":"cancer_study_id","type":"Int64","comment":"Internal numeric ID. Prefer cancer_study_identifier for queries as it is more readable and stable."},{"name":"cancer_study_identifier","type":"Nullable(String)","comment":"Stable string identifier for the study (e.g., \"msk_chord_2024\", \"brca_tcga\"). Use this for filtering, not cancer_study_id."},{"name":"type_of_cancer_id","type":"String"},{"name":"name","type":"String","comment":"Full descriptive name of the study (e.g., \"MSK-CHORD (MSK, Nature 2024)\")."},{"name":"description","type":"String"},{"name":"public","type":"Int32"},{"name":"pmid","type":"Nullable(String)"},{"name":"citation","type":"Nullable(String)"},{"name":"groups","type":"Nullable(String)"},{"name":"status","type":"Nullable(Int64)"},{"name":"import_date","type":"Nullable(DateTime64(6))"},{"name":"reference_genome_id","type":"Nullable(Int64)"},{"name":"sample_count","type":"UInt32","comment":"Samples in the study (members of _all), as shown in the portal study list. Precomputed daily at LLM-prep time."},{"name":"mutation_sample_count","type":"UInt32","comment":"Samples profiled for mutations (_sequenced) — portal \"Data type\" filter: \"Mutations\". 0 = no mutation data."},{"name":"cna_sample_count","type":"UInt32","comment":"Samples profiled for copy-number alterations (_cna) — \"CNA\". 0 = no CNA data."},{"name":"structural_variant_sample_count","type":"UInt32","comment":"Distinct samples with at least one structural variant (fusions etc.). 0 = none."},{"name":"rna_seq_sample_count","type":"UInt32","comment":"Samples with RNA-Seq expression (_rna_seq_v2_mrna) — \"RNA-Seq\"."},{"name":"mrna_microarray_sample_count","type":"UInt32","comment":"Samples with microarray mRNA expression (_mrna) — \"RNA (microarray)\"."},{"name":"mirna_sample_count","type":"UInt32","comment":"Samples with microRNA expression (_microrna) — \"miRNA\"."},{"name":"rppa_sample_count","type":"UInt32","comment":"Samples with RPPA protein levels (_rppa) — \"RPPA\"."},{"name":"mass_spectrometry_sample_count","type":"UInt32","comment":"Samples with mass-spectrometry protein quantification (_protein_quantification) — \"Protein Mass-Spectrometry\"."},{"name":"treatment_patient_count","type":"UInt32","comment":"PATIENTS (not samples) with treatment clinical events — \"Treatment\". 0 = no treatment data."},{"name":"resource_sample_counts","type":"Map(String, UInt32)","comment":"Samples with each linked resource, keyed by display name: imaging and pathology such as 'Slide Microscopy', 'Computed Tomography', 'Magnetic Resonance', 'H&E Slide', 'MxIF Image'. Query with mapKeys(resource_sample_counts) or resource_sample_counts['Slide Microscopy'] > 0."},{"name":"mrna_expression_sample_count","type":"UInt32","comment":"Samples in any mRNA expression profile (RNA-Seq, microarray, TPM, z-scores; from sample_profile). Use this for \"does the study have expression data\" — rna_seq_sample_count and mrna_m … (136 more chars) ▶ clickhouse_run_select_query { "query": " SELECT DISTINCT arrayJoin(mapKeys(resource_sample_counts)) AS resource_type FROM cancer_study WHERE resource_sample_counts != {} ORDER BY resource_type ", "max_rows": 50 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 62\n Code: 62. DB::Exception: Syntax error: failed at position 143 (}) (line 3, col 34): }\nORDER BY resource_type) LIMIT 51\n FORMAT Native. Expected substitution name (identifier). (SYNTAX_ERROR) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, name, mapKeys(resource_sample_counts) AS resource_types, resource_sample_counts FROM cancer_study WHERE resource_sample_counts != {} ORDER BY cancer_study_identifier LIMIT 50 ", "max_rows": 50 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 62\n Code: 62. DB::Exception: Syntax error: failed at position 195 (}) (line 7, col 34): }\nORDER BY cancer_study_identifier\nLIMIT 50) LIMIT 51\n FORMAT Native. Expected substitution name (identifier). (SYNTAX_ERROR) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " SELECT rd.resource_id, rd.display_name, rd.description, rd.resource_type, COUNT(DISTINCT rs.internal_id) AS study_count FROM resource_definition rd LEFT JOIN resource_study rs ON rd.resource_id = rs.resource_id GROUP BY rd.resource_id, rd.display_name, rd.description, rd.resource_type ORDER BY study_count DESC, rd.display_name LIMIT 50 ", "max_rows": 50 } ◀ result {"rows":[{"resource_id":"CHROMOSCOPE","display_name":"Chromoscope","description":"Link to Chromoscope","resource_type":"SAMPLE","study_count":1},{"resource_id":"IDC_OHIF_CR","display_name":"Computed Radiography","description":"Computed Radiography","resource_type":"PATIENT","study_count":1},{"resource_id":"IDC_OHIF_CT","display_name":"Computed Tomography","description":"Computed Tomography","resource_type":"PATIENT","study_count":1},{"resource_id":"CYCIF","display_name":"CyCIF","description":"CyCIF","resource_type":"SAMPLE","study_count":1},{"resource_id":"IDC_OHIF_DX","display_name":"Digital Radiography","description":"Digital Radiography","resource_type":"PATIENT","study_count":1},{"resource_id":"FIGURES","display_name":"Figures","description":"Figures from https://www.biorxiv.org/content/10.1101/2020.12.03.408500v1/","resource_type":"PATIENT","study_count":1},{"resource_id":"HE","display_name":"H&E Slide","description":"H&E Slide","resource_type":"SAMPLE","study_count":1},{"resource_id":"IDC_OHIF_MR","display_name":"Magnetic Resonance","description":"Magnetic Resonance","resource_type":"PATIENT","study_count":1},{"resource_id":"IDC_OHIF_MG","display_name":"Mammography","description":"Mammography","resource_type":"PATIENT","study_count":1},{"resource_id":"MXIF","display_name":"MxIF Image","description":"MxIF Images","resource_type":"SAMPLE","study_count":1},{"resource_id":"MXIF","display_name":"MxIF Image","description":"MxIF Images","resource_type":"PATIENT","study_count":1},{"resource_id":"IDC_OHIF_NM","display_name":"Nuclear Medicine","description":"Nuclear Medicine","resource_type":"PATIENT","study_count":1},{"resource_id":"IDC_OHIF_PT","display_name":"Positron Emission Tomography","description":"Positron Emission Tomography","resource_type":"PATIENT","study_count":1},{"resource_id":"IDC_SLIM","display_name":"Slide Microscopy","description":"Slide Microscopy","resource_type":"PATIENT","study_count":1}]} ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, name, sample_count FROM cancer_study WHERE cancer_study_identifier IN ( SELECT DISTINCT cancer_study_identifier FROM cancer_study WHERE mapLength(resource_sample_counts) > 0 ) ORDER BY cancer_study_identifier ", "max_rows": 100 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 46\n Code: 46. DB::Exception: Function with name `mapLength` does not exist. In scope (SELECT DISTINCT cancer_study_identifier FROM cancer_study WHERE mapLength(resource_sample_counts) > 0). Maybe you meant: ['length']. (UNKNOWN_FUNCTION) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, name, sample_count FROM cancer_study WHERE length(resource_sample_counts) > 0 ORDER BY cancer_study_identifier ", "max_rows": 100 } ◀ result {"rows":[{"cancer_study_identifier":"acc_tcga_pan_can_atlas_2018","name":"Adrenocortical Carcinoma (TCGA, PanCancer Atlas)","sample_count":92},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","sample_count":411},{"cancer_study_identifier":"brca_aurora_2023","name":"Metastatic Breast Cancer (AURORA US Network, Nat Cancer 2023)","sample_count":155},{"cancer_study_identifier":"brca_tcga_pan_can_atlas_2018","name":"Breast Invasive Carcinoma (TCGA, PanCancer Atlas)","sample_count":1084},{"cancer_study_identifier":"cesc_tcga_pan_can_atlas_2018","name":"Cervical Squamous Cell Carcinoma (TCGA, PanCancer Atlas)","sample_count":297},{"cancer_study_identifier":"chol_tcga_pan_can_atlas_2018","name":"Cholangiocarcinoma (TCGA, PanCancer Atlas)","sample_count":36},{"cancer_study_identifier":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","sample_count":594},{"cancer_study_identifier":"crc_hta11_htan_2021","name":"Pre-cancer Colorectal Polyps (HTAN Vanderbilt, Cell 2021)","sample_count":61},{"cancer_study_identifier":"crc_hta8_htan_2024","name":"Colorectal Cancer (HTAN MSK, Nature 2025)","sample_count":83},{"cancer_study_identifier":"crc_orion_2024","name":"Colorectal Adenocarcinoma (DFCI/Orion, BioRxiv 2024)","sample_count":74},{"cancer_study_identifier":"difg_glass","name":"Diffuse Glioma (GLASS Consortium)","sample_count":693},{"cancer_study_identifier":"dlbc_tcga_pan_can_atlas_2018","name":"Diffuse Large B-Cell Lymphoma (TCGA, PanCancer Atlas)","sample_count":48},{"cancer_study_identifier":"esca_tcga_pan_can_atlas_2018","name":"Esophageal Adenocarcinoma (TCGA, PanCancer Atlas)","sample_count":182},{"cancer_study_identifier":"gbm_tcga_pan_can_atlas_2018","name":"Glioblastoma Multiforme (TCGA, PanCancer Atlas)","sample_count":592},{"cancer_study_identifier":"hnsc_tcga_pan_can_atlas_2018","name":"Head and Neck Squamous Cell Carcinoma (TCGA, PanCancer Atlas)","sample_count":523},{"cancer_study_identifier":"kich_tcga_pan_can_atlas_2018","name":"Kidney Chromophobe (TCGA, PanCancer Atlas)","sample_count":65},{"cancer_study_identifier":"kirc_tcga_pan_can_atlas_2018","name":"Kidney Renal Clear Cell Carcinoma (TCGA, PanCancer Atlas)","sample_count":512},{"cancer_study_identifier":"kirp_tcga_pan_can_atlas_2018","name":"Kidney Renal Papillary Cell Carcinoma (TCGA, PanCancer Atlas)","sample_count":283},{"cancer_study_identifier":"lgg_tcga_pan_can_atlas_2018","name":"Brain Lower Grade Glioma (TCGA, PanCancer Atlas)","sample_count":514},{"cancer_study_identifier":"lihc_tcga_pan_can_atlas_2018","name":"Liver Hepatocellular Carcinoma (TCGA, PanCancer Atlas)","sample_count":372},{"cancer_study_identifier":"luad_tcga_pan_can_atlas_2018","name":"Lung Adenocarcinoma (TCGA, PanCancer Atlas)","sample_count":566},{"cancer_study_identifier":"lusc_tcga_pan_can_atlas_2018","name":"Lung Squamous Cell Carcinoma (TCGA, PanCancer Atlas)","sample_count":487},{"cancer_study_i … (2120 more chars) ▶ clickhouse_run_select_query { "query": " SELECT cancer_study_identifier, name, arrayJoin(mapKeys(resource_sample_counts)) AS resource_type, resource_sample_counts[arrayJoin(mapKeys(resource_sample_counts))] AS sample_count FROM cancer_study WHERE length(resource_sample_counts) > 0 ORDER BY cancer_study_identifier, resource_type ", "max_rows": 150 } ◀ result {"rows":[{"cancer_study_identifier":"acc_tcga_pan_can_atlas_2018","name":"Adrenocortical Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":91},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Computed Radiography","sample_count":7},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Computed Tomography","sample_count":107},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Digital Radiography","sample_count":7},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Magnetic Resonance","sample_count":20},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Positron Emission Tomography","sample_count":7},{"cancer_study_identifier":"blca_tcga_pan_can_atlas_2018","name":"Bladder Urothelial Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":411},{"cancer_study_identifier":"brca_aurora_2023","name":"Metastatic Breast Cancer (AURORA US Network, Nat Cancer 2023)","resource_type":"H&E Slide","sample_count":142},{"cancer_study_identifier":"brca_tcga_pan_can_atlas_2018","name":"Breast Invasive Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Magnetic Resonance","sample_count":136},{"cancer_study_identifier":"brca_tcga_pan_can_atlas_2018","name":"Breast Invasive Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Mammography","sample_count":5},{"cancer_study_identifier":"brca_tcga_pan_can_atlas_2018","name":"Breast Invasive Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":1084},{"cancer_study_identifier":"cesc_tcga_pan_can_atlas_2018","name":"Cervical Squamous Cell Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Magnetic Resonance","sample_count":53},{"cancer_study_identifier":"cesc_tcga_pan_can_atlas_2018","name":"Cervical Squamous Cell Carcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":297},{"cancer_study_identifier":"chol_tcga_pan_can_atlas_2018","name":"Cholangiocarcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":36},{"cancer_study_identifier":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","resource_type":"Computed Tomography","sample_count":21},{"cancer_study_identifier":"coadread_tcga_pan_can_atlas_2018","name":"Colorectal Adenocarcinoma (TCGA, PanCancer Atlas)","resource_type":"Slide Microscopy","sample_count":594},{"cancer_study_identifier":"crc_hta11_htan_2021","name":"Pre-cancer Colorectal Polyps (HTAN Vanderbilt, Cell 2021)","resource_type":"H&E Slide","sample_count":26},{"cancer_study_identifier":"crc_hta11_ … (10959 more chars) ═ answer (success) Yes, cBioPortal has extensive imaging data! Here's what's available: ## **Imaging & Pathology Resources** cBioPortal links to **external imaging viewers and pathology data** across **37 studies**. These are not stored as raw images in the database, but rather as links to specialized viewers. ### **Types of Imaging Data Available** 1. **Slide Microscopy** (most common) — 14,845 samples across 36 studies - H&E staining, histopathology from pathology labs - Available in all TCGA PanCancer Atlas studies 2. **Medical Imaging** — via the Imaging Data Commons (IDC) OHIF viewer - **Computed Tomography (CT)** — 825 samples across 12 studies - **Magnetic Resonance Imaging (MRI)** — 349 samples across 7 studies - **Positron Emission Tomography (PET)** — 64 samples across 6 studies - **Computed/Digital Radiography** — 16 samples - **Mammography** — 5 samples - **Nuclear Medicine** — 4 samples 3. **High-Resolution Imaging** - **MxIF (Multiplex immunoFluorescence)** — 131 samples (colorectal, ovarian studies) - **CyCIF (Cyclic immunoFluorescence)** — 567 samples (ovarian cancer, Gray Foundation study) - **H&E Slides** — 215 samples (breast, colorectal, glioma studies) ### **Key Studies with Imaging** - **TCGA PanCancer Atlas** (33 cancer types) — all have slide microscopy; many have CT/MRI - **Colorectal Cancer (HTAN MSK, 2025)** — 58 MxIF samples - **Ovarian Cancer (Gray Foundation, 2024)** — 567 CyCIF samples - **Metastatic Breast Cancer (AURORA, 2023)** — 142 H&E slides - **Kidney Renal Clear Cell Carcinoma (TCGA)** — 221 CT, 60 MRI samples ### **How to Access** When you navigate to a **patient or sample** in cBioPortal, imaging links appear in the **Resources** section. Medical imaging (CT, MRI, PET) links to the **Imaging Data Commons (IDC) OHIF Viewer**, enabling pan-and-zoom, 3D reconstruction, and multi-modality viewing. Would you like me to show you how to access imaging data for a specific cancer type or patient?