STEM Cells Gillespie¶
Overview:
STEM Cell Cycle Gillespie Algorithm with Fixed Environment¶
- class cmmlinflam.StemGillespie[source]¶
StemGillespie Class: Base class for the forward simulation of the evolution of a population of STEM cells.
Three types of cells are considered - those which present mutations that give selectional advantage irrespective of environmental conditions (A), those which present mutations that give selectional advantage dependent on environmental conditions (B) and the wild type cells (WT).
Cells decay at the same rate independent of their type and devide with rates which illsutate their selectional advantage. A wild type cell (WT) can mutate to a cell of type A, respectively a cell of type B with constant given rates of mutation.
The system of equations that describe the isolated possible events that can occur
\begin{eqnarray} WT &\xrightarrow{m} \emptyset \\ A &\xrightarrow{m} \emptyset \\ B &\xrightarrow{m} \emptyset \\ \emptyset &\xrightarrow{\alpha_{WT}} WT \\ \emptyset &\xrightarrow{\alpha_{A}} A \\ \emptyset &\xrightarrow{\alpha_{B}} B \\ WT &\xrightarrow{\mu_{A}} A \\ WT &\xrightarrow{\mu_{B}} B \end{eqnarray}where m is the rate of decay, \(\alpha_{WT}\), \(\alpha_{A}\), and \(\alpha_{B}\) are the growth rates for the WT, A and B cell type respectively and \(\mu_{A}\) and \(\mu_{B}\) are the rate of mutation of a WT cell into A cell and respectively, a B cell type. For this class we consider the temporal selectional advatange of the B cells always present.
The total cell population is considered constant so the division of a cell is always simultaneous to the death of a cell.
Therefore, the actual system of equations that describes the model is
\begin{eqnarray} WT + WT &\xrightarrow{P_{WT \rightarrow A}} WT + A \\ WT + WT &\xrightarrow{P_{WT \rightarrow B}} WT + B \\ A + WT &\xrightarrow{P_{A \rightarrow B}} B + WT \\ A + WT &\xrightarrow{P_{A \rightarrow WT}} WT + WT \\ B + WT &\xrightarrow{P_{B \rightarrow A}} A + WT \\ A + WT &\xrightarrow{P_{WT \rightarrow B}} A + B \\ B + WT &\xrightarrow{P_{B \rightarrow WT}} WT + WT \\ B + WT &\xrightarrow{P_{WT \rightarrow A}} A + B \\ A + B &\xrightarrow{P_{A \rightarrow WT}} B + WT \\ A + B &\xrightarrow{P_{B \rightarrow WT}} A + WT \end{eqnarray}- gillespie_algorithm_criterion(criterion)[source]¶
Runs the Gillespie algorithm for the STEM cell population until a criterion is met.
- Parameters
criterion – (list of 2 lists) List of percentage thresholds of cell types in the population for disease to be triggered and another containing the type of threshold imposed.
- gillespie_algorithm_fixation()[source]¶
Runs the Gillespie algorithm for the STEM cell population until fixation.
- gillespie_algorithm_fixed_times(start_time, end_time)[source]¶
Runs the Gillespie algorithm for the STEM cell population for the given times.
- Parameters
start_time – (int) Time from which we start the simulation of the tumor.
end_time – (int) Time at which we end the simulation of the tumor.
- one_step_gillespie(i_WT, i_A, i_B)[source]¶
Computes one step in the Gillespie algorithm to determine the counts of the different species of cells living in the tumor at present. Returns time to next reaction and the tuple state of the system.
- Parameters
i_WT – (int) number of wildtype cells (WT) in the tumor at current time point.
i_A – (int) number of 1st type mutated cells (A) in the tumor at current time point.
i_B – (int) number of 2nd type mutated cells (B) in the tumor at current time point.
- simulate_criterion(parameters, criterion)[source]¶
Computes the number of each type of cell in a given tumor until a criterion is met.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
criterion – (list of 2 lists) List of percentage thresholds of cell types in the population for disease to be triggered and another containing the type of threshold imposed.
- simulate_fixation(parameters)[source]¶
Computes the number of each type of cell in a given tumor until fixation.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
- simulate_fixed_times(parameters, start_time, end_time)[source]¶
Computes the number of each type of cell in a given tumor between the given time points.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
start_time – (int) Time from which we start the simulation of the tumor.
end_time – (int) Time at which we end the simulation of the tumor.
STEM Cell Cycle Gillespie Algorithm with Variable Environment¶
- class cmmlinflam.StemGillespieTIMEVAR[source]¶
StemGillespieTIMEVAR Class: Base class for the forward simulation of the evolution of a population of STEM cells.
Three types of cells are considered - those which present mutations that give selectional advantage irrespective of environmental conditions (A), those which present mutations that give selectional advantage dependent on environmental conditions (B) and the wild type cells (WT).
Cells decay at the same rate independent of their type and devide with rates which illsutate their selectional advantage. A wild type cell (WT) can mutate to a cell of type A, respectively a cell of type B with constant given rates of mutation.
The system of equations that describe the isolated possible events that can occur
\begin{eqnarray} WT &\xrightarrow{m} \emptyset \\ A &\xrightarrow{m} \emptyset \\ B &\xrightarrow{m} \emptyset \\ \emptyset &\xrightarrow{\alpha_{WT}} WT \\ \emptyset &\xrightarrow{\alpha_{A}} A \\ \emptyset &\xrightarrow{\alpha_{B}} B \\ WT &\xrightarrow{\mu_{A}} A \\ WT &\xrightarrow{\mu_{B}} B \end{eqnarray}where m is the rate of decay, \(\alpha_{WT}\), \(\alpha_{A}\), and \(\alpha_{B}\) are the growth rates for the WT, A and B cell type respectively and \(\mu_{A}\) and \(\mu_{B}\) are the rate of mutation of a WT cell into A cell and respectively, a B cell type. For this class we consider the temporal selectional advatange of the B cells to vary with time.
The total cell population is considered constant so the division of a cell is always simultaneous to the death of a cell.
Therefore, the actual system of equations that describes the model is
\begin{eqnarray} WT + WT &\xrightarrow{P_{WT \rightarrow A}} WT + A \\ WT + WT &\xrightarrow{P_{WT \rightarrow B}} WT + B \\ A + WT &\xrightarrow{P_{A \rightarrow B}} B + WT \\ A + WT &\xrightarrow{P_{A \rightarrow WT}} WT + WT \\ B + WT &\xrightarrow{P_{B \rightarrow A}} A + WT \\ A + WT &\xrightarrow{P_{WT \rightarrow B}} A + B \\ B + WT &\xrightarrow{P_{B \rightarrow WT}} WT + WT \\ B + WT &\xrightarrow{P_{WT \rightarrow A}} A + B \\ A + B &\xrightarrow{P_{A \rightarrow WT}} B + WT \\ A + B &\xrightarrow{P_{B \rightarrow WT}} A + WT \end{eqnarray}- gillespie_algorithm_criterion(criterion)[source]¶
Runs the Gillespie algorithm for the STEM cell population until a criterion is met.
- Parameters
criterion – (list of 2 lists) List of percentage thresholds of cell types in the population for disease to be triggered and another containing the type of threshold imposed.
- gillespie_algorithm_fixation()[source]¶
Runs the Gillespie algorithm for the STEM cell population until fixation.
- gillespie_algorithm_fixed_times(start_time, end_time)[source]¶
Runs the Gillespie algorithm for the STEM cell population for the given times.
- Parameters
start_time – (int) Time from which we start the simulation of the tumor.
end_time – (int) Time at which we end the simulation of the tumor.
- one_step_gillespie(t, i_WT, i_A, i_B)[source]¶
Computes one step in the Gillespie algorithm to determine the counts of the different species of cells living in the tumor at present. Returns time to next reaction and the tuple state of the system.
- Parameters
t – (int) time point at which we compute the transition probability.
i_WT – (int) number of wildtype cells (WT) in the tumor at current time point.
i_A – (int) number of 1st type mutated cells (A) in the tumor at current time point.
i_B – (int) number of 2nd type mutated cells (B) in the tumor at current time point.
- simulate_criterion(parameters, switch_times, criterion)[source]¶
Computes the number of each type of cell in a given tumor until a criterion is met.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
switch_times – (list of lists) Array of the times at which the environmental conditions accounted for the B cell line. The first column indicates the time of change and the second indicate the level of the environment – 0 for LOW; 1 for HIGH.
criterion – (list of 2 lists) List of percentage thresholds of cell types in the population for disease to be triggered and another containing the type of threshold imposed.
- simulate_fixation(parameters, switch_times)[source]¶
Computes the number of each type of cell in a given tumor until fixation.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
switch_times – (list of lists) Array of the times at which the environmental conditions accounted for the B cell line. The first column indicates the time of change and the second indicate the level of the environment – 0 for LOW; 1 for HIGH.
- simulate_fixed_times(parameters, switch_times, start_time, end_time)[source]¶
Computes the number of each type of cell in a given tumor between the given time points.
- Parameters
parameters – (list) List of quantities that characterise the STEM cells cycle in this order: the initial counts for each type of cell (i_WT, i_A, i_B), the growth rate for the WT, the boosts in selection given to the mutated A and B variant respectively and the mutation rates with which a WT cell transforms into an A and B variant, respectively.
switch_times – (list of lists) Array of the times at which the environmental conditions accounted for the B cell line. The first column indicates the time of change and the second indicate the level of the environment – 0 for LOW; 1 for HIGH.
start_time – (int) Time from which we start the simulation of the tumor.
end_time – (int) Time at which we end the simulation of the tumor.