Q (sonnet-5.5): can you show me the minerva viewer for the ohsu htan sample ▶ read_guide { "uri": "cbioportal://study-resolution-guide" } ◀ result # Study Resolution Guide Use this guide when the user names a study, cohort, portal, or data source that may not exist in the connected cBioPortal deployment. ## Routing Triggers Read this guide when the user mentions: - PBTA, Pediatric Brain Tumor Atlas, pediatric cBioPortal, Kids First - GENIE, AACR GENIE, MSK private cohorts, institutional cohorts - "download study", "which study", "find cohort", "data from [portal]" - a named cohort that `list_studies(search=...)` does not find - HTAN, or an HTAN center (OHSU, MSK, Vanderbilt, ...) ## Core Rules 1. Resolve the requested study before substituting another study. 2. If the requested study is not in this deployment, say so explicitly. 3. Do not silently analyze a substitute cohort. 4. If the user agrees to a substitute, keep a one-line scope caveat when reporting numbers. ## Known External cBioPortal Instances These are not necessarily queryable from this MCP server, but they are useful redirects: | User wording | Likely external instance | Scope | |---|---|---| | PBTA, Pediatric Brain Tumor Atlas, pediatric brain tumors | https://pedcbioportal.kidsfirstdrc.org/ | Pediatric cancer studies, including pediatric brain tumor cohorts | | GENIE | https://genie.cbioportal.org/ | AACR GENIE data access, depending on release and permissions | | MSK private / institutional cohorts | private institutional cBioPortal deployments | Not queryable from public cBioPortal unless exported to the public database | ## HTAN Studies HTAN study ids carry the atlas code (`hta9`, `hta8`, ...), and the names don't always name the center, so `list_studies(search="OHSU HTAN")` finds nothing. Search `list_studies(search="HTAN")` and match the center by atlas code: | Atlas code | Center | Study | |---|---|---| | `hta8` | MSK | `crc_hta8_htan_2024` | | `hta9` | OHSU | `brca_hta9_htan_2022` ("Breast Cancer (HTAN, 2022)") | | `hta11` | Vanderbilt | `crc_hta11_htan_2021` | For HTAN imaging (Minerva, MxIF, H&E), continue with the external-resources-guide. ## Study Resolution Workflow 1. Call `list_studies(search=...)` with the user's exact study/cohort phrase and close variants. 2. If a cancer type is mentioned, call `search_oncotree(search_term)` before disease-level study discovery. 3. If no matching study is found, check known external instances above before declaring the study absent. 4. If proposing a substitute, describe why it is a substitute and how its scope differs. ## Substitute-Cohort Answer Pattern > I cannot query PBTA from this cBioPortal deployment. PBTA is typically accessed through pediatric cBioPortal at https://pedcbioportal.kidsfirstdrc.org/. I can analyze `[substitute_study_id]` here, but its results should not be interpreted as PBTA results. When reporting numbers from a substitute: > Scope note: these counts are from `[substitute_study_id]` in this deployment, not from the requested PBTA cohort. ## Do Not - Do not answer a PBTA question with `brain_cptac_2020` numbers without a scope wa … (169 more chars) ▶ 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_run_select_query { "query": "SELECT rd.display_name, rd.resource_type, rs.sample_unique_id, rs.url FROM resource_sample rs JOIN resource_definition rd ON rs.resource_id = rd.resource_id AND rs.cancer_study_identifier = rd.cancer_study_identifier WHERE rs.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20" } ▶ clickhouse_run_select_query { "query": "SELECT rd.display_name, rs.url FROM resource_study rs JOIN resource_definition rd ON rs.resource_id = rd.resource_id WHERE rs.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20" } ◀ 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 'rs.cancer_study_identifier' cannot be resolved from table with name rs. In scope SELECT rd.display_name, rd.resource_type, rs.sample_unique_id, rs.url FROM resource_sample AS rs INNER JOIN resource_definition AS rd ON (rs.resource_id = rd.resource_id) AND (rs.cancer_study_identifier = rd.cancer_study_identifier) WHERE rs.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20. (UNKNOWN_IDENTIFIER) (version 26.4.1.2509 (official build))\n"} ◀ 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 'rs.cancer_study_identifier' cannot be resolved from table with name rs. In scope SELECT rd.display_name, rs.url FROM resource_study AS rs INNER JOIN resource_definition AS rd ON rs.resource_id = rd.resource_id WHERE rs.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20. (UNKNOWN_IDENTIFIER) (version 26.4.1.2509 (official build))\n"} ▶ clickhouse_list_table_columns { "table": "resource_sample" } ▶ clickhouse_list_table_columns { "table": "resource_definition" } ◀ result {"columns":[{"name":"internal_id","type":"Int64"},{"name":"resource_id","type":"String"},{"name":"url","type":"String"}]} ▶ 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)"}]} ◀ result {"columns":[{"name":"internal_id","type":"Int64"},{"name":"resource_id","type":"String"},{"name":"url","type":"String"}]} ▶ clickhouse_list_table_columns { "table": "sample_derived" } ◀ result {"columns":[{"name":"sample_unique_id","type":"String"},{"name":"sample_unique_id_base64","type":"String"},{"name":"sample_stable_id","type":"String"},{"name":"patient_unique_id","type":"String"},{"name":"patient_unique_id_base64","type":"String"},{"name":"patient_stable_id","type":"String"},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"internal_id","type":"Int32"},{"name":"patient_internal_id","type":"Int32"},{"name":"sample_type","type":"String"},{"name":"sequenced","type":"Int32"},{"name":"copy_number_segment_present","type":"Int32"}]} ▶ clickhouse_run_select_query { "query": "SELECT s.sample_stable_id, s.patient_stable_id, rd.display_name, rd.resource_type, rs.url FROM resource_sample rs JOIN sample_derived s ON rs.internal_id = s.internal_id JOIN resource_definition rd ON rs.resource_id = rd.resource_id WHERE s.cancer_study_identifier = 'brca_hta9_htan_2022' AND (lower(rd.display_name) LIKE '%minerva%' OR lower(rs.url) LIKE '%minerva%' OR lower(rd.description) LIKE '%minerva%') LIMIT 20" } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": "SELECT rd.display_name, rd.resource_type, rd.description, rs.url FROM resource_study rs JOIN resource_definition rd ON rs.resource_id = rd.resource_id JOIN cancer_study cs ON rd.cancer_study_id = cs.cancer_study_id WHERE cs.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20" } ◀ result {"rows":[]} ▶ clickhouse_run_select_query { "query": "SELECT s.sample_stable_id, s.patient_stable_id, rd.display_name, rd.resource_type, rs.url FROM resource_sample rs JOIN sample_derived s ON rs.internal_id = s.internal_id JOIN resource_definition rd ON rs.resource_id = rd.resource_id WHERE s.cancer_study_identifier = 'brca_hta9_htan_2022' LIMIT 20" } ▶ clickhouse_run_select_query { "query": "SELECT cancer_study_identifier, name, resource_sample_counts FROM cancer_study WHERE cancer_study_identifier LIKE '%htan%'" } ◀ result {"rows":[]} ◀ result {"rows":[{"cancer_study_identifier":"brca_hta9_htan_2022","name":"Breast Cancer (HTAN, 2022)","resource_sample_counts":{}},{"cancer_study_identifier":"crc_hta11_htan_2021","name":"Pre-cancer Colorectal Polyps (HTAN Vanderbilt, Cell 2021)","resource_sample_counts":{"H&E Slide":26,"MxIF Image":25}},{"cancer_study_identifier":"crc_hta8_htan_2024","name":"Colorectal Cancer (HTAN MSK, Nature 2025)","resource_sample_counts":{"MxIF Image":58}}]} ═ answer (success) I couldn't find a Minerva viewer for the OHSU HTAN sample, because this deployment has no image links for that study. The OHSU HTAN study is [Breast Cancer (HTAN, 2022)](https://www.cbioportal.org/study/summary?id=brca_hta9_htan_2022) (`brca_hta9_htan_2022`). I checked its study-level and sample-level resource links, and there are none. Its image counts are also empty. The other two HTAN studies here do have image links, but these are H&E slides and multiplexed immunofluorescence (MxIF) images, not Minerva links: - [Pre-cancer Colorectal Polyps (HTAN Vanderbilt, Cell 2021)](https://www.cbioportal.org/study/summary?id=crc_hta11_htan_2021) has 26 H&E slides and 25 MxIF images. - [Colorectal Cancer (HTAN MSK, Nature 2025)](https://www.cbioportal.org/study/summary?id=crc_hta8_htan_2024) has 58 MxIF images. I didn't check whether those MxIF links open in Minerva, so I can't say whether they would meet your need. The OHSU imaging may be hosted on the HTAN Data Portal (humantumoratlas.org) instead. That is my general knowledge, not something from this database. If you have a specific OHSU sample ID in mind, I can look at that sample directly. I can also open the Vanderbilt or MSK study if one of those would do.