The trade-off between parsimony and model complexity for understanding biomedical mechanisms from mathematical models
Code accompanying the manuscript "The trade-off between parsimony and model complexity for understanding biomedical mechanisms from mathematical models", including the mathematical models of tumour growth, immune response, cisplatin PK/PD, and ICB treatment in MP and MPB1 ovarian tumour models.
The workflow includes:
- Exponential, logistic, and Gompertz tumour-growth models.
- Logistic tumour-growth models with vehicle, cisplatin, ICB, and combined cisplatin + ICB treatments.
- Cisplatin PK/PD models with bolus dosing.
- Tumour-immune models for NK-cell and CD8+ T-cell dynamics, including time-shifted and cisplatin-treatment models.
- AICc/BIC model selection.
- Profile-likelihood analysis and 95% confidence intervals.
- Plot generation for the main and supplementary figures.
Authors: Patricia Lamirande, Mia Brunetti, Terry Easlick, Fatemeh Beigmohammadi, Morgan Craig
Affiliations: Department of Mathematics and Statistics, Université de Montréal, and CHU Sainte-Justine Azrieli Research Centre, Montréal, Canada
| Folder | Contents |
|---|---|
Data/ |
CSV files containing tumour-volume and immune-cell data. |
Fitted_params_results/ |
Fitted parameter tables used by downstream analyses and plotting scripts. |
Fitting_scripts/ |
Julia scripts for fitting the tumour-growth, PK/PD, and tumour-immune models. |
Model_selection/ |
Notebook and CSV results for AICc/BIC model comparisons. |
Profile_likelihood/ |
Profile-likelihood setup, commands, confidence intervals, and generated profile plots. |
Result_visualization/ |
Plotting functions and commands for generating figures. |
src/ |
Shared model definitions, data loaders, predictions, assumptions, fixed parameters, and result utilities. |
- Julia 1.9 or later is recommended.
- A Julia environment with the packages used by the scripts. The repository currently does not include a
Project.toml, so install the required packages in the active Julia environment:
using Pkg
Pkg.add([
"CSV",
"DataFrames",
"DifferentialEquations",
"Distributions",
"JLD2",
"LsqFit",
"PlotlyJS",
"StatsBase"
])The model-selection notebook requires the Jupyter Julia extension for Visual Studio Code.
Run commands from the folder containing the script unless otherwise stated. This matches the relative include paths used by the current Julia files.
The fitting scripts can be run individually:
cd Fitting_scripts
julia fitting_tumour_growth_only.jl
julia fitting_tumour_growth_cis.jl
julia fitting_tumour_normalised_timeshift.jl
julia fitting_tumour_normalised_immune.jl
julia fitting_tumour_normalised_immune_icb.jl
julia fitting_tumour_normalised_immune_cis_fixed_k2.jlThese scripts read the CSV files from Data/ and write fitted parameter tables to Fitted_params_results/. Run only the fitting scripts needed for the analysis; existing parameter tables can also be used directly by the downstream scripts.
Open and run Model_selection/model_selection.ipynb in a Julia-enabled notebook environment. The resulting model-comparison tables are stored in Model_selection/model_selection_results/.
cd Profile_likelihood
julia Commands_ProfileLikelihood.jlThis generates 95% confidence-interval tables in Profile_likelihood/Confidence Intervals/ and profile-likelihood plots in Profile_likelihood/Profile Likelihood/.
cd Result_visualization
julia Commands_Figures.jlThe script reads the data and fitted parameter tables, runs the prediction functions, and saves the generated figures in Result_visualization/Figures/.
SVG figures are intentionally not included in the repository to reduce its size. The following folders are retained for generated output:
Result_visualization/Figures/: figures generated byResult_visualization/Commands_Figures.jl.Profile_likelihood/Profile Likelihood/: profile-likelihood plots generated byProfile_likelihood/Commands_ProfileLikelihood.jl.
After running the corresponding scripts, the SVG files will appear in these folders.
- Run scripts from their own directories so that the existing relative imports resolve correctly.
- Check that the required fitted-parameter CSV files are present before running visualization or profile-likelihood scripts.
- The scripts use repository-relative paths for input data and fitted results; avoid moving the folder structure unless the include and data paths are updated.
- Generated SVGs and other large derived files can remain local and need not be committed.
If you use this code or data, please cite the associated publication.