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.

#StageRuleMSK-CHORD fields
1CRC patients≥1 sample with OncoTree code COAD, READ, COADREAD, MACR, SRCCR, CMC or CAIS: the codes MSK-CHORD groups under “Colorectal Cancer”ONCOTREE_CODE
2metastaticregistry 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
3BRAF V600Ea mutation call with protein change V600E on any CRC sampleMSK-IMPACT mutations
4MSS≥1 CRC sample reads Stable, and none reads InstableMSI_TYPE
5APC truncatinga protein-truncating call, such as a nonsense or frameshift mutation (the script’s TRUNCATING set)mutations
6ATM truncatingsame classesmutations
7no liver metastasesLIVER = No, and no sequenced liver metastasisLIVER, METASTATIC_SITE
8exposurean encorafenib, cetuximab or panitumumab row in the treatment timelineTreatment events, AGENT
9time on therapythe index episode has a recorded start and stopTreatment events
10what came nexta later systemic regimen is recordedTreatment 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.

DefinitionPatientsOf the 2,665, captured
structured only: registry stage 4 or a sequenced metastasis3,0042,142 (80%)
structured, or the liver NLP flag3,6442,476 (93%)
structured, or any distant-organ NLP flag (used)4,1142,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_MONTHS sharing 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:

    agentpatients
    encorafenib71
    cetuximab57
    panitumumab46
    binimetinib29
    masked investigational27

    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

#StagePatients
1CRC patients5,543
2metastatic4,114
3BRAF V600E280
4MSS181
5APC truncating53
6ATM truncating2
7no liver metastases0
8encorafenib and/or anti-EGFR0
9time on therapy recorded0
10next regimen recorded0

Each feature on its own, among the 5,543 CRC patients:

FeaturePatients
BRAF V600E438
MSS4,682
MSI-high586
MSI unresolved or not recorded275
APC truncating4,031
ATM truncating219
liver involvement ever3,143
no liver involvement ever2,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)PatientsEncorafenib and/or anti-EGFREncorafenibUsable duration
none recorded46221822
recorded133765176
unknown2000
all181986998

Other sites recorded in the 46 without liver involvement:

SitePatients
lung31
lymph nodes27
intra-abdominal22
bone15
CNS/brain7
adrenal6
pleura3

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 typePatients (study-wide)What it carries
Treatment24,028agent, subtype (chemo, targeted, biologic, immuno, investigational), start and stop days; “prior medications to MSK” flag
Diagnosis24,947registry stage; ECOG; NLP over radiology reports: tumour sites, cancer present, progression (Y/N with probability)
Lab_Test16,611e.g. CEA with value and unit
Surgery21,530procedure dates
Pathology12,413e.g. MMR by immunohistochemistry
Sample acquisition, Sequencing24,950sample 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)

ExposurePatients
any agent recorded194
encorafenib71
… with a concurrent anti-EGFR antibody58
… with an anti-EGFR antibody and a MEK inhibitor26
anti-EGFR (cetuximab or panitumumab)90
… never encorafenib29
vemurafenib or dabrafenib33
MEK inhibitor (binimetinib, trametinib or cobimetinib)45
masked investigational agent27
encorafenib and/or anti-EGFR100
… with a usable duration100

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 days1–1,170 d; 61–622 d; 6
index regimen included chemotherapy2412
systemic therapy recorded before the index6628
looks like a first systemic therapy21
prior medication outside MSK before the index196
next regimen recorded2713
died, no later regimen3314
possibly ongoing at last contact81
alive, no later regimen31
time to next regimen, median (IQR)187 d (126–292.5), n = 27218 d (110–294), n = 13
≥1 NLP progression call during the episode6326
… a positive call after day 284718

What followed the encorafenib-based index, by regimen class:

Next regimenPatients
chemotherapy7
anti-VEGF + chemotherapy5
anti-EGFR5
trifluridine/tipiracil3
regorafenib or fruquintinib3
masked investigational2
MEK inhibitor1
anti-VEGF1

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.

StudyCRC patientsMetastaticBRAF V600EBRAF V600E + MSSIn MSK-CHORDMSI fieldLiver fieldTreatment timeline
msk_chord_20245,5434,114438214—MSI_TYPEyes/noyes
crc_msk_20266,7893,760537260213MSI_TYPEpositive onlyno
crc_eo_20201,5161,100886154MSI_TYPEpositive onlyno
crc_msk_20171,0991,099743832MSI_STATUSfirst site onlyno
crc_apc_impact_2020471471402928MSI_TYPEyes/nono
mycf_msk_2026234204232019MSI_TYPEyes/noyes
rectal_msk_20227382351198MOLECULAR_SUBTYPEpositive onlyno
rectal_msk_2019300123542MSI_TYPEpositive onlyno
bowel_colitis_msk_202215769211MSI_TYPEpositive onlyno
coadread_mskcc69691n/r0nonepositive onlyno
coadread_mskresistance_2022109000MSI_TYPEpositive onlyno
crc_dd_20224729300MSI_TYPEpositive onlyno
rectal_radiation_msk_2024312000MSI_TYPEpositive onlyno
ntrk_msk_2019720n/r0nonenoneyes
coadread_dfci_201661965111370MSI_STATUSnoneno
crc_sysucc_20221,01525223180MSI_STATUSnoneno
coadread_tcga_pan_can_atlas_20185948748100SUBTYPE*noneyes
coadread_tcga_pub276442050MSI_STATUSnoneno
coadread_tcga6369220n/r0nonenoneno
coad_tcga_gdc4616649n/r0nonenoneyes
read_tcga_gdc170261n/r0nonenoneyes
crc_orion_20247417950MMR_STATUS†positive onlyno
coad_caseccc_20152928220MSI_STATUSnoneno
coadread_genentech74n/r420MSI_STATUSnoneno
crc_nigerian_20206432110MOLECULAR_SUBTYPEnoneno
coad_silu_202234811056n/r0nonepositive onlyno
coad_cptac_201911081300MSI_STATUSnoneno
coad_cptac_gdc105n/r13n/r0nonenoneno
coadread_cass_2020146700n/r0nonepositive onlyno
pog570_bcgsc_202074705n/r0score onlypositive onlyyes
pancan_hcmi_20251695111n/r0nonepositive onlyyes
crc_hta8_htan_202429290n/r0nonenoneno
appendiceal_msk_20220 (appendiceal)——————no
crc_hta11_htan_20210 (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 SUBTYPE and 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

StudyTimelines readAny agentEncorafenibAnti-EGFRUsable duration
msk_chord_2024214 (V600E + MSS)1947190100
mycf_msk_202620 (V600E + MSS)19689
coad_tcga_gdc49 (V600E, MSI unknown)7011
coadread_tcga_pan_can_atlas_201810 (V600E + MSS)3000
pancan_hcmi_202511 (V600E, MSI unknown)5110 (no stop dates)
pog570_bcgsc_20205 (V600E, MSI unknown)4000
read_tcga_gdc1 (V600E, MSI unknown)0000
ntrk_msk_20190————
  • mycf_msk_2026 carries 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-line PFS_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) and TX_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. --refresh re-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 --json output is written with sorted keys, so an offline replay is byte-identical across runs.