caf-mac-boundary: analysis code for "Recurrent CAF–Macrophage Neighbourhood Enrichment at the Tumour Boundary"
Authors/Creators
Description
Analysis code for the manuscript. Covers, in run order: (1) Visium HD binning, quality control and RCTD deconvolution against a Flex single-cell reference; (2) purity-stratified concordance and mismatch classification; (3) within-bin weight reassignment and lattice (intact-profile) permutation nulls; (4) tumour–normal compositional comparison with tile-block bootstrap; (5) ESCC single-cell compartment and subtype assignment, module scoring, patient-level paired tests and slingshot trajectories; (6) bulk projection and multivariable Cox modelling; (7) figure generation. Scripts are numbered in run order and the README maps each script to the figure or table it produces. Tested with R 4.6.1 (spacexr 2.2.1, Seurat 5.6.0, slingshot, fgsea, dorothea 1.23.0, msigdbr 2026.1) and Python 3.13. Input data are public (GSE280311, GSE203067, GSE53625) and are not redistributed here; derived tables T1–T10 are included.