Complete Supplemental Information for the Hybrid ABM of CRC under RT influence
Abstract
CRC Hybrid ABM — Simulation Code Paper: Spatial geometry of the hypoxic niche predicts radiotherapy failure in colorectal cancer: a spatially explicit agent-based model **Submitted to:** Computers in Biology and Medicine (2026) --- ## What this code does This repository contains the agent-based model (ABM) described in the paper. The model simulates colorectal cancer tumour response to fractionated short-course radiotherapy (5×5 Gy) with concurrent immune feedback on a 50×50 spatial lattice. Cellular fate — proliferation, metabolic dormancy, or necrosis — is governed by local oxygen tension and ATP availability computed via Michaelis-Menten kinetics. --- ## Files - `crc_abm_final_v3.py` — standalone Python script, runs all simulations and generates all figures- `crc_abm_final_v3.ipynb` — Google Colab notebook version of the same code, recommended for running without local setup- `README.md` — this file --- ## How to run ### Option 1 — Google Colab (recommended) Upload `crc_abm_final_v3.ipynb` to Google Colab2. In the first cell, run: pip install statsmodels --quiet 3. Run all cells top to bottom 4. Runtime: approximately 25–35 minutes for full n=50 ensembles ### Option 2 — Local Python 1. Install dependencies: pip install numpy scipy pandas matplotlib scikit-learn statsmodels 2. Run: python crc_abm_final_v3.py --- ## Outputs Running the code produces the following files in the current directory: - `fig1_spatial_snapshots.png` — spatial tumour evolution across RT course - `fig2_trajectories_annotated.png` — single-cell mechanistic trajectories - `fig3_population_dynamics.png` — tumour dynamics, single run and ensemble - `fig4_subpopulations.png` — subpopulation composition and dormancy - `fig5_protocol_comparison.png` — three equal total-dose protocol comparison - `fig6_cell_kill_fractions.png` — fractionated cell kill across protocols - `fig7_spatial_clustering.png` — spatial geometry and immune clearance - `fig8_spatial_fields.png` — pre-treatment spatial microenvironment - `fig9_gsa_validation.png` — global sensitivity analysis and validation - `fig_convergence.png` — ensemble convergence analysis (supplementary) - `metrics.csv` — all key numerical outputs Note: Figure 10 (TCGA Buffa hypoxia analysis) was generated separately in R and is not produced by this code. --- ## Dependencies Tested with: - Python 3.10+ - numpy >= 1.23 - scipy >= 1.9 - pandas >= 1.5 - matplotlib >= 3.6 - scikit-learn >= 1.1 - statsmodels >= 0.13 --- ## TCGA Analysis The transcriptomic validation (Figure 10) was performed in R using the GSVA package for ssGSEA scoring of the Buffa 15-gene hypoxia signature across TCGA-COAD and TCGA-READ. TCGA data are publicly available at portal.gdc.cancer.gov. The R script for this analysis is available from the corresponding author on reasonable request. --- ## Licence MIT Licence. You are free to use, modify, and distribute this code with attribution. --- ## Contact dharmasastha.v.biomed@gmail.com
Fields of Study & Subjects
Mathematical Biology Tumor Growth
Cancer Cells and Metastasis
Cancer
Hypoxia
and Metabolism
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 15 February 2026
- Language
- EN