Code to run the model and generate the results for the manuscript "A mathematical model of epithelial apico-basal polarisation, and application to the endometrial cell polarity cycle".
Requires Python 3.11 or later.
- scipy (v1.15.2)
- matplotlib (v3.10.0)
- numpy (v2.2.3)
-
Clone the repository:
git clone https://github.com/selareid/polarity_models_python.git cd polarity_models_python -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # on Windows: .venv\Scripts\activate
-
Install the package (and its dependencies):
pip install -e .
Model modules are contained in src/polarity/models/.
The code to run the models and generate the results are contained in scripts/.
The module src/polarity/figure_helper.py provides useful methods and definitions for the figure generation.
Results in paper are generated by the following scripts (in scripts/)
run_parameter_sweep.py: parameter sweeps associated with establishment and sensitivity to lossrun_downregulation_AP.py: parameter sweeps associated with polarity loss (calls methods inrun_parameter_sweep.pyso must be run from withinscriptsdirectory)par3add_parameter_search.py: runs the iterative parameter search The scriptscripts/run_example.pyoutlines the general way to run the model and change the parameters.
The figures for the manuscript are generated using the following notebooks:
fig3,5-establishment_example.ipynbfig4,7-nullclines.ipynbfig6-parameter_sweep_plots.ipynbfig7-polarity_loss_plots.ipynb