Evolutionary Dynamics - Practice

Overview

For this module, we will explore a stochastic SIR-type model with 2 different pathogen strains, wild-type and a drug resistant mutant in the presence of drug treatment. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.

Learning Objectives

The Model

Model Overview

This model tracks susceptibles, wild-type infected untreated, wild-type infected treated, drug-resistant infected and recovered hosts. The following compartments are included:

The included processes/mechanisms are the following:

Model Implementation

The flow diagram for the model implemented in this app is:

Model Diagram

Model Diagram

The deterministic/ODE equations for this model are:

\[\dot S = - S (b_u I_u + b_t I_t + b_r I_r)\] \[\dot I_u = S (1-f) b_u (1-c_u) I_u + S (1-f)b_t (1-c_t) I_t - g_u I_u\] \[\dot I_t = S f b_u (1-c_u) I_u + S f b_t (1-c_t) I_t - g_t I_t\] \[\dot I_r = S (b_u c_u I_u + b_t c_t I_t + b_r I_r) - g_r I_r\] \[\dot R = g_u I_u + g_t I_t + g_r I_r\]

However, for this app we do not implement a deterministic/ODE model. Instead, we implement its stochastic equivalent. We can specify the model by writing down every possible transition/event/reaction that can occur and their propensities (the propensity multiplied with the time step gives the probability that a given event/transition occurs). For our model these are the following:

Event type Transitions Propensity
S turn into Iu S => S-1, Iu => Iu+1 (1-f) * (bu * (1-cu) * Iu + bt * (1-ct) * It) * S
S turn into It S => S-1, It => It+1 f * (bu * (1-cu) * Iu + bt * (1-ct) * It) * S
S turn into Ir S => S-1, Ir => Ir+1 (bu * cu * Iu + bt * ct * It + br * Ir) * S
Recovery of Iu Iu => Iu-1, R => R+1 gu * Iu
Recovery of It It => It-1, R => R+1 gt * It
Recovery of Ir Ir => Ir-1, R => R+1 gr * Ir

What to do

The tasks below are described in a way that assumes everything is in units of DAYS (rate parameters, therefore, have units of inverse days). If any quantity is not given in those units, you need to convert it first (e.g. if it says a week, you need to convert it to 7 days).

Task 1

Set the model parameters to the following: susceptible S = 500, and initially untreated infected host Iu = 1. No other infected hosts, no recovered. Set simulation duration to 300 days, start at day 0, time step doesn’t matter. Assume that untreated individuals transmit at bu = 0.001, treated at bt = 0.0005, and resistant at br = 0.0008. Assume that the duration of the infectious period is 5 days for untreated, 4 days for treated and 5 days for resistant (for those individuals, treatment has no effect). Set the rates gi accordingly. Assume nobody receives treatment and no resistance is generated (f = cu = ct = 0). Set the number of simulations to 20, random seed 123. With parameters set to correspond to the scenario just described, run the simulation. You should see 12 of the simulations with outbreaks and the others without. Only untreated infected will differ from zero. Make sure you understand why. For those simulations with outbreaks, you should have around 50-85 susceptible left at the end.

Record

Task 2

Now we’ll explore treatment. Set initial untreated infected to 10 (to ensure we get outbreaks). Consecutively set the fraction receiving treatment, f, to 0, 0.25, 0.5, 0.75 and 1. For each treatment level, run 20 simulations (be patient) and record the average value of recovered at the end. Based on that, compute the reduction in total total number of infected as treatment level increases.

Record

Task 3

Now allow resistance to be generated during treatment (ct > 0). Set ct = 0.2 for the fraction of resistant generation from treatment. Run the simulation for the treatment levels specified in the previous task, again determine total number infected for each treatment level. On a piece of paper, sketch out the relationship between treatment level and the total number infected in the absence and presence of resistance generation (ct = 0, recorded in previous task, and ct > 0, recorded here). What do you conclude from that?

Record

Task 4

Set the rate of transmission for resistant hosts to br = 0.001, also increase resistance generation during treatment to ct = 0.3. Keep everything else as previously. Contemplate what these changes mean biologically, and what you should expect from the simulations. Run the model for each of the 5 treatment levels specified above and record the total number infected at each treatment level. Draw them in the same figure you started above. What do you conclude from that?

Record

Task 5

In the previous task, you should have found that as you increase treatment, the total number of infected initially goes down, but then goes up again. Let’s try to find the optimal treatment level. Explore different values of f in steps of 0.05 to find the value that gives the lowest total number of infected (of course you don’t have to start at f=0, you can explore the space around the area where you know the optimal value is.

Record

Task 6

The general idea explored here is that if you have a situation where resistance might emerge, it reduces the effectiveness of a treatment and might mean that sometimes more treatment is not better. The details depend on the fitness of the different infection compartments (in our model represented by the parameters bi and gi) and the speed at which resistance can emerge either without or with treatment, which in our model is governed by the parameters cu and ct. Explore how different values for those parameters impact the usefulness of treatment. As you change parameter values, try to connect them to biology, i.e. try to understand what it would mean in the real world if certain parameters had certain values.

Record

Further Information

References

Handel, Andreas, Ira M Longini, and Rustom Antia. 2009. “Antiviral Resistance and the Control of Pandemic Influenza: The Roles of Stochasticity, Evolution and Model Details.” Journal of Theoretical Biology 256 (1): 117–25. https://doi.org/10.1016/j.jtbi.2008.09.021.