Overview
Main components
The MSM is structured as follows:
src/msm_model.py: core implementation of the model equations, data-loading utilities, and helper routines used across simulations and analyses.notebooks/msm_notebook.ipynb: primary user workflow to select datasets, assemble region dictionaries, run simulations, and evaluate outputs step by step.data/: input datasets organized by region, including layered adjacency matrices, cell geometry tables, and region-level metadata.figures/: output directory for generated plots, such as single-simulation summaries and SOP spacing analyses.
Mathematical model
The MSM extends lateral inhibition dynamics to a layered 3D epithelial topology. For each cell \(i\), with \(1 \leq i \leq N\), the model follows:
where \(n_i\) and \(d_i\) are Notch and Delta levels, and \(\nu\) is the Delta/Notch timescale ratio. Activation and repression are represented with Hill functions:
Here, \(k\) and \(h\) are Hill coefficients, and \(K_a\), \(K_r\) are activation/repression thresholds.
The effective Delta input integrates contacts over signalling layers:
where \(k=0\) corresponds to the apical layer, \(\ell_{ij,k}\) is shared interface length, \(P_{j,k}\) is perimeter normalization, and \(\omega_k\) is the depth-dependent layer weight. The number of active layers is set by \(n = L / \Delta L\), where \(L\) is tissue depth and \(\Delta L\) is layer thickness.
Layer weights are obtained by integrating a fitted depth profile \(\omega(z)\) over each layer bin:
Straightening model
To quantify how apico-basal tortuosity alters non-apical contacts, we also include a straightening model parameterised by \(\alpha \in [0,1]\) that interpolates between measured 3D contacts and apical topology.
For each layer \(k\), the adjacency is binarized:
Cell displacement from the apical plane is defined as:
Two discrepancy sets are then computed relative to apical contacts:
with edge severity score:
and quantile thresholds:
The straightened adjacency \(\widetilde{A}_{ij}^{(k)}(\alpha)\) is:
So \(\alpha=0\) leaves measured layers unchanged, while \(\alpha=1\) maximally restores apical-like connectivity by pruning extraneous deep contacts and reintroducing apical-missing ones.