Overview

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.

The Model

Model Overview

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:

  • U - uninfected cells
  • I - infected cells
  • V - (free) virus

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:

  1. Uninfected cells are produced at some rate n and naturally die at some rate dU.
  2. Virus infects cells at rate b.
  3. Infected cells produce new virus at rate p and die at rate dI.
  4. Free virus is removed at rate dV or goes on to infect further uninfected cells.
  5. To allow conversion from infectious virus units in the model to some experimental units (e.g. plaque forming units), an additional conversion factor, g, is included in the model.

Model Diagram

The diagram illustrating this compartmental model is shown in the figure.

Flow diagram for a simple virus infection model.

Flow diagram for a simple virus infection model.

Model Equations

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\]

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 initial conditions to 105 uninfected cells, no infected cells and 10 virus particles.
  • We start by considering an acute viral infection. We make the assumption that on the timescale of an acute infection (several days), the processes of natural, uninfected cell turnover are so slow that they can be ignored. Set values for the uninfected cell birth and death rates to reflect this assumption.
  • Assume that infected cells have an average life-span of 1 day, and virus has a life-span of 6 hours.
  • Set that the virus production by an infected cell is 100 virions per day and that the rate at which new cells become infected is 10-6.
  • Assume there is no need to do any unit adjustment/conversion (i.e. the value of that parameter is 1).
  • Run the simulation for 50 days, produce plots with and without log-scales.

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).

Task 2:

  • Slowly increase the virus death rate. Contemplate what you expect to see, then run the simulation to compare. Keep increasing until you get essentially no more infection. You will have to adjust the simulation time for that, too.

Task 3:

  • Set the virus death rate back to what it was in task 1. Now change the virus production rate until you reach the value at which the virus does not cause any infection.
  • You can also repeat this process for the infected cell death rate and the infection rate.

Task 4:

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).

  • Plug numbers for the parameters from your simulations in task 2 and 3 into the equation for R0 to figure out what value R0 needs to be for there (not) to be an infection. Figure out the threshold value for R0 at which you go from no infection to having an infection.

To learn more about R0, see e.g. (Heffernan, Smith, and Wahl 2005; Roberts 2007; 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.

Task 5:

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.

Task 6:

  • We start by focusing on the dynamics of uninfected cells only. To that end, set the number of initial infected cells and virus particles to 0. Keep the number of uninfected cells at 105, set birth and death of uninfected cells to zero.
  • Run the simulation. Nothing should happen, uninfected cells should stay at their starting value.
  • Now play around with birth rate and death rate of uninfected cells and see how that affects the dynamics.
  • The number of uninfected cells once the system has settled down only depends on the birth and death rate, not the starting conditions. Confirm this by trying different values for U0 while keeping birth and death rate at some fixed values.
  • One can write down an equation for uninfected cells at steady state as a function of birth and death rate, i.e. Us = f(n,dU), where f() is the mathematical symbol for “some function”. In this case, it is a very simple function. Based on your explorations of different values for birth and death rate and the resulting values of Us, figure out this equation.
  • To test your equation, set birth rate to 20000, set initial condition for uninfected cells to 105 and find the value for the death rate that keeps the number of uninfected cells unchanged at 105.

Task 7:

Now we’ll explore an infection in the presence of uninfected cell birth and death.

  • Set all parameters as in task 1.
  • Set birth and death as described at the end of the previous task.
  • Run the simulation. You should get an initial large increase in virus load, which then settles down and reaches a steady state of around 295000. Similarly, the variables U and I settle down to steady state values.

Task 8:

  • Investigate how the steady state values for U, I and V depend on the parameters b, p, dV and dI. You might need to increase the simulation time to ensure the system has settled down to its steady state.
  • Once the system has settled down, there are no more changes in the numbers for each compartment. Mathematically, that means that the left side of the differential equations becomes 0, and they turn into the following algebraic equations: 0 = n - dU U - bUV, 0 = bUV - dI, 0 = pI - dV V - gb UV. One can solve those equations for each of the compartments to get a mathematical expression of what U, I and V are at steady state. Try to do this. You should find that Us = dI dV/(b(p - dI g)) and similar equations for Is and Vs.
  • Check that your equations agree with the simulations. Plug the values for the parameters into each of the equations and see if the steady state values \(U_s\), \(I_s\) and \(V_s\) you computed with the equations is the same as you get as steady state value from the simulation. If that’s not the case, it means your equations aren’t right yet.

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.

While solving algebraic equations, like the one above where you were asked to find U, I and V at steady state can be done by hand, it’s often tedious. Modern computer software helps. R cannot solve such equations analytically, but other software packages can. The main ones are Mathematica and Maple. Both are powerful and expensive. If you only need one occasionally, there is Maxima, which is free. 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.

Task 9:

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 you can get all this dynamics without any immune response present. The interaction 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.

Further Information

References

Beauchemin, Catherine AA, and Andreas Handel. 2011. “A Review of Mathematical Models of Influenza a Infections Within a Host or Cell Culture: Lessons Learned and Challenges Ahead.” BMC Public Health 11 (1): S7.

Beauchemin, Catherine A A, James J McSharry, George L Drusano, Jack T Nguyen, Gregory T Went, Ruy M Ribeiro, and Alan S Perelson. 2008. “Modeling Amantadine Treatment of Influenza a Virus in Vitro.” Journal of Theoretical Biology 254 (2): 439–51. https://doi.org/10.1016/j.jtbi.2008.05.031.

Chatterjee, Anushree, Jeremie Guedj, and Alan S Perelson. 2012. “Mathematical Modelling of Hcv Infection: What Can It Teach Us in the Era of Direct-Acting Antiviral Agents?” Antiviral Therapy 17 (6 Pt B): 1171–82. https://doi.org/10.3851/IMP2428.

Guedj, J, L Rong, H Dahari, and A S Perelson. 2010. “A Perspective on Modelling Hepatitis c Virus Infection.” Journal of Viral Hepatitis 17 (12): 825–33. https://doi.org/10.1111/j.1365-2893.2010.01348.x.

Heffernan, J M, R J Smith, and L M Wahl. 2005. “Perspectives on the Basic Reproductive Ratio.” Journal of the Royal Society, Interface 2 (4): 281–93. https://doi.org/10.1098/rsif.2005.0042.

Perelson, Alan S, and Ruy M Ribeiro. 2013. “Modeling the Within-Host Dynamics of Hiv Infection.” BMC Biology 11 (1): 96.

Roberts, M G. 2007. “The Pluses and Minuses of R0.” Journal of the Royal Society, Interface 4 (16): 949–61. https://doi.org/10.1098/rsif.2007.1031.

Smith, Amber M, and Alan S Perelson. 2011. “Influenza a Virus Infection Kinetics: Quantitative Data and Models.” Wiley Interdiscip Rev Syst Biol Med 3 (4): 429–45. https://doi.org/10.1002/wsbm.129.