SHAPPEing agent-based models to spatial data: Sequential Hooke’s law Algorithm for Point Pattern reconstruction with Environmental constraints
Authors: Blanche Mongeon and Morgan Craig
Corresponding author: blanche.mongeon@umontreal.ca
The folder IMC_TMEReconstructions contains:
- the 87 original IMC samples,
- their corresponding 10 same-size ECSR reconstructions (or CSR reconstructions for homogeneous samples),
- their corresponding 10 same-size SHAPPE reconstructions,
- their corresponding 10 simplified SHAPPE reconstructions (i.e., without additional repulsion/attraction from exclusion/inclusion zones),
- their corresponding 10 increased size SHAPPE reconstructions, and
- results discussed in the article.
More specifically:
- File
SOCPatientsInfo.csvcontains relevant information for the 87 IMC samples (e.g., IMC size, number of cells of each cell type, etc.) - File
inhomogeneityFinalResults_50.matcontains the inhomogeneity identification results for the 87 samples. The first row refers to the first step (with the empty space function null enveloppe). The second row refers to the second step, where we apply the minimal area threshold. - File
inhomogeneity_replicates.matcontains the inhomogeneity status (1 if inhomogeneous, 0 if not) of the 87 samples (1st column) and of their 10 same-size SHAPPE reconstructions (columns 2 to 11). - Files
RipleyLBs_markBootstrap.matandRipleyUBs_markBootstrap.matcontain respectively the lower and upper bounds of 95% confidence interval bounds of Ripley's H functions. First dimension is the sample, second and third are the cell types used in the evaluation of the function, and last is the distance (20, 40 and 60um). - Files
insideBoundsRandom.mat,insideBoundsSHAPPE.matandinsideBoundsimplifiedSHAPPE.matcontain the fraction of the 10 same-size ECSR/CSR, SHAPPE and simplified SHAPPE that fall within the 95% confidence interval bounds of Ripley's H function at distances 20 (column 1), 40 (column 2) and 60um (column 3) for each IMC sample (indicated by the row). - File
hyperparametersResultTable_multipleScores_final.csvcontains the average normalised absolute clustering errors at distance 20, 40 and 60um for each hyperparameter combination. - File
hyperparametersResultTable_combinedScores_final.csvcontains the mean of the average normalised absolute clustering errors at distance 20, 40 and 60um for each hyperparameter combination. - File
hyperparameterImportance.csvcontains the normalised importance for each hyperparameters, with regards with the average normalised absolute clustering errors at distance 20, 40 and 60um, and their mean), as obtained with Optuna. - Files
SHAPPE_HyperparameterOptimisation_SameSize.mat,SHAPPE_HyperparameterOptimisation_Simplified.matandSHAPPE_HyperparameterOptimisation_DomainIncrease.mat, and more specifically theirresultsOptimisedfields, contain the performance metrics (rows) for each of the 87 samples (columns). Metrics are in the order:
- Excess out of the 95 C.I. of H(20um),
- Excess out of the 95 C.I. of H(40um),
- Excess out of the 95 C.I. of H(60um),
- Raw difference with H(20um),
- Raw difference with H(40um),
- Raw difference with H(60um),
- eDD,
- eNN,
- eSigma,
- ePi.
Fields
resultsCSRandresultsECSRin the fileSHAPPE_HyperparameterOptimisation_SameSize.matcontain the same metrics for the CSR and ECSR reconstructions, respectively.
The file IMC_Results.m allows any user to recreate the figures in the original article.
The code to generate the reconstructions is found in the main folder:
SHAPPE_commands.mcan be used to regenerate the SHAPPE reconstructions.SHAPPE_commands_IMC_DomainEnlargement.mcontains the code to generate the larger domain reconstructions, andSHAPPEPerformanceEvaluation_EnlargedDomains.mcontains the code to evaluate them.
File SHAPPEResults.pdf contains all the same-size SHAPPE reconstructions (with and without additional environmental constraints) and their corresponding metrics.
The ABM and IMC samples share the same cell types, but not the same cell type codes. Hence, the file generateABMInitialConditions.m map the larger domain
reconstructions with IMC cell types code to aBM cell type codes using the mapIMC_to_ABM.m function. It also samples additional repulsion regions in an area
equal to twice the larger domain area, to account for domain increase during the ABM simulations.
The folder PhysiCell_SHAPPE contains the requirements, the code and the scripts for the ABM simulations.
Subfolder scripts contains the scripts used on Digital Research Alliance of Canada servers.
SHAPPE can be used via the file SHAPPE_commands.m. A user-guide is currently under preparation to facilitate its use and possible reimplementations.
https://doi.org/10.64898/2026.10.14.759208
The archived version of this repository is available on Zenodo:
Blanche Mongeon. (2026). Craig-Lab/SHAPPE: SHAPPEing agent-based models to spatial data: Sequential Hooke's law Algorithm for Point Pattern reconstruction with Environmental constraints (Version v1.0.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23954132
Any additional information and/or data requests can be sent to blanche.mongeon@umontreal.ca .