This app allows exploration of a basic virus infection model, with compartments for uninfected cells, infected cells and (free) virus. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.
This model consists of 3 compartments and can capture some of the basic dynamics of viral infections. In this model, we track the following entities, by assigning each to a compartment:
In addition to specifying the compartments of a model, we need to specify the dynamics determining the changes for each compartment. Broadly speaking, there are processes that increase the numbers in a given compartment/stage, and processes that lead to a reduction. Those processes are sometimes called in-flows and out-flows.
For our system, we specify the following processes/flows:
The diagram illustrating this compartmental model is shown in the figure.
Implementing this model as a continuous-time, deterministic model leads to the following set of ordinary differential equations.
\[\dot U = n - d_U U - bUV\] \[\dot I = bUV - d_I I\] \[\dot V = pI - d_V V - gb UV\]
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).
You should get a single, acute infection with virus and infected cells rising and declining. At the end you should be left with around 11068 uninfected cells (and no infected cells and virus).
A well-studied quantity in infectious disease epidemiology is the basic reproductive number (R0), which determines if a pathogen can cause an outbreak at the population level. An equivalent R0 can be defined for a within-host model to determine if you get an infection or not. For this virus model (with no births and deaths of uninfected cells, i.e. n=dU=0), R0 = bpU0/(dV dI).
To learn more about R0, see e.g. (Heffernan, Smith, and Wahl 2005; Roberts 2007; C. A. A. Beauchemin et al. 2008). Some of those references describe R0 in the context of infectious disease epidemiology, but if you replace humans/hosts with cells, the same concepts apply at the within-host level.
Without birth/production of new uninfected cells, the most you can get is a single acute infection (or no infection at all). To convince yourself that it is impossible to produce a chronic infection, play around with the model, try all kinds of parameter values (but keep n=0).
Production of new uninfected cells is an example of resource replenishment. This is needed to allow a steady state/chronic infection, and this concept applies in general (e.g. on the population level, new susceptible individuals need to be created either through birth or through losing immunity).
Let’s explore the model with uninfected cell production, i.e. resource replenishment.
Now we’ll explore an infection in the presence of uninfected cell birth and death.
If you haven’t done algebra in a while, or if you find doing math by hand too tedious, modern computer software often helps. R cannot solve such equations analytically, but other software packages can. The main ones used for analytic math are Mathematica and Maple. Both are powerful and expensive. If you only need to solve simple equations occasionally, there is Maxima, which is free. You can download it and enter the equations above and it will solve it for you. Note that once you go beyond 4-5 variables, the steady state equations are usually very complicated, often so much so that they are not useful anymore. And once you go beyond 5 variables, in most cases your software will struggle to give you something meaningful. Fortunately, while it is less quick and elegant, you can always simulate your model and see what (if any) steady state it reaches.
It is useful to note that while the total numbers for each variable do not change at steady state, this is a dynamic equilibrium. There are still constantly cells and virus being produced and destroyed, it just so happens that the production and destruction mechanisms are equally strong and thus the overall numbers do not change.
Continue to explore the model. Even though it’s a fairly simple model, you can get interesting dynamics from it, such as acute infections and chronic infections. Contemplate what specific pathogens this model could represent. Also note that this model does not contain an immune response. The interactions between cells and virus are enough to produce patterns of infection dynamics that broadly agree with patterns we can see for real infections. This of course does not mean the immune response is not important. But it does illustrate that if all we have is (noisy) virus kinetics data, we are likely able to capture that dynamics with many different types of models, including a simple one like this that is likely not too realistic for any given pathogen.
simulate_basicvirus_ode
. 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.