This app allows exploration of a stochastic model that simulates emergence of drug resistance during an acute virus infection (e.g. influenza) in the presence of an antiviral. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.
This model is a modification and extension of the model described in the “Model Stochasticity” app. Here, we track 2 types of virus, wild-type and drug sensitive, and a resistant mutant. We also consider the presence of a drug.
This model consists of 5 compartments:
For this model, we consider the following processes:
For simplicity, we ignore the possibility that a cell might be infected by both drug sensitive and infected virus and might produce a mix of them.
Flow diagram for the drug resistance model.
If we were to implement this model as a continuous-time, deterministic model, it would have the following set of ordinary differential equations.
\[\dot U = - bUV_s - bU V_r\] \[\dot I_s = bUV_s - d_I I_s\] \[\dot I_r = bUV_r - d_I I_r\] \[\dot V_s = (1-e)(1-m)pI_s - d_V V_s\] \[\dot V_r = (1-e)mpI_s + (1-f)pI_r - d_V V_r\]
However we use a stochastic model here. For such a model, the differential equation formulation is not valid. One can write down an equivalent formulation as a stochastic model by specifying every possible process (also called transition/event/reaction) that can occur and their propensities (the propensity multiplied with the time step gives the probability that a given process/event/transition occurs). For our model these are the following:
Event type | Transitions | Propensity |
---|---|---|
drug sensitive infection | U => U-1, I_s => I_s + 1 | bUV_s |
drug resistant infection | U => U-1, I_r => I_r + 1 | bUV_r |
death if I_s | I_s => I_s - 1 | dI*I_s |
death if I_r | I_r => I_r - 1 | dI*I_r |
production of V_s | V_s => V_s + 1 | (1-e)(1-m)p*I_s |
removal of V_s | V_s => V_s - 1 | dV*V_s |
production of V_r | V_r => V_r + 1 | (1-e)mpI_s + (1-f)p*I_r |
removal of V_r | V_r => V_r - 1 | dV*V_r |
Notes:
simulate_drugresistance_stochastic
. You can call them directly, without going through the shiny app. Use the help()
command for more information on how to use the functions directly. If you go that route, you need to use the results returned from this function and produce useful output (such as a plot) yourself.vignette('DSAIRM')
into the R console.