"""Build a standalone, locally searchable report from verified analysis outputs."""
from pathlib import Path
import json,html,re,shutil
import pandas as pd
import numpy as np
import markdown
R=Path(__file__).resolve().parents[1];A=R/'analysis'
REPORT_DIR=R.parents[2]/'reports/proteomics/quantitative-2026-10-29'
REPORT_DIR.mkdir(parents=True,exist_ok=True)
(REPORT_DIR/'figures').mkdir(exist_ok=True)
q=json.loads((A/'qc_summary.json').read_text());supp=json.loads((A/'supplement_summary.json').read_text())
t=pd.read_csv(A/'therapeutic_targets.tsv',sep='\t').set_index('gene')
def md(s):return markdown.markdown(s,extensions=['tables','fenced_code','sane_lists'])
def table(df):return '<div class="table-wrap">'+df.to_html(index=False,na_rep='—',border=0,escape=True,float_format=lambda x:f'{x:,.2f}')+'</div>'
def fig(name,caption):
 source=R/'figures'/name
 if source.exists(): shutil.copyfile(source,REPORT_DIR/'figures'/name)
 return f'<figure><img src="figures/{name}" alt="{html.escape(caption)}"><figcaption>{html.escape(caption)}</figcaption></figure>'
blocks=[]
def section(id,title,content):blocks.append(f'<section id="{id}"><h2>{html.escape(title)}</h2>{content}</section>')
section('conclusions','What the new analysis changes',md('''
**The data strengthen several investigational target-validation leads, but do not establish a new approved treatment indication.** FAP and LRRC15 are the clearest stromal signals; ROR1 deserves a conditional second-tier look. CDH17 and PTK7 have strong identification support, although this sample is not unusually high for those proteins in the most comparable CRC reference. These are leads for an oncology/molecular tumour-board discussion and current-lesion validation, not estimates of response probability.

1. **FAP radioligands remain a serious investigation priority.** Fourteen distinct target-specific peptide sequences support detection. Its relative signal is elevated against the Astral CRC reference and remains elevated after comparison with a fixed extracellular-matrix marker panel. The decisive next evidence is current-lesion, programme-specific FAP imaging and dosimetry—not the archival bulk quantity alone.
2. **CDH17 ADCs have the strongest combination of robust target detection and new human CRC evidence among the newly emphasized epithelial targets.** CDH17 has 22 unique sequences. ARR-217/MRG007 and AMT-676 have early clinical CRC signals; present-day tumour membrane staining and protocol eligibility would make this actionable as trial screening. The protein result supports presence, not overexpression.
3. **LRRC15 and ROR1 warrant more selective investigation.** Both have conspicuous exploratory rank shifts and multiple unique peptides. LRRC15 may be stromal; ROR1's malignant-cell surface localization is unproven. Human CRC efficacy and realistic access are much less established than for CDH17 or MET ADCs.
4. **CEA and MET remain relevant for reasons beyond this proteome.** Strong prior metastatic CEA IHC remains useful. MET non-detection in this treated primary does not negate a different specimen's IHC or the emerging MET-unselected Temab-A evidence.
5. **The proposed immune strategy remains experimental.** HLA-I, B2M, TAP1/2 and PTPN1/2 are detected, but this does not establish malignant-cell antigen presentation, phosphatase dependence, checkpoint sensitivity or a safe/effective FAP-radiation/checkpoint/IL-12/15/vaccine/AC484 combination.

**A consequential correction:** the vendor's “AO/control” values are exactly the public HPA colon reference, not a matched patient normal. Run 423 is a separate unexplained column. Neither provides a valid patient tumour-versus-normal comparison. No patient differential-expression P values are used here.
'''))
section('specimen','Specimen identity and the two controls',md('''
The delivered vendor report explicitly maps **FZPR260000422-1A → B7_43**. Existing primary pathology and Signatera records map **B7 to the rectal low anterior resection collected 22 October 2024, UCLA SSW-24-27123**, after neoadjuvant treatment. B6–B7 were lesion cross-sections in relation to uninvolved mucosa and the radial margin. This is an archival treated primary, not the October 2026 nodal biopsy. The suffix `_43`, exact submitted sections and B7-specific viable tumour percentage remain unverified. The vendor project's `B1_43` suffix is not evidence that the submitted pathology block was B1.

The relevant original pathology packet is [the April 2026 add-on packet containing the original surgical report](https://youngcrc.com/reports/clinical/clinical_her2_pathology.pdf). The accession/block audit and narrower provenance limitations are recorded in [the provenance review](analysis/provenance_review.md).

| Label | What is verified | Appropriate use |
|---|---|---|
| Run 422 / B7_43 | Vendor sample table and quantitative matrix/workbook agree | Patient protein signal and peptide-support analysis |
| Run 423 / workbook “control” | Quantitative values agree across delivered tables; specimen identity unknown | Retain for provenance only; neither normal tissue nor an assumed technical replicate |
| AO / differential-report “control” | All **4,186 positive entries exactly equal HPA colon tissue-summary intensities** by gene; independently corroborates the supplied analyst tracker | External one-donor context only; not a contemporaneous biological control |

The report's B7 quantities are the native run-422 values multiplied by **1.052755**. Its control column is not run 423. Their high run-422/run-423 log-signal correlation (**0.9898**) cannot establish the identity or reproducibility of either specimen. The user confirmed that the control identities were not known to them; no normal-tissue assumption was made from the labels.

The vendor report claims 486 significant differences, while its stated two-fold plus P-value rule actually retains 458. More fundamentally, its Significance-A calculation compares one patient sample with an external reference and does not estimate replicated patient biological variation. Those calls and pathway enrichments based on them are not treated as patient-specific differential expression.
'''))
section('data','Data acquired and identification quality',md(f'''
The three processed vendor archives, shared analysis outputs/code/configuration, public reference snapshots, original explorer and tracker were downloaded or preserved locally: **69 files, 529,886,035 bytes**, before extraction and newly retrieved public datasets. The three processed ZIPs all match the provider's published MD5 checksums; public input/reference SHA-256 values are in the [download manifest](download_manifest.json); the original acquisition manifest is retained locally. Supplied scripts were inspected as source material, not executed. The new analysis scripts are separate.

**Raw-spectrum limitation:** the 8.86 GB exposed instrument file is run 423; the 12.35 GB raw archive was not downloaded. The connector rejected the file size and the browser blocked the direct download. The archive's contents were not inspected, so it may contain run 422. No raw-spectrum re-search, retention-time/fragment review or independently reconstructed FDR is claimed. The processed tables include run 422 and support the analyses below.

| Quality measure | Result |
|---|---:|
| Delivered protein groups | {q['protein_groups_total']:,} |
| Positive run-422 protein-group measurements | {q['tumour_detected_groups']:,} |
| Quantified precursor rows | {q['tumour_quantified_precursors']:,} |
| Distinct unmodified peptide sequences across the run | {q['unique_unmodified_sequences']:,} |
| Strict analysis set: single gene, ≥2 unique sequences, no contaminant-library flag | {q['high_support_genes']:,} genes |
| Inclusive sensitivity set retaining flagged endogenous proteins | {supp['inclusive_genes']:,} genes |
| Disagreements with vendor unique-peptide counts | **0** |
| Positive protein signal range | {q['protein_signal_dynamic_range_log10']:.2f} orders of magnitude |

Among detected groups, 1,059 have only one unique sequence, 37 only shared-peptide evidence, and 116 ambiguous gene assignment under the mutually exclusive QC hierarchy. Twenty-six additional groups are flagged by the contaminant library; this does **not** prove contamination. KRT8/18/19/20 are plausible endogenous epithelial proteins with strong peptide support and are retained in the inclusive sensitivity analysis. The library flag is preserved for inspection.

The search FASTA contains 20,422 human sequences. Twenty-five exact gene-name disagreements between the HPA mapping and FASTA all retain matching UniProt accessions; they are recorded in the [symbol audit](analysis/gene_symbol_audit.tsv), predominantly as nomenclature differences. None affects the main FAP/LRRC15/ROR1 findings. Multiple qualifying groups for one gene are represented by the largest measured group, with multiplicity recorded, not summed as separate molecules.

The vendor reports approximately 1% identification filtering, but its methods describe different DIA-NN confidence fields and the matrices do not include their q-values. Multiple peptides strengthen support; they do not independently establish a 1% target-level error rate. Distinct missed-cleavage sequences can overlap and are not independent biological replicates.

An additional sequence audit searched all **151 reported unique sequences for 18 key targets** against the delivered FASTA, both exactly and treating isoleucine/leucine as indistinguishable. Every sequence matched its assigned target. All FAP/LRRC15/ROR1/CDH17/PTK7 sequences remained target-gene-specific. One HLA-C peptide becomes indistinguishable from fully tryptic HLA-B/E sequences under I/L equivalence; three HLA-C peptides remain specific within this database. One SMARCA4 and one TAP1 sequence have alternative matches only with noncanonical tryptic boundaries. These are useful specificity cautions, not evidence that the whole identifications fail. The reference FASTA is not a personalized HLA/isoform database, and this audit does not inspect spectra. [Peptide audit](analysis/target_peptide_mapping_audit.tsv).
''')+fig('qc.png','Measured protein-group signals and an alternative aggregation of the same underlying peptide measurements. Agreement is not independent assay validation.'))
section('methods','How relative expression was quantified',md('''
The primary output is the **native delivered protein-group signal**, in arbitrary units, together with accession/group identity, unique-sequence count, coverage, and a within-sample signal rank. A rank of 80 means this signal exceeds roughly 80% of measured protein-group signals. It is not 80% expression, an 80th percentile among patients, or a molecule-count ranking across proteins.

An additional **Top3 peptide aggregation** sums measured charge and modification states for each distinct proteotypic sequence, then takes the mean of the three strongest sequences. At least three sequences are required. This checks aggregation sensitivity using the same measurement; it is not calibrated Top3 concentration. Its overall Spearman correlation with delivered protein signal is 0.969. The exact quantity field and settings cannot be reconstructed from the versionless matrix alone. [DIA-NN documentation](https://vdemichev.github.io/DiaNN/) distinguishes its protein quantity fields and confidence filters; [MaxLFQ](https://pubmed.ncbi.nlm.nih.gov/24942700/) and [Top3](https://pubmed.ncbi.nlm.nih.gov/16219938/) methods do not make uncalibrated intensities equivalent to molecule counts.

For each public reference separately, the main rank comparison uses genes measured in the patient strict set and at least 80% of reference columns. Each sample is ranked within that anchor set; the patient's rank minus the reference median rank is reported in percentage points. Reference missing values remain missing. Detection counts are exported independently of the anchor filter. Sensitivity checks use 50% and 100% coverage thresholds, inclusion of flagged endogenous proteins, and fixed compartment-marker ratios. Pairwise matched-gene reranking independently gives very similar lead-target shifts.

Median-centred log2 contrasts are available in the data tables as exploratory signal summaries. **They are not validated tumour/reference fold changes.** Preparation, fixation, digestion, instrument, search, quantification and cellular composition are confounded with patient-versus-reference status. No quantile normalization, ComBat correction, missing-value substitution, patient P values or invented biological replicates are used to obscure that limitation. Tissue composition is described, not converted into an unvalidated tumour-purity percentage. These choices follow the cautions in [directLFQ](https://pmc.ncbi.nlm.nih.gov/articles/PMC10315922/) and published [missing-value benchmarks](https://pmc.ncbi.nlm.nih.gov/articles/PMC10949645/).

We did not manufacture patient iBAQ by dividing protein intensity by protein length. Genuine iBAQ needs an appropriate summed peptide intensity and theoretical observable-peptide denominator. Instead, an independently published iBAQ resource supplies separately labelled public abundance context.
'''))
co=pd.read_csv(A/'reference_cohorts.tsv',sep='\t')[['cohort','samples','genes_any','anchor_genes','median_query_correlation']]
co.columns=['Reference','Sample columns','Genes detected anywhere','Main anchor genes','Median Spearman with patient']
section('references','Public reference coverage and compatibility',table(co)+md('''
**Astral CRC, PXD073413:** 27 CRC samples, 13 KRAS-mutant and 14 wild-type; pooled QC columns excluded. Same instrument family makes this the most relevant available signal-rank comparator, but not a batch-matched or post-treatment rectal-resection reference. The exported matrix used here contains tumours; adjacent normal tissues mentioned in the study description were not assumed to be present. The dataset is now linked to a [published study](https://www.nature.com/articles/s42255-026-01482-3).

**Komor, PXD012254:** the quantitative export has 30 cancer and **19 normal run columns**. The [paper](https://pmc.ncbi.nlm.nih.gov/articles/PMC7027554/) describes 18 normal samples, and a donor/repeat crosswalk was not resolved. These are therefore run-level contextual summaries, not 19 verified independent normal donors. This older, shallower Spectronaut dataset has appreciably lower overlap with the patient than Astral.

**HPA colon:** three tissue measurements from **one healthy female donor**, not a healthy-population cohort. The published method is FFPE, Astral Zoom, DIA-NN and directLFQ. This is useful preparation context, but normal colon layer composition and batch differences remain. The vendor's AO control is this resource's colon summary. [HPA methods](https://www.proteinatlas.org/humanproteome/tissue/method/MS%2Bbased).

**CPTAC paired TMT context:** 96 matched tumour/normal case IDs; 5,807 genes met the ≥10-pair criterion. Within-study paired differences, Wilcoxon tests and Benjamini–Hochberg FDR were computed only inside that public cohort. They do not test this patient. TMT reference-channel quantities are not directly subtracted from the patient's DIA signal. [CPTAC PDC000116](https://proteomic.datacommons.cancer.gov/pdc/study/PDC000116).

**Independent public iBAQ context:** downloaded the [Robles et al. harmonized solid-tissue resource](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011828) from [PRIDE](https://ftp.ebi.ac.uk/pub/databases/pride/resources/colorectalcancer/). It contains 8,949 genes and 274 annotated sample columns: 143 tumour, 70 mucosa and 61 adenoma across five datasets. We export detection fractions and positive-value median/IQR separately for ten dataset/tissue groups; no cross-platform pooled distribution or patient percentile is calculated. Ninety CPTAC participants are verified by barcode; other donor counts/pairing remain unresolved. Coverage ranges from 169 to 7,556 genes per sample. A numerical non-sample peptide-count column was excluded, and two standalone SDRF annotation discrepancies are documented. [Context table (gzip)](analysis/public_ibaq_context.tsv.gz) · [sample metadata](analysis/public_ibaq_sample_metadata.tsv) · [inspection audit](reference/robles_crc/README_INSPECTION.md).

These resources are complementary, not necessarily statistically independent replications. HPA IHC provides compartment/normal-tissue context, while the supplied SURFY/CSPA, Pharos and Open Targets 26.09 snapshots support broad target screening. Current clinical claims were checked against primary publications, labels and registry records rather than accepted from database drug-name matches.
'''))
focus=['FAP','LRRC15','ROR1','CDH17','PTK7','GPA33','CEACAM5','EGFR','CD276','ERBB2','PTPN1','PTPN2','B2M','GUCY2C','NT5E','SMARCA4','MTAP']
ft=t.reindex(focus)[['n_unique_sequences','signal_percentile_all_detected','Astral_CRC_rank_shift_points','Astral_CRC_measured_samples_all']].reset_index()
ft.columns=['Protein','Unique sequences','Within-sample signal rank %','Exploratory Astral rank shift, points','Astral detected / 27']
section('targets','Key quantitative findings',table(ft)+md('''
**FAP, LRRC15 and ROR1 show robust positive rank shifts; CDH17 does not.** Across the tested anchor/contaminant choices where each target remains eligible, FAP shifts +38.3 to +39.0 points, LRRC15 +52.2 to +52.4, and ROR1 +43.8 to +43.9. CDH17 shifts −16.7 to −15.8; PTK7 is approximately unchanged (+0.9 to +1.0). These stable patterns justify validation priorities, not clinical overexpression thresholds. The reference detection denominators are 27/27, 26/27 and 25/27 for FAP/LRRC15/ROR1, respectively.

Reference depth matters: FAP is detected in **21/30 Komor CRC runs**, despite being excluded from that main ≥80%-coverage rank comparison. LRRC15 is detected in only 1/3 HPA colon measurements; ROR1 in 1/30 Komor cancers and 2/19 normal runs. Blank rank cells mean no eligible comparison, not proven absence. The older iBAQ CPTAC tumour resource detects FAP in 40/90, LRRC15 in 13/90, PTK7 in 74/90 and CDH17 in 87/90 samples; absence in a shallower assay is not an estimate of biological prevalence.

**MET and TACSTD2/TROP2 are not detected in the run-422 protein-group table.** EGFR is detected and has a positive Astral shift; this does not establish panitumumab sensitivity after prior exposure. ERBB2/HER2 and CD276/B7-H3 are detected but lower in the Astral rank comparison. Nothing here overturns prior HER2 IHC0/no established amplification or turns a low TROP2 phenotype into a strong approved-drug match.

In the separate paired CPTAC cohort, FAP's median tumour-minus-normal log2 signal is **+1.31** (82/96 pairs positive), PTK7 **+0.39**, CEA **+0.99**, and CDH17 **−0.38**. These are public CRC tissue effects, not this patient's fold changes. LRRC15 and ROR1 lack retained paired estimates and cannot inherit FAP's corroboration.
''')+fig('anchor_sensitivity.png','Exploratory rank-shift sensitivity. Targets not meeting a particular coverage threshold have no estimate under that rule.')+fig('reference_sensitivity.png','Different reference cohorts yield different exploratory rank shifts. Missing comparisons are left blank.'))
section('composition','Composition, RNA concordance and immune interpretation',md('''
**The tissue is mixed, with especially strong muscle and matrix signals.** DES, CNN1, MYH11 and TAGLN are all among the top approximately 0.2% of measured signals. COL1A1/2, FN1, LUM and DCN are also abundant. This fits a treated lesion/radial-margin resection containing bowel wall and fibrosis, but histology is required to quantify the source. Strong KRT8/18/19/20 and other epithelial signals are retained; this is not evidence that epithelial tissue is absent.

An explicit denominator sensitivity check makes the limits visible. Relative to the geometric mean of **DCN, LUM, COL1A1, COL1A2, COL3A1, FN1 and POSTN**, the patient's FAP and LRRC15 log2 signal ratios exceed the Astral reference medians by **+1.11 and +2.10**, respectively. Using **DES, CNN1, MYH11 and TAGLN** instead reverses those differences to **−1.70 and −1.13**. ROR1 is +2.90 against the ECM panel but −0.40 against muscle. CDH17 is essentially unchanged against an eight-marker epithelial panel (+0.02), despite its negative whole-proteome rank shift. These answer different composition questions; none is a validated per-cancer-cell fold change. [Full sensitivity table](analysis/marker_ratio_sensitivity.tsv).

**Prior RNA is supportive context, not a substitute for protein localization.** The join retains the March 2024 Caris rectal biopsy, October 2024 B4 Tempus/BostonGene resection assays, and liver single-cell data as separate sources. Their whole-gene RNA/protein rank correlations are modest (Caris 0.266, Tempus 0.392, BostonGene 0.452), as expected for different tissues, times, composition and pipelines. Caris/Tempus TPMs are research re-quantifications, not interchangeable clinical assay scales; BostonGene percentiles are vendor-reported.

ROR1 has a prior B4 BostonGene RNA percentile of 100, but sparse liver tumour-cell RNA detection (~2.65%). FAP/LRRC15 liver single-cell signals are principally stromal in the prior summary; CDH17/PTK7/CEA have malignant-cell RNA support. These observations help select spatial tests but cannot show that the same protein is expressed on present nodal cancer-cell membranes. Single-cell dropout and annotation uncertainty make a zero fraction different from proven absence. [All joined targets](analysis/targets_with_prior_RNA.tsv).

**Antigen-presentation machinery is present somewhere in the specimen.** HLA-A/B/C, B2M, TAP1/2, TAPBP, STAT1 and immunoproteasome components are detected. B2M is relatively lower in the Astral comparison (−27.7 rank points), and the panel is not uniformly elevated. Nodal immune cells could supply strong HLA/B2M background. Detection does not prove retention of the relevant HLA allele, natural presentation of a vaccine neoepitope, or tumour-cell recognition. The supplied search is not immunopeptidomics or a personalized mutant-peptide search. A [CRC organoid study](https://pmc.ncbi.nlm.nih.gov/articles/PMC6859637/) directly illustrates that HLA expression and predicted mutations do not guarantee detectable mutant ligands.

PTPN1 (11 unique sequences) and PTPN2 (3) are present but not elevated in the Astral rank comparison (−3.8 and −7.0 points). Total protein cannot establish phosphatase activity, IFN-signalling dependence or AC484 response. PTPRC/CD4/CD163 support immune admixture. CD3/CD8 and most cytotoxic markers were not detected; PRF1 had only single-sequence support. This does not prove an immune desert. No numerical immune-cell fraction or exclusion mechanism is inferred.

SMARCA4 is retained in bulk protein (4 unique sequences); a missense variant plus this signal does not establish complete SMARCA4 protein loss or synthetic-lethal drug eligibility. MTAP is also retained (11 sequences), which does not select an MTAP-deletion strategy or exclude a tumour-specific loss masked by other cells. PARP1, ATM, TOP1 and pathway-protein detection do not establish HRD, DNA-repair dependence or chemotherapy sensitivity. This is total proteomics, not a phosphoproteomic activation assay.
'''))
section('therapies','Therapeutic implications and realistic priorities',md('''
| Priority for discussion | What supports it | What would make it more actionable |
|---|---|---|
| **CDH17 ADCs: ARR-217/MRG007, AMT-676** | 22 unique sequences; new human CRC activity | Current tumour membrane CDH17 staining and actual cohort eligibility; no approved CRC indication |
| **FAP radioligands, as one therapeutic category** | 14 sequences, positive rank and ECM-relative signals | Current programme-specific FAP PET, retention/dosimetry and coverage of relevant lesions; current recruiting cohort/site confirmation |
| **CEA ADCs and MET ADC Temab-A** | Strong prior metastatic CEA IHC; CRC clinical evidence for both classes; latest MET trial was expression-unselected | Current protocol eligibility and tissue assay if required; prior-line, GI/bleeding and bevacizumab constraints where applicable |
| **PTK7 ADCs** | 19 sequences, credible target presence | Current membrane staining; CRC acceptance and payload-exposure rules; no verified human CRC efficacy here |
| **LRRC15 ADC ZL-6201** | 8 sequences and high exploratory relative signal | Separate fibroblast versus malignant-cell staining; ≤3 prior-line gate may constrain access; no verified human CRC efficacy |
| **ROR1-directed trials** | 6 sequences, stable rank signal, prior RNA support | A feasible accepting CRC trial first, then qualified tumour-membrane IHC; currently a conditional research lead |
| **B7-H3 / PTK7×B7-H3 trials** | CD276 detected, but not B7-H3-high by this comparison | Same-cell membrane coexpression for a dual construct; several programmes have line or recent-irinotecan exclusions |

**Two clinical updates matter independently of the proteomics.** The 25 October ARR-217 sponsor disclosure reported 13/29 responses at 6 mg/kg, but only **7/29 (24.1%) were confirmed** at that cutoff; the 44.8% headline includes pending/unconfirmed responses. This is encouraging early, uncontrolled evidence, not an established response probability for this patient. [Primary disclosure](https://ir.arrivent.com/news-releases/news-release-details/arrivent-announces-initial-phase-1-data-cdh17-targeted-adc-arr).

The 24 October randomized phase-I Temab-A/bevacizumab publication enrolled 83 treated patients: 63 across two Temab-A doses and 20 on trifluridine-tipiracil/bevacizumab. Responses were 19% and 30% versus 0%, with median PFS 5.6/6.8 versus 4.2 months. Small exploratory groups limit certainty; the trial did not select by MET expression. This strengthens a clinical-trial discussion despite MET non-detection here. [Primary publication](https://pubmed.ncbi.nlm.nih.gov/42926107/).

**The broader database search did not reveal a new approved match.** The inclusive set contains 760 proteins annotated by SURFY and/or CSPA and 612 genes with at least one Open Targets drug-candidate record, producing 3,940 target–drug rows. These are screening leads, not 612 actionable targets. Records include supportive-care drugs, broad polypharmacology, abandoned agents, binding partners and ADC payload targets. In particular, tubulin or TOP1 matching an ADC does not identify its tumour-surface antigen. [Full screen](analysis/surface_and_drug_target_screen.tsv) · [database edges](analysis/drug_target_database_matches.tsv).

GPA33 (9 sequences), GUCY2C (2) and EphA2 (4) retain possible research relevance, but the measurements do not upgrade their clinical evidence. CD73/NT5E is detected (13 sequences), which does not establish adenosine-mediated resistance. Integrins/endoglin and many kinase/repair proteins also appear in the screen without a validated CRC expression-selected indication.

**What this does not justify:** HER2 therapy from ordinary ERBB2 detection despite IHC0; off-label Trodelvy from a TROP2 hypothesis; PARP inhibitors from PARP1 abundance or an unproven HRD variant; venetoclax from BCL2 detection; PTPN inhibition from total enzyme quantity; or abandoning an otherwise relevant drug because its target was not measured. Current approved molecular pathways remain governed by their actual biomarker requirements. The 2026 TROPHIT1 final abstract reported only 5% confirmed response despite TROP2 staining in 18/20 evaluable samples, reinforcing the distinction between presence and efficacy. [Primary abstract](https://www.annalsofoncology.org/article/S0923-7534%2826%2900312-1/fulltext).

Trial records were checked on **29 October 2026**; recruiting status does not guarantee a slot, CRC cohort acceptance, personal eligibility, UK access or funding. Full primary-source details and specific prior-treatment restrictions appear below.
'''))
section('immune','FAP radiation within the proposed immune strategy',md('''
The proteome supplies a coherent hypothesis: a FAP/LRRC15-rich compartment might be addressed with stromal radiation, while immune activation and vaccination supply or amplify effectors. It does **not** establish that this compartment causes resistance, that current nodes share the phenotype, or that combining all components improves outcome.

The most concrete FAP routes are **Lu-177 NNS309 (NCT06562192), Lu-177 OncoFAP-23 ± L19-IL2/“TheraTri” (NCT06640413), and LY4337713/FiREBOLT (NCT07213791)**. Each has its own imaging and eligibility requirements. TheraTri is particularly relevant as a protocol exploring radioligand plus an immunocytokine, but it uses **IL-2**, not IL-12/15; L19 targets ED-B fibronectin. CRC acceptance, combination activation and slots require site confirmation. Diagnostic uptake alone may not predict therapeutic retention or absorbed dose. [FAP imaging guideline](https://pmc.ncbi.nlm.nih.gov/articles/PMC11705787/) · [TheraTri](https://clinicaltrials.gov/study/NCT06640413) · [NNS309](https://clinicaltrials.gov/study/NCT06562192) · [FiREBOLT](https://clinicaltrials.gov/study/NCT07213791).

FAP radioligand/checkpoint synergy has preclinical CRC support; the cited human component was small and did not test the full checkpoint combination. Radiation can also reduce lymphocyte populations, so immune benefit cannot be assumed. [Primary FAP study](https://www.nature.com/articles/s41392-024-01853-w).

The closest human caution is **QuICC**: CEA/MUC1 vaccine + IL-15 agonist + PD-L1/TGF-β blockade produced 0/12 responses; adding targeted IL-12 produced 1/20. Participants were checkpoint-naive, and the vaccine was not personalized. This does not establish the proposed strategy after BOT/BAL, nor does one responder identify a predictive nodal phenotype. [Primary QuICC report](https://pubmed.ncbi.nlm.nih.gov/41520164/).

**AC484/PTPN1–PTPN2 inhibition remains a research addition.** Its mechanism and newer CRC models support testing IFN responsiveness, CXCL9/10/11 induction and T/NK-cell effects; no abundance cutoff or proven human MSS-CRC benefit is established. Current human response evidence is from other tumour settings. Expanded-access listings do not guarantee supply. The combined inflammatory effects of checkpoint blockade, cytokines and PTPN inhibition are not resolved by proteomics. A clinically supervised protocol is needed for combination selection and sequencing. [Mechanism study](https://www.nature.com/articles/s41586-023-06575-7) · [2026 CRC preclinical study](https://pmc.ncbi.nlm.nih.gov/articles/PMC13223943/) · [AC484 trial](https://clinicaltrials.gov/study/NCT04777994).

A useful research test would assess native autologous tumour recognition/killing as well as IFN signalling and surface HLA/B2M. Increased pSTAT1, target-protein presence or predicted neoantigens alone are insufficient. Conventional TCR/vaccine strategies still require the relevant antigen–HLA complex; NK-mediated mechanisms are distinct and do not restore a missing specific complex.

**CD73 provides a secondary adenosine-pathway hypothesis.** Direct oleclumab CRC results have been weak. The positive randomized ARC-9 Cohort B instead tested the A2A/A2B antagonist **etrumadenant**, not a CD73 inhibitor, together with checkpoint therapy, FOLFOX and bevacizumab. It cannot isolate the adenosine drug's contribution or validate NT5E abundance, and prior checkpoint treatment was excluded. This is relevant biology, but it does not make CD73 IHC a validated selector for this patient. [Primary ARC-9 report](https://pmc.ncbi.nlm.nih.gov/articles/PMC13320197/).
'''))
section('validation','Highest-value validation with limited HCA nodal tissue',md('''
Preserve the small block by choosing tests around a realistic treatment route. Confirm retained FFPE tissue, viable carcinoma and available sections with HCA pathology; the earlier banking record does not establish whether a separate diagnostic block remains. No new tissue availability is assumed here.

1. **Pathologist review of a current H&E section**: viable tumour area, necrosis and suitability for membrane scoring. Keep enough material for a sponsor's required assay or molecular test.
2. **CDH17 membrane IHC** if a CDH17 trial is realistic; record intensity, positive malignant-cell percentage and heterogeneity. Add **PTK7** if an accepting trial is available. Use the sponsor assay where mandated.
3. **FAP with stromal versus malignant-cell localization**, optionally LRRC15 on a multiplex or adjacent section when it changes a feasible trial decision. For a radioligand route, current ligand-specific PET is more decisive than spending many sections on archival IHC.
4. **HLA-ABC and B2M on tumour membranes**, with an epithelial tumour mask and spatial CD8 interpretation, if vaccination/TCR/immune rescue is the active question. Normal nodal lymphocytes are internal controls, not evidence of tumour-cell HLA retention or intratumoural CD8 infiltration.
5. **ROR1, B7-H3 and other exploratory stains only after access screening**. ROR1 has a large exploratory reference-rank shift but much less CRC clinical evidence. For a dual PTK7×B7-H3 construct, establish same-cell membrane coexpression rather than relying on two bulk signals.

Retest CEA/MET or HER2 when required by a feasible protocol or contemporary clinical question; the proteomics alone does not mandate exhausting tissue on all of them. PTPN1/PTPN2 IHC is lower priority because no validated predictive cutoff exists. If anti-EGFR continuation/rechallenge is at issue, current RAS/BRAF/EGFR resistance assessment is more informative than the EGFR protein rank. Molecular HLA/antigen retention and functional recognition are separate from pan-HLA IHC.

For a true deeper proteomics reanalysis, obtain **run-422 raw spectra**, the exact specimen/run key including run 423 and `_43`, DIA-NN version and command/configuration, full long report with run/global precursor and protein q-values, library/FASTA provenance, extraction/microdissection details, and matched H&E/tumour cellularity. A batch-matched bridge/reference and genuine biological comparator would be needed for more defensible quantitative overexpression claims. These are the remaining evidence gaps, not reasons to discard the processed-data findings.
'''))
# A searchable quantitative table with explicit reference detection denominators.
cols=['n_unique_sequences','signal_percentile_all_detected','Astral_CRC_rank_shift_points','Astral_CRC_measured_samples_all','Komor_CRC_measured_samples_all','Komor_normal_measured_samples_all','HPA_colon_one_donor_measured_samples_all']
display=t[cols].reset_index();display.columns=['Protein','Unique sequences','Signal rank %','Astral shift, points','Astral /27','Komor CRC /30 runs','Komor normal /19 runs','HPA /3, one donor']
section('explorer','Search the quantified target panel','<label for="target-search">Filter by protein</label><input id="target-search" type="search" placeholder="e.g. FAP, PTK7, PTPN2" autocomplete="off"><p id="row-count"></p><div id="target-table">'+table(display)+'</div>'+md('''
“—” means no eligible measurement/comparison. Reference detection counts are independent of the rank filter. Zero detections do not prove biological absence. The [complete target table](analysis/therapeutic_targets.tsv) includes full protein groups, native signals, peptide support, coverage, reference eligibility/reasons and Top3 summaries; the [all-protein table](analysis/protein_groups.tsv) includes every delivered group.
'''))
evidence=(A/'therapeutic_evidence_update.md').read_text()
evidence=evidence.split('## Priorities pending the quantitative results')[0]
# Keep the specialist evidence memo as an appendix, explicitly preceding numeric integration.
section('clinical-evidence','Clinical evidence and access appendix','<details><summary>Open the detailed primary-source therapeutic review</summary><p>This companion evidence memo was prepared before the quantitative integration above; conditional wording about measurements should be read in that context.</p>'+md(evidence)+'</details>')
extra=''
for name,title in [('ror1_therapeutic_evidence.md','ROR1 evidence and trial status'),('cd73_additional_targets.md','CD73 and other surface targets')]:
 if (A/name).exists():extra+=f'<details><summary>{title}</summary>'+md((A/name).read_text())+'</details>'
if extra:section('additional-evidence','Additional research leads',extra)
section('files','Downloadable results and reproducibility',md('''
- [Website source package](/downloads/source.zip) — includes this report, scripts, tables, figures, processed patient inputs, the search FASTA and source/audit manifests. The 13 frozen third-party reference inputs are separate gzip downloads with compressed and decoded hashes in the manifest; the input checker can fetch and verify them for full computational reproduction. Instrument raw spectra are unavailable. Four large direct downloads use gzip; their uncompressed originals remain in the source package, while the curated-data ZIP contains gzip copies. Decompress those copies before analysis, or use the source package. Direct file downloads are linked below.
- [All protein groups](analysis/protein_groups.tsv) · [target table](analysis/therapeutic_targets.tsv) · [unique peptide sequences](analysis/unique_peptide_sequences.tsv).
- [Native protein-group matrix](raw/vendor_delivery/Match_result-X202SC26085414_F01_F001_B1_43/report.pg_matrix.tsv) · [native precursor matrix (gzip)](raw/vendor_delivery/Match_result-X202SC26085414_F01_F001_B1_43/report.pr_matrix.tsv.gz) · [search FASTA (gzip)](raw/vendor_delivery/Match_result-X202SC26085414_F01_F001_B1_43/homo_sapiens_uniprot_2025_06_11_Swissprot.fasta.txt.gz).
- [Cross-reference ranks](analysis/reference_rank_comparisons.tsv) · [reference sample QC](analysis/reference_sample_qc.tsv) · [anchor sensitivity](analysis/anchor_and_contaminant_sensitivity.tsv) · [compartment-ratio sensitivity](analysis/marker_ratio_sensitivity.tsv).
- [Public paired CPTAC context](analysis/cptac_within_cohort_context.tsv) · [public iBAQ context (gzip)](analysis/public_ibaq_context.tsv.gz) · [normal-tissue IHC](analysis/target_normal_tissue_IHC.tsv).
- [Prior RNA integration (gzip)](analysis/proteins_with_prior_RNA.tsv.gz) · [surface/drug screen](analysis/surface_and_drug_target_screen.tsv) · [drug-target matches](analysis/drug_target_database_matches.tsv).
- [Main analysis script](scripts/analyze.py) · [sensitivity/screening script](scripts/supplement.py) · [report builder](scripts/build_report.py) · [reproduction instructions](README.txt).
- [Download manifest](download_manifest.json) · [quality summary](analysis/qc_summary.json) · [control identity verification](analysis/control_provenance_check.json) · [independent audit](analysis/independent_analysis_audit.md) · [original analysis validation](analysis/final_validation.json) · [public release checks](analysis/public_validation.json).

This is a descriptive reanalysis of delivered processed data with independently checked references and current clinical evidence, dated **29 October 2026**. The limitations that materially affect interpretation—one archival patient specimen, unknown run 423, an external one-donor AO comparator, missing raw confidence data, heterogeneous tissue and cross-platform quantities—are carried through every therapeutic conclusion. This public release preserves the completed local analysis, with publication paths and external scientific figures. No clinical outreach was performed.
'''))
nav=''.join(f'<a href="#{i}">{label}</a>' for i,label in [('conclusions','Conclusions'),('specimen','Identity & controls'),('data','QC'),('references','References'),('targets','Quantification'),('therapies','Therapeutics'),('immune','Immune strategy'),('validation','Next tests'),('explorer','Target search'),('files','Files')])
style='''*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#f4f6f8;color:#22333c;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;line-height:1.65}header{background:#153f4a;color:white;padding:44px max(24px,calc((100vw - 1120px)/2))}header h1{font-size:clamp(28px,4vw,42px);line-height:1.15;max-width:900px;margin:10px 0 18px}header p{max-width:850px;color:#d9e7e9}header .eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:700}nav{background:white;border-bottom:1px solid #dce3e6;display:flex;gap:18px;padding:15px 24px;flex-wrap:wrap;justify-content:center}nav a{font-size:13px;text-decoration:none;font-weight:650}main{max-width:1180px;margin:24px auto;padding:0 20px 60px}section{background:#fff;border:1px solid #dce3e6;border-radius:10px;margin:20px 0;padding:30px 36px;scroll-margin-top:20px}h2{color:#174b59;font-size:27px;line-height:1.25;margin:0 0 22px}h3{color:#174b59;margin-top:28px;font-size:20px}p{margin:0 0 16px}li{margin-bottom:10px}a{color:#165c82;text-underline-offset:3px;overflow-wrap:anywhere}strong{font-weight:700}.table-wrap{overflow-x:auto;margin:20px 0 24px;border:1px solid #dce3e6;border-radius:5px}table{border-collapse:collapse;width:100%;font-size:13px;line-height:1.45}th{text-align:left!important;background:#eaf1f3;color:#244c57;padding:12px;vertical-align:bottom;min-width:90px}td{padding:11px 12px;border-top:1px solid #e4e9ec;vertical-align:top}tbody tr:nth-child(even){background:#f8fafb}figure{margin:28px 0}figure img{display:block;width:100%;height:auto;max-height:800px;object-fit:contain}figcaption{font-size:13px;color:#576a73;margin:12px 0}details{border:1px solid #d5e1e5;border-radius:6px;margin:16px 0;padding:16px}summary{cursor:pointer;color:#165c82;font-weight:700}details[open] summary{margin-bottom:20px}input{display:block;margin:8px 0 12px;width:min(100%,420px);padding:12px 14px;border:1px solid #9fb7bf;border-radius:6px;font:inherit}label{font-weight:650}#row-count{color:#61747d;font-size:13px}code{font-size:.86em;background:#eef2f4;padding:2px 5px;overflow-wrap:anywhere}footer{text-align:center;padding:24px;color:#657880;font-size:13px}@media(max-width:650px){section{padding:22px 18px}main{padding:0 8px}nav{justify-content:flex-start;gap:10px 16px}header{padding:30px 22px}h2{font-size:23px}table{font-size:12px}}@media print{body{background:white;font-size:11pt}nav,input,label,#row-count{display:none}header{background:white;color:#153f4a;padding:10px}header p{color:#333}section{border:0;padding:15px 0;break-before:auto}main{max-width:none}figure{break-inside:avoid}a{color:inherit}details{display:block}.table-wrap{overflow:visible}th,td{padding:6px}}'''
script='''const search=document.getElementById('target-search');const rows=[...document.querySelectorAll('#target-table tbody tr')];function filter(){let n=0;for(const row of rows){const ok=row.cells[0].textContent.toLowerCase().includes(search.value.toLowerCase().trim());row.hidden=!ok;if(ok)n++;}document.getElementById('row-count').textContent=n+' of '+rows.length+' targets shown';}search.addEventListener('input',filter);filter();'''
doc=f'<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>B7_43 proteomics — quantitative reanalysis</title><style>{style}</style></head><body><header><div class="eyebrow">Independent quantitative review · 29 October 2026</div><h1>B7_43 proteomics: what is measurable, what is promising, and what needs confirmation</h1><p>Processed-data reanalysis with peptide checks, separate public CRC/normal references, tissue-composition sensitivity and current therapeutic evidence.</p></header><nav aria-label="Report navigation">{nav}</nav><main>'+''.join(blocks)+f'</main><footer>Public research report • B7_43 • 29 October 2026</footer><script>{script}</script></body></html>'
doc=re.sub(r'href="((?:analysis/|scripts/|reference/|raw/)[^"]+|README\.txt|download_manifest\.json|B7_43_public_analysis\.zip)"', lambda m: 'href="../../../data/proteomics/b7_43_2026-10-29/'+m.group(1)+'"', doc)
(REPORT_DIR/'index.html').write_text(doc)
print('Wrote report:',len(doc),'characters; target rows:',len(t))
