Simulation code for stochastic cell proliferation. This code for simulation of cell proliferation is designed to be run in R ##simulation for proliferative cell population. ##Initial cell number is 2000, simulation period is 60 days. ##Please enter parameters in fun09. ##Simulated cell number will be exported as matrix. zz<<-0 fun06 <- function(r1,r3) { temp <- runif(1) if (temp > r1 ) { p <<- p +1} else if (temp m) { zz <- zz +0 } else { fun06(r1,r3)} } } fun10 <- function(Loss) { countd <-d if (countd <1) { zz<<-0 } else for (i in 1:countd) { if (runif(1) > Loss) { zz <<- zz+ 1} else { d<<- d-1} } } fun08 <- function(y,m,r1,r3,Loss){ for (h in 2:60){ fun07(m,r1,r3) fun10(Loss) A[y,h] <<- p B[y,h] <<- d } } fun09 <- function(m,r,s,Loss) { A <<- matrix(0, 2000,60) B <<- matrix(0, 2000,60) A[,1] <<- 1 r1<<- 1-r*(s+1) r3<<- r*(1-s) for (vb in 1:2000){ p<<- 1 d<<- 0 fun08(vb,m,r1,r3,Loss) } return(A+B)} ———— ##simulation for non-proliferative cell population. ##Initial cell number is 3000, simulation period is 60 days. ##Please enter parameters in fun29. ##Simulated cell number will be exported as matrix. fun20 <- function(Loss) { countd <-d if (countd <1) { zz<<-0 } else for (i in 1:countd) { if (runif(1) > Loss) { zz <<- zz+ 1} else { d<<- d-1} } } fun28 <- function(y,Loss){ for (h in 2:60){ fun20(Loss) E[y,h] <<- d } } fun29 <- function(Loss) { E <<- matrix(0, 3000,60) E[,1] <<- 1 for (vb in 1:3000){ d<<- 1 fun28(vb,Loss) } return(E)}