Packages needed: Graphs, Parameters, Random, Distributions, GLMakie, StaticArrays, Statistics, JLD

Run crypt_main.jl in a Julia IDE (such as Atom with Juno: https://techytok.com/atom-and-juno-setup-for-julia/). Note this may take a while, as Julia compiles functions only when used. Subsequent runs of the same functions are much faster.

Then you can run the following functions for the various simulations in paper:

fiveFUsim(tmax;dose,doseschedule)
fiveFUvideo(tmax;dose,doseschedule)
fiveFUki67(dose,doseschedule)
ablationsim(tmax;celltype,duration,doseschedule)
ablationvideo(tmax;celltype,duration,doseschedule)
cdkinhibsim(tmax;duration,doseschedule)
cdkinhibvideo(tmax;duration,doseschedule)
brdusim()

After semi-colon they are not required, will use default values*, and to use them must type the name:

e.g.

ablationsim(15,celltype=paneth) will run for 15 days and ablate Paneth cells at the default doseschedule and duration.

fiveFUsim(10,doseschedule=[3, 7]) runs the fiveFU sim for 10 days, administering 5FU at day 3 and 7.

* DEFAULTS:

dose = 50
doseschedule = [1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5], NOTE: must be a vector, so [x,y,z,...] for times x,y,z,...
celltype = stem
duration = 12/24, (given in fractions of a day)

OTHER FUNCTIONS:

plot3d() will plot a 3D visualisation of the crypt.

countsplot() will plot cellcounts in Crypt and Villus.

ki67plot() plots ki67 at timepoints for comparison to data.

brduplot() plots brdu at timepoints for comparison to data.

ki67avgplot() plots average ki67 profile for entire run.

detailsplot() plots cellular composition at each position.

FUplot() plots 5FU variables.

** Please note that Ki67 and BrdU figures in the paper involve averages of multiple runs, and individual runs will exhibit variance around expected behaviour **