Public colorectal cohort funnel, October 2026
Issue: #590 · Track: #327
Script: backend/scripts/cohorts/cbioportal_funnel.py
Data: the public cBioPortal API (portal v7.1.2, database 3.0.0), queried 2026-10-01. Every response was
fetched between 11:18 and 12:04 PDT. MSK-CHORD’s cBioPortal import is dated 2026-07-30.
What this is for. Before building a “people like her” (Neighbors) view, count how many public patients have tumours that look like Maureen’s on somatic features, and check whether their treatment timelines are usable. A cohort like this is decision support and validation. It is never a repurposing signal: everyone counted here received standard drugs, and real-world exposure says nothing about drugs nobody gave them.
Summary
-
Her full somatic profile is not in public data. In MSK-CHORD the strict funnel runs: 5,543 colorectal cancer (CRC) patients, then 4,114 metastatic, 280 BRAF V600E, 181 MSS, 53 APC truncating and 2 ATM truncating. Neither of the last 2 is recorded as free of liver metastases, so 0 remain.
-
APC and ATM truncation are the wrong filters for a treatment question. They remove 99% of the cohort without changing which drugs apply. The usable cohort is BRAF V600E + MSS + metastatic: 181 patients in MSK-CHORD. Of these, 46 never had liver involvement recorded, 133 did, and 2 are unknown.
-
98 of the 181 received encorafenib and/or an anti-EGFR antibody, and all 98 exposures have a start and a stop date. 39 also have a later regimen recorded.
-
Encorafenib specifically. Among BRAF V600E + MSS patients at any stage:
- 71 have an encorafenib episode;
- 58 of those had a concurrent anti-EGFR antibody, 26 of them with a MEK inhibitor as well;
- median time on encorafenib was 155 days (IQR 80.5–290.5).
66 of the 71 had systemic therapy recorded before encorafenib, so this is mostly later-line use.
-
Liver status at the start of encorafenib: 26 without, 45 with. These are the group sizes for the proposed pre-registered question below. I deliberately did not compute their outcomes.
-
MSK-CHORD is the only public source with usable treatment timelines for this question. Across all 34 public CRC studies there are 342 distinct BRAF V600E + MSS patients where MSS can be resolved, and 128 of them are outside MSK-CHORD. None of those 128 has a usable encorafenib or anti-EGFR duration. The other studies with timelines add 1 usable anti-EGFR course (TCGA, MSI unknown) and 1 encorafenib course with no stop date (HCMI, MSI unknown).
-
GENIE BPC CRC would add curated regimen lines and imaging-based progression. It needs a Synapse registration, which is Richard’s call. It probably adds few encorafenib exposures (see below).
Definitions
The funnel runs in the order #590 sets, and every stage is a named rule in the script.
| # | Stage | Rule | MSK-CHORD fields |
|---|---|---|---|
| 1 | CRC patients | ≥1 sample with OncoTree code COAD, READ, COADREAD, MACR, SRCCR, CMC or CAIS: the codes MSK-CHORD groups under “Colorectal Cancer” | ONCOTREE_CODE |
| 2 | metastatic | registry stage 4, a sequenced metastasis, or a distant organ named as a tumour site by NLP over radiology reports: liver, lung, bone, CNS/brain, pleura or adrenal (next section explains why) | STAGE_HIGHEST_RECORDED, SAMPLE_TYPE, LIVER, LUNG, BONE, CNS_BRAIN, PLEURA, ADRENAL_GLANDS |
| 3 | BRAF V600E | a mutation call with protein change V600E on any CRC sample | MSK-IMPACT mutations |
| 4 | MSS | ≥1 CRC sample reads Stable, and none reads Instable | MSI_TYPE |
| 5 | APC truncating | a protein-truncating call, such as a nonsense or frameshift mutation (the script’s TRUNCATING set) | mutations |
| 6 | ATM truncating | same classes | mutations |
| 7 | no liver metastases | LIVER = No, and no sequenced liver metastasis | LIVER, METASTATIC_SITE |
| 8 | exposure | an encorafenib, cetuximab or panitumumab row in the treatment timeline | Treatment events, AGENT |
| 9 | time on therapy | the index episode has a recorded start and stop | Treatment events |
| 10 | what came next | a later systemic regimen is recorded | Treatment events |
All four MSK-IMPACT panels in the CRC set (341, 410, 468, 505 genes) cover BRAF, APC, ATM, KRAS and NRAS. So a missing call means wild type, not “not tested”. 5,521 of the 5,543 CRC samples were sequenced against a matched normal, including all 214 BRAF V600E + MSS samples. None of the 214 carries a KRAS or NRAS hotspot at the extended-RAS codons.
Why “metastatic” includes the NLP site flags
MSK-CHORD has no single “metastatic” field. I tested three readings against an external yardstick: the 2,665 CRC patients who received a drug used in CRC only for metastatic disease. Those drugs are bevacizumab, irinotecan, regorafenib, trifluridine/tipiracil, cetuximab, panitumumab, encorafenib and ramucirumab.
| Definition | Patients | Of the 2,665, captured |
|---|---|---|
| structured only: registry stage 4 or a sequenced metastasis | 3,004 | 2,142 (80%) |
| structured, or the liver NLP flag | 3,644 | 2,476 (93%) |
| structured, or any distant-organ NLP flag (used) | 4,114 | 2,610 (98%) |
The structured fields alone miss a fifth of demonstrably metastatic patients. By construction, the patients they miss are registry stage I–III with only the primary tumour sequenced. Their drugs say they had metastatic disease later. Of the 1,429 patients that no definition flags, 55 (3.8%) received one of these drugs, so the chosen rule rarely misses. The script prints this table on every run.
Timeline rules
MSK-CHORD treatment rows are per-agent courses, with start and stop days counted from the sequencing date (day 0). The timeline has no absolute dates.
- Episode. Rows of one class merge into an episode when the next row starts within 30 days of the current stop.
- Index. The patient’s first encorafenib episode. A patient who never had encorafenib is indexed on their first anti-EGFR episode.
- Time on therapy. Index stop minus index start. It is usable only if every merged row has a stop.
- Regimen. Agents starting between 14 days before the index start and 14 days before the index stop. Supportive agents (leucovorin, bone agents, megestrol) are excluded.
- What came next. The earliest regimen that starts after the index’s last 14 days and is either a new agent or a regimen agent restarted more than 30 days after the stop.
- Possibly ongoing. The patient is alive, has no later regimen, and the index stopped within 30 days
of last contact. This classification relies on
OS_MONTHSsharing the timeline’s day 0. MSK documents that it does, and the data agree: none of the 214 timelines has an event later than 30 days after last contact. - Liver at index. A radiology report naming liver as a tumour site by index start + 30 days. “No” requires at least one NLP-read radiology report by then.
Checks that could have failed
-
Two independent readings of the same treatment records agree exactly. For each agent I compared the server-side treatment summary with my timeline parse, among the 214 BRAF V600E + MSS patients:
agent patients encorafenib 71 cetuximab 57 panitumumab 46 binimetinib 29 masked investigational 27 There were no disagreements.
-
79 CRC patients in MSK-CHORD received encorafenib. 71 of them are BRAF V600E + MSS, 4 are V600E + MSI-high, 3 are V600E with MSI unresolved or not recorded, and 1 is not V600E. So the BRAF V600E + MSS filter keeps nearly all real-world encorafenib use.
-
The liver NLP flag misses some liver metastases. 27 of the 804 CRC patients with a sequenced liver metastasis have
LIVER= No, a floor of 3.4% on its miss rate. -
2 of the 100 exposed patients are not flagged metastatic.
MSK-CHORD
MSK-CHORD: Jee et al., Nature 2024 (PMID 39506116). 25,040 tumours from 24,950 patients, MSK-IMPACT tumour–normal sequencing, with clinical annotation partly derived by NLP.
Strict funnel
| # | Stage | Patients |
|---|---|---|
| 1 | CRC patients | 5,543 |
| 2 | metastatic | 4,114 |
| 3 | BRAF V600E | 280 |
| 4 | MSS | 181 |
| 5 | APC truncating | 53 |
| 6 | ATM truncating | 2 |
| 7 | no liver metastases | 0 |
| 8 | encorafenib and/or anti-EGFR | 0 |
| 9 | time on therapy recorded | 0 |
| 10 | next regimen recorded | 0 |
Each feature on its own, among the 5,543 CRC patients:
| Feature | Patients |
|---|---|
| BRAF V600E | 438 |
| MSS | 4,682 |
| MSI-high | 586 |
| MSI unresolved or not recorded | 275 |
| APC truncating | 4,031 |
| ATM truncating | 219 |
| liver involvement ever | 3,143 |
| no liver involvement ever | 2,363 |
Among the 214 BRAF V600E + MSS patients at any stage, 63 are APC truncating, 7 are ATM truncating and 3 are both. APC truncation is less common here than in CRC overall (29% against 73%), as expected for BRAF-mutant tumours.
Core branch: metastatic, BRAF V600E and MSS, without the APC and ATM stages
| Liver involvement (ever) | Patients | Encorafenib and/or anti-EGFR | Encorafenib | Usable duration |
|---|---|---|---|---|
| none recorded | 46 | 22 | 18 | 22 |
| recorded | 133 | 76 | 51 | 76 |
| unknown | 2 | 0 | 0 | 0 |
| all | 181 | 98 | 69 | 98 |
Other sites recorded in the 46 without liver involvement:
| Site | Patients |
|---|---|
| lung | 31 |
| lymph nodes | 27 |
| intra-abdominal | 22 |
| bone | 15 |
| CNS/brain | 7 |
| adrenal | 6 |
| pleura | 3 |
The lymph-node flag does not separate regional from distant nodes, so it can’t identify nodal-predominant disease like hers on its own.
Treatment and timeline fields
| Event type | Patients (study-wide) | What it carries |
|---|---|---|
| Treatment | 24,028 | agent, subtype (chemo, targeted, biologic, immuno, investigational), start and stop days; “prior medications to MSK” flag |
| Diagnosis | 24,947 | registry stage; ECOG; NLP over radiology reports: tumour sites, cancer present, progression (Y/N with probability) |
| Lab_Test | 16,611 | e.g. CEA with value and unit |
| Surgery | 21,530 | procedure dates |
| Pathology | 12,413 | e.g. MMR by immunohistochemistry |
| Sample acquisition, Sequencing | 24,950 | sample dates relative to day 0 |
4,691 of the 5,543 CRC patients have at least one treatment record. The only outcome fields are
OS_MONTHS and OS_STATUS. There is no curated progression-free survival, only the per-report NLP
progression calls. Agents given on a trial appear as INVESTIGATIONAL (27 of the 214 BRAF V600E + MSS
patients), so trial-era BRAF regimens may hide there.
Exposure among BRAF V600E + MSS patients, any stage (214 timelines)
| Exposure | Patients |
|---|---|
| any agent recorded | 194 |
| encorafenib | 71 |
| … with a concurrent anti-EGFR antibody | 58 |
| … with an anti-EGFR antibody and a MEK inhibitor | 26 |
| anti-EGFR (cetuximab or panitumumab) | 90 |
| … never encorafenib | 29 |
| vemurafenib or dabrafenib | 33 |
| MEK inhibitor (binimetinib, trametinib or cobimetinib) | 45 |
| masked investigational agent | 27 |
| encorafenib and/or anti-EGFR | 100 |
| … with a usable duration | 100 |
These durations are pooled across liver groups, and that is deliberate (see the pre-registration).
| Encorafenib-based index (71) | Anti-EGFR index, never encorafenib (29) | |
|---|---|---|
| time on therapy, median (IQR) | 155 d, 5.1 mo (80.5–290.5) | 99 d, 3.3 mo (28–210) |
| range; episodes shorter than 14 days | 1–1,170 d; 6 | 1–622 d; 6 |
| index regimen included chemotherapy | 24 | 12 |
| systemic therapy recorded before the index | 66 | 28 |
| looks like a first systemic therapy | 2 | 1 |
| prior medication outside MSK before the index | 19 | 6 |
| next regimen recorded | 27 | 13 |
| died, no later regimen | 33 | 14 |
| possibly ongoing at last contact | 8 | 1 |
| alive, no later regimen | 3 | 1 |
| time to next regimen, median (IQR) | 187 d (126–292.5), n = 27 | 218 d (110–294), n = 13 |
| ≥1 NLP progression call during the episode | 63 | 26 |
| … a positive call after day 28 | 47 | 18 |
What followed the encorafenib-based index, by regimen class:
| Next regimen | Patients |
|---|---|
| chemotherapy | 7 |
| anti-VEGF + chemotherapy | 5 |
| anti-EGFR | 5 |
| trifluridine/tipiracil | 3 |
| regorafenib or fruquintinib | 3 |
| masked investigational | 2 |
| MEK inhibitor | 1 |
| anti-VEGF | 1 |
Other public CRC studies
The script takes every study in the OncoTree “bowel” subtree (29 studies) plus the mixed-cancer studies that carry treatment records (5, including MSK-CHORD). In the table, “n/r” means the study does not record the field. “In MSK-CHORD” counts shared MSK-IMPACT patient IDs.
| Study | CRC patients | Metastatic | BRAF V600E | BRAF V600E + MSS | In MSK-CHORD | MSI field | Liver field | Treatment timeline |
|---|---|---|---|---|---|---|---|---|
msk_chord_2024 | 5,543 | 4,114 | 438 | 214 | — | MSI_TYPE | yes/no | yes |
crc_msk_2026 | 6,789 | 3,760 | 537 | 260 | 213 | MSI_TYPE | positive only | no |
crc_eo_2020 | 1,516 | 1,100 | 88 | 61 | 54 | MSI_TYPE | positive only | no |
crc_msk_2017 | 1,099 | 1,099 | 74 | 38 | 32 | MSI_STATUS | first site only | no |
crc_apc_impact_2020 | 471 | 471 | 40 | 29 | 28 | MSI_TYPE | yes/no | no |
mycf_msk_2026 | 234 | 204 | 23 | 20 | 19 | MSI_TYPE | yes/no | yes |
rectal_msk_2022 | 738 | 235 | 11 | 9 | 8 | MOLECULAR_SUBTYPE | positive only | no |
rectal_msk_2019 | 300 | 123 | 5 | 4 | 2 | MSI_TYPE | positive only | no |
bowel_colitis_msk_2022 | 157 | 69 | 2 | 1 | 1 | MSI_TYPE | positive only | no |
coadread_mskcc | 69 | 69 | 1 | n/r | 0 | none | positive only | no |
coadread_mskresistance_2022 | 10 | 9 | 0 | 0 | 0 | MSI_TYPE | positive only | no |
crc_dd_2022 | 47 | 29 | 3 | 0 | 0 | MSI_TYPE | positive only | no |
rectal_radiation_msk_2024 | 31 | 2 | 0 | 0 | 0 | MSI_TYPE | positive only | no |
ntrk_msk_2019 | 7 | 2 | 0 | n/r | 0 | none | none | yes |
coadread_dfci_2016 | 619 | 65 | 111 | 37 | 0 | MSI_STATUS | none | no |
crc_sysucc_2022 | 1,015 | 252 | 23 | 18 | 0 | MSI_STATUS | none | no |
coadread_tcga_pan_can_atlas_2018 | 594 | 87 | 48 | 10 | 0 | SUBTYPE* | none | yes |
coadread_tcga_pub | 276 | 44 | 20 | 5 | 0 | MSI_STATUS | none | no |
coadread_tcga | 636 | 92 | 20 | n/r | 0 | none | none | no |
coad_tcga_gdc | 461 | 66 | 49 | n/r | 0 | none | none | yes |
read_tcga_gdc | 170 | 26 | 1 | n/r | 0 | none | none | yes |
crc_orion_2024 | 74 | 17 | 9 | 5 | 0 | MMR_STATUS† | positive only | no |
coad_caseccc_2015 | 29 | 28 | 2 | 2 | 0 | MSI_STATUS | none | no |
coadread_genentech | 74 | n/r | 4 | 2 | 0 | MSI_STATUS | none | no |
crc_nigerian_2020 | 64 | 32 | 1 | 1 | 0 | MOLECULAR_SUBTYPE | none | no |
coad_silu_2022 | 348 | 110 | 56 | n/r | 0 | none | positive only | no |
coad_cptac_2019 | 110 | 8 | 13 | 0 | 0 | MSI_STATUS | none | no |
coad_cptac_gdc | 105 | n/r | 13 | n/r | 0 | none | none | no |
coadread_cass_2020 | 146 | 70 | 0 | n/r | 0 | none | positive only | no |
pog570_bcgsc_2020 | 74 | 70 | 5 | n/r | 0 | score only | positive only | yes |
pancan_hcmi_2025 | 169 | 51 | 11 | n/r | 0 | none | positive only | yes |
crc_hta8_htan_2024 | 29 | 29 | 0 | n/r | 0 | none | none | no |
appendiceal_msk_2022 | 0 (appendiceal) | — | — | — | — | — | — | no |
crc_hta11_htan_2021 | 0 (pre-cancer polyps) | — | — | — | — | — | — | no |
* TCGA PanCancer has no categorical MSI call, only scores and a molecular SUBTYPE. I read the CIN and
GS subtypes as MSS and the MSI subtype as MSI-high. That reading is my judgement call: the two
non-hypermutated subtypes are MSS by construction. It is flagged in the output, and it touches 10 patients.
† crc_orion_2024 records MMR status by immunohistochemistry only. I read pMMR as MSS, also flagged.
Where a sample has only MSI scores (all of POG570, and a few samples elsewhere), the script reports
“score only” and applies no threshold.
How each study encodes MSI:
MSI_TYPE: Stable / Instable / Indeterminate / Do not report. Used by the MSK studies.MSI_STATUS: MSS / MSI-H / MSI-high / MSI / MSI-L / Not Evaluable / Inconclusive. MSI-L is left unresolved, not read as MSS.MOLECULAR_SUBTYPE: MSS / MSI / POLE.- TCGA
SUBTYPEand the MMR fields, as above. - Score-only fields:
MSI_SCORE,MSI_SENSOR_SCORE,MSI_SCORE_MANTIS,MSI_PREDICTION_SCORE.
Overlap. The MSK studies re-use MSK-IMPACT patients. crc_msk_2026 is the largest genomic CRC cohort
on the portal, and it holds 213 of MSK-CHORD’s 214 BRAF V600E + MSS patients plus 47 more, with no
treatment data. The TCGA builds overlap each other. Counting each patient once, there are 342 distinct
BRAF V600E + MSS patients across the studies where MSS resolves, and 128 outside MSK-CHORD.
Studies with treatment timelines
| Study | Timelines read | Any agent | Encorafenib | Anti-EGFR | Usable duration |
|---|---|---|---|---|---|
msk_chord_2024 | 214 (V600E + MSS) | 194 | 71 | 90 | 100 |
mycf_msk_2026 | 20 (V600E + MSS) | 19 | 6 | 8 | 9 |
coad_tcga_gdc | 49 (V600E, MSI unknown) | 7 | 0 | 1 | 1 |
coadread_tcga_pan_can_atlas_2018 | 10 (V600E + MSS) | 3 | 0 | 0 | 0 |
pancan_hcmi_2025 | 11 (V600E, MSI unknown) | 5 | 1 | 1 | 0 (no stop dates) |
pog570_bcgsc_2020 | 5 (V600E, MSI unknown) | 4 | 0 | 0 | 0 |
read_tcga_gdc | 1 (V600E, MSI unknown) | 0 | 0 | 0 | 0 |
ntrk_msk_2019 | 0 | — | — | — | — |
mycf_msk_2026carries an MSK-CHORD-style timeline, but its patients are MSK-CHORD’s. 19 of its 20 BRAF V600E + MSS patients are already in MSK-CHORD, and the remaining one had no exposure.- Its OS anchor check fails. 2 of its 20 timelines have events after last contact, so the script switches its “possibly ongoing” classification off.
- TCGA’s drug records are mostly adjuvant.
Treatment fields outside a timeline
Some studies carry treatment as clinical attributes rather than timelines. Counts are CRC patients with a value.
crc_apc_impact_2020:FIRST_LINE_MET_TX(471), a first-line regimen class, together with first-linePFS_MONTHS. It names anti-EGFR for 1 BRAF V600E + MSS patient.crc_eo_2020:TREATMENT_AT_METASTASIS(973), free text. It names anti-EGFR for 1 BRAF V600E + MSS patient.crc_hta8_htan_2024:TX_LINES(29) andTX_RES_CAT(19), with PFS.coadread_cass_2020: pre- and post-operative targeted agents (14 and 11), with progression time.coad_silu_2022,crc_sysucc_2022,rectal_msk_2022,coadread_tcga: adjuvant, neoadjuvant or chemoradiation detail.
None of these yields an encorafenib course or a duration.
AACR GENIE BPC colorectal: what it would add
GENIE BPC is not on the public portal. It needs a Synapse account and acceptance of GENIE’s terms of access, so whether to get it is Richard’s call. Here is what it would add, from #327 and the population planning doc.
- Curated outcomes.
- It holds 1,485 CRC patients in v2.0-public, from several cancer centres including MSK.
- Curators abstracted it under the PRISSMM model: regimen-level drug data with dates, imaging- and oncologist-assessed progression, and so a real progression-free survival per regimen. That is the endpoint MSK-CHORD lacks.
- MSI/MMR and PD-L1 are recorded.
- Some patients outside MSK. MSK-CHORD is one centre’s referral population.
- Probably few encorafenib exposures. To my recollection the CRC cohort was sequenced well before the April 2020 approval of encorafenib + cetuximab. That is unverified, so check the BPC data guide before counting on it. If true, BPC strengthens the anti-EGFR and chemotherapy questions more than the encorafenib one.
- Overlap. MSK contributes to BPC, so some BPC patients are MSK-CHORD patients. Whether the identifiers allow a join is unknown until the data is in hand.
Licence notes
- MSK-CHORD is CC BY-NC-ND 4.0, as stated in its cBioPortal study description. Commercial requests go
to MSK. In practice:
- Attribution. Cite Jee et al., Nature 2024, and cBioPortal.
- Non-commercial. Maple’s use is personal and non-commercial. Anything else needs MSK’s permission.
- No derivatives. Adapted material may not be shared. Raw responses stay under
backend/data/cohorts/cbioportal/(gitignored), patient-level derived tables are never committed, and this repo carries only the script and aggregate counts. - Publishing counts. Whether aggregate counts on a public page count as “adapted material” is a contractual question, not a technical one. My reading is that counts are facts reported with attribution, as papers report them. #327 left the call to Richard, and on 2026-10-06 he cleared the aggregate counts on this page for publication.
- The other 33 studies state no licence in their descriptions. TCGA and CPTAC are NIH open-access data. Check each source publication’s terms before any reuse beyond counts.
- GENIE BPC: Synapse registration and GENIE’s terms of access. That is a data-use agreement in all but name.
- TabPFN. #327 notes that MSK-CHORD’s non-commercial clause stacks with the TabPFN weights’ licence. That matters only if these rows train a model, and nothing here does.
Proposed pre-registered question for a two-week Neighbors v0 spike
(2026-10-05: approved as decision D-Q4-13 on #614 and run once from the frozen code. Its results by liver group are not published.)
Question. Among MSK-CHORD patients with BRAF V600E, MSS colorectal cancer who started an encorafenib-based regimen:
- How long did they stay on encorafenib?
- What systemic therapy came next?
Answer both separately for those without and those with liver involvement on radiology at the start.
Why this one. Her disease is nodal without liver metastases, and she is on BRAF/EGFR maintenance. So the practical questions are how long such therapy holds and what usually follows it. Liver involvement is the subgroup her own record makes salient (mission spec §2.5).
Fixed in advance:
- Cohort. BRAF V600E + MSS CRC patients in MSK-CHORD with at least one encorafenib row, under this script’s definitions. That is 71 at the 2026-10-01 query, and 69 of them also carry the metastatic flag.
- Index. The start of the first encorafenib episode, with rows merged across gaps of 30 days or less.
- Groups: liver at index, as defined above.
- “With liver” means a radiology report naming liver by index + 30 days: 45 patients.
- “Without liver” means none, though at least one radiology report was read by then: 26 patients.
- The “ever” flag is not used. It would move 6 of the 26 into the liver group, because their liver disease appeared only after encorafenib started.
- Primary endpoint. Time on encorafenib (index stop minus index start). An episode is censored when the patient was alive, had no later regimen, and stopped within 30 days of last contact (8 of the 71).
- Secondary endpoints:
- time to next regimen;
- class of the next regimen;
- the share with a positive NLP progression call after day 28 of the episode.
- Analysis. A Kaplan–Meier median with a 95% CI per group, and the difference in medians with a bootstrap CI. It is descriptive: with 26 and 45 patients no test is powered, and none will be reported as one.
- Reported by group, not adjusted for:
- line of therapy (66 of 71 had systemic therapy before encorafenib);
- regimen composition (with anti-EGFR, with a MEK inhibitor, with chemotherapy);
- prior treatment outside MSK (19 of 71).
- Freeze. The question, the definitions in this script and the analysis code are committed before anyone computes durations by liver group. This script stops at group sizes and pooled durations for that reason.
What the answer can and cannot say.
- It describes how encorafenib-based therapy went for comparable patients in routine care at one centre, mostly in later lines.
- It does not predict her course.
- Her regimen began with chemotherapy for a recurrence and continued as maintenance, and she has no evidence of disease on it.
- The cohort records disease status only through NLP calls, and has 24 encorafenib starts with concurrent chemotherapy and 2 that look like a first systemic therapy.
- It is not causal. Liver involvement travels with tumour burden, line of therapy and performance status.
Limits
- One centre, a referral population, and mostly later-line encorafenib. There are no absolute dates, so era can’t be adjusted for.
- Rows record courses, not doses. 12 of the 100 index episodes are shorter than 14 days, which may mean single administrations or recording artefacts.
- Encorafenib exposure is a floor. Masked investigational rows (27 of 214 patients) may hide trial BRAF or EGFR regimens.
- Treatment before MSK is a flag, not a regimen list.
- Site and progression flags are NLP model outputs. The liver flag misses at least 3.4% of sequenced liver metastases.
- Time on treatment is a proxy for benefit, not progression-free survival.
Reproduce
These numbers measure a portal that reloads weekly, so a fresh run measures a different one. To replay this measurement, point the script at its snapshot in the main checkout:
python backend/scripts/cohorts/cbioportal_funnel.py --offline --cache-dir C:/Maple/backend/data/cohorts/cbioportal/snapshots/2026-10-02_590/http_cache
python backend/scripts/cohorts/cbioportal_funnel.py --json backend/data/cohorts/cbioportal/funnel.json
- The snapshot is a 2026-10-02 re-run. The 2026-10-01 cache was lost when the worktree holding it was
pruned. The 2026-10-02 live re-run reproduces this document: 344 of the 346 numbers in its results
sections, and the other two are month conversions of day counts it carries. The snapshot holds its 702
cached responses and its output,
funnel_2026-10-02.json. It is host-only and gitignored, because MSK-CHORD is CC BY-NC-ND. An offline replay on 2026-10-04 sent no request and matched that output exactly, apart from its own timestamp. - A fresh measurement (the second command) sends about 700 requests, one at a time with a pause
between them, and caches them under
backend/data/cohorts/cbioportal/http_cache/in the checkout it runs in. Copy that cache into a new dated snapshot before the session ends.--refreshre-downloads. - Query window. Every printed study block carries its own fetch window in PDT.
- The client is the shared one in
backend/connectors/cbioportal_client.py(#667). Its cache key and entry layout are this script’s originals, so caches made before the switch replay unchanged. Since #667 the--jsonoutput is written with sorted keys, so an offline replay is byte-identical across runs.