# Chronic Virus Infection and Immune Response Model

## Overview

This app allows exploration of a chronic virus infection model, with compartments for uninfected cells, infected cells and (free) virus. The model also includes abstract versions of the innate and adaptive immune response. Read about the model in The Model tab. Then, work through the tasks described in the What To Do tab.

### Learning Objectives

- Learn about chronic virus infection dynamics.
- Understand the impact the immune response can have on outcomes in this model.

## The Model

### Model Overview

This model consists of 5 compartments and can capture some of the basic dynamics of viral infections and the ensuing immune response. In this model, we track the following entities, by assigning each to a compartment:

- U - uninfected cells
- I - infected cells
- V - (free) virus
- F - innate (interferon) response
- T - adaptive (T-cell) response

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:

- Uninfected cells are produced at some rate n and naturally die at some rate dU.
- Virus infects cells at rate b.
- Infected cells produce new virus at rate p and die at rate dI.
- Free virus is removed at rate dV or goes on to infect further uninfected cells at rate gb. 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.
- The innate (interferon) response is induced proportional to the number of infected cells at rate rF and decays at rate dF. The innate response lowers the rate of virus production by infected cells, with strength of reduction controlled by parameter k.
- The adaptive (CD8 T-cell) response grows exponentially, proportional to the virus load at rate rT and decays at rate dT. T-cells kill infected cells at rate kT.

Note that the choice of growth dynamics for the adaptive response is slightly different from the acute virus model. There, we assumed the growth was proportional to the innate response F. Here, we assume it is driven by virus/antigen load, V. Both assumptions are potentially reasonable approximations. In reality, it is likely a complex interaction between virus/antigen load and innate response that drives adaptive responses. Trying to model this in detail is beyond the goal of this app. We want to keep it reasonably simple here so we can get some intuition in these kinds of models. For any real problem, you need to decide which components and processes to include and how to model them. The idea of modeling the system in different ways is explored and discussed in the Model Variant Exploration apps.

### Model Diagram

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

Model Diagram

### Model Equations

Implementing this model as a continuous-time, deterministic model leads to the following set of ordinary differential equations.

\[\begin{aligned} \dot U & = n - d_U U - b U V \\ \dot I & = bUV - d_I I - k_T T I \\ \dot V & = \frac{p}{1+k_F F}I - d_V V - gb UV \\ \dot F & = r_F I - d_F F \\ \dot T & = r_T T V - d_T T \end{aligned}\]

## 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

Let’s start by considering a chronic viral infection in the absence of the immune response. Set the initial conditions to 105 uninfected cells, no infected cells, and 10 virus particles. Assume also that infected cells have an average life-span of 1 day, and virus has a life-span of 6 hours (remember that the inverse of the lifespan is the rate of death, and make sure you convert to the right units). 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). Set the birth rate of uninfected cells to 104, and the life span od the uninfected cells to 10 days. Set the starting values for the immune response variables F and T to 0, and also set the two immune response induction rates to 0. With those choices, the values for the other immune response related parameters do not matter. If you want, you can also set them all to 0. Run the simulation for 200 days. You should get one major rise in virus, followed by a few minor peaks and then settling down to a steady state where the virus levels are at around 147500.

Record

- Number of uninfected cells at the end of the simulation

- Number of infected cells at the end of the simulation

### Task 2

As you might expect, and as discussed in the Basic Virus app, changing the parameters associated with the virus and cell kinetics can change the results. How a certain parameter impacts the steady/chronic level is not always intuitively obvious. Give that a quick try. Double the rate at which uninfected cells are produced, i.e. set n = 2x104. One might expect that this should increase the number of uninfected cells at steady state. Run the simulation to determine that this is NOT the case, that instead the number of infected cells changes. Revisit the Basic Virus app if it is unclear to you why this happens.

Record

- Number of uninfected cells at the end of the simulation

- Number of infected cells at the end of the simulation

### Task 3

Now turn on the immune response. Set everything as you did for the first task. Then change the starting value for T to 1, set rT = 10-6, dT = 0.01 and kT = 0. Keep the innate response turned off. Run the simulation for 200 days. You might need to change the plot to a log y-axis so you can see all variables. You will see that - in contrast to the Acute Virus model, the adaptive response is triggered. However, since we set its action to 0, it does not yet impact the virus and cell kinetics. Let’s change that. Set kT = 10-5. Run the simulation. You should see the adaptive response slowly coming in and clearing infected cells, which leads to a reduction in virus load and a recovery of the uninfected cells.

Record

- Number of uninfected cells at the end of the simulation, non-zero kT

- Number of infected cells at the end of the simulation, non-zero kT

### Task 4

Explore how different strengths of the adaptive response impact the results. Keep all settings at the values you just had. Then run the model for kT = 10-2, 10-3, 10-4,… all the way to 10-12 (that’s 11 different values). Each time, run for 200 days and record final number of infected cells and virus. Then make two plots, both with the kT values on the x-axis and the first with infected cell on the y-axis, the second with virus numbers on the y-axis. From these plots, determine (approximately) the values of kT for which infected cell numbers are at 500, and the value at which virus load is at 20,000. Ideally, you would do this task writing a bit of R code to run a loop over the values and draw the plots. But of course you can also do it manually.

Record

- True or False: The value of kT at which virus load is 20,000 is greater than 1.5 x 10-10

### Task 5

Now let’s add the innate response to the model. Keep everything as you just had it. That means U = 105, I = 0, V = 10, F = 0, T = 1, n = 104, dU = 0.1, dI = 1, dV = 4, b = 10-6, p = 100, g = 1, rT = 10-6, dT = 0.01 and kT = 10-5. The set F = 1, rF = 10, dF = 1. Start with kF = 0 and run the simulation for 200 days. You see the inate response coming up, but since it doesn’t have an effect yet, the virus and cell kinetics doesn’t change from the results you got above in the absence of the innate response. Now re-run with kF = 10-5. You should see that the peak virus load is lower. Maybe surprisingly, the virus load at the end is actually higher. The reason is that the reduced virus load leads to a slower induction of the adaptive response, and the weaker adaptive response in turn does not clear infected cells as well (by day 200, if you run it longer the adaptive response will do its job).

Record

- Peak virus load with kF = 0

- Final virus load with with kF = 0

- Peak virus load with kF = 10-5

- Final virus load with with kF = 10-5

### Task 6

We finish with one more systematic exploration. Keep all settings as in the previous task, but change simulation time to 300 days. Run the model for these kF values: 10-8, 10-7, … , 10-3 (6 values). For each value, record peak and final virus load. Repeat all of these runs, but now with rT = 10-7. Make a plot with the kF values on the x-axis and the peak virus values on the y-axis, for both levels of rT. Then make a second plot, now with final virus load on the y-axis.

Record

- True or False: The final virus load decreases monotonically as kF increases, for both values of rT

### Task 7

Continue to explore how different strengths of innate and adaptive response kinetics impact the virus and infected cell dynamics, both during the acute and the chronic phase.

Record

- Nothing

## Further Information

This app (and all others) are structured such that the Shiny part (the graphical interface you see and the server-side function that goes with it) calls an underlying R script (or several) which runs the simulation for the model of interest and returns the results.

For this app, the underlying function running the simulation is called `simulate_chronicvirusir_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.

You can also download all simulator functions and modify them for your own purposes. Of course to modify these functions, you’ll need to do some coding. For examples on using the simulators directly and how to modify them, read the package vignette by typing `vignette('DSAIRM')` into the R console.

If you want to learn a bit more about these kinds of models applied to acute viral infections, specifically influenza, see e.g. (Beauchemin and Handel 2011; Smith and Perelson 2011). A few examples of these kinds of models applied to chronic viral infections, see e.g. (Guedj et al. 2010; Chatterjee, Guedj, and Perelson 2012; Perelson and Ribeiro 2013).

### 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.
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.
Perelson, Alan S, and Ruy M Ribeiro. 2013. “Modeling the Within-Host Dynamics of HIV Infection.” BMC Biology 11 (1): 96.
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.