Model Variant Exploration

Overview

This app allows exploration of the impact of different model formulations on the results obtained from a simulation. Read about the model in The Model tab. Then, work through the tasks described in the What To Do tab.

Learning Objectives

The Model

Model Overview

This model consists of several compartments that capture some of the basic dynamics of virus and immune response during an infection. 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 the purpose of this app, we specify several alternative processes that allow us to explore different model variants by ‘turning on and off’ specific components of the model.

We specify the following processes/flows:

  1. Uninfected cells are produced at rate n, die naturally at rate dU and become infected at rate b.
  2. Infected cells die at rate dI and produce virus at rate p.
  3. Free virus is removed at rate dV due to any unmodeled processes, or goes on to infect further uninfected cells at rate b.
  4. In the absence of virus, the innate response is produced at a rate pF and removed at a rate dF. In the presence of virus, the innate response additionally grows according to 3 alternative model formulations:
    1. Proportional to virus at rate f1 and saturating at a maximum level Fmax.
    2. Proportional to virus at rate f2, with a growth rate saturating at high levels of virus, determined by the saturation constant sV.
    3. Proportional to both virus and infected cells at rate f3, with a growth rate saturating at high levels of virus and infected cells, determined by the saturation constant sV.
  5. The innate response can also act on the system in 3 different ways:
    1. By moving target cells into a “protected” state at rate k1 where those cells can not become infected any longer.
    2. By inducing death of infected cells at rate k2.
    3. By reducing production of virus particles at strength k3.
  6. The adaptive response growth is also modeled according to 3 alternative model formulations:
    1. Proportional to the innate response at rate a1.
    2. Proportional to virus at rate a2, with a growth rate saturating at high levels of virus, determined by the saturation constant hV.
    3. Proportional to both virus and innate response at rate a3, with a growth rate saturating at high levels of virus and innate response, determined by the saturation constant hV.
  7. The adaptive response can act on the system in 3 ways:
    1. By killing infected cells at rate k4.
    2. By killing infected cells at rate k5, with saturation of the maximum killing rate for high adaptive response levels, determined by the saturation constant sA.
    3. By killing virus at rate k6.
  8. The adaptive immune response decays at a rate dA.

Model Diagram

Model Diagram

Model Diagram

Model Equations

The model is implemented as a set of ordinary differential equations:

\[\begin{align} \dot U &= n - d_U U - bVU - k_1FU \\ \dot I &= bVU - d_II - k_2FI - k_4 A I - k_5 \frac{A I}{A+s_A} \\ \dot V &= \frac{pI}{1+k_3 F} - d_VV - bVU - k_6AV \\ \dot F &= p_F - d_F F + f_1 V (F_{max} - F) + f_2 \frac{V}{V+s_V} F + f_3 \frac{VI}{VI+s_V} F \\ \dot A &= a_1 F A + a_2\frac{V}{V+h_V}F + a_3 \frac{F V}{ F V + h_V} A - d_A A \end{align}\]

Model Concepts

Both the innate and adaptive response are modeled in a rather abstract manner. We could think of them as some kind of cumulative representation of each arm of the immune response, or alternatively a single dominant innate response component, e.g. interferon for the innate and CD8 T-cells for the adaptive response.

The idea explored in this app and implemented by this model is that results sometimes, but not always, change depending on different (biologically reasonable) ways the immune response is modeled. We can explore those different models by setting certain parameters describing alternative processes to a non-zero value, and all others to zero. We can then study how different model alternatives affect the outcome.

Obviously, the number of alternative models we could make that are biologically reasonable is virtually endless. The better the underlying biology of a given infection is known, the easier it is to pick one model formulation over another. In the end, for most infections, we still don’t know enough to pick the “right” model. We often have to choose one or a few reasonable model candidates and hope that they approximate the underlying processes reasonably well.

Notes

What To Do

For the tasks below, it is assumed that the model is run in units of days.

Task 1

We’ll begin with the basic virus model by turning off any immune response related component. Set all parameter values related to the immune response such that there is no F and A present at any time during the simulation. Set initial conditions to 105 uninfected cells, no infected cells, and 10 virions. Set the infection rate to 10-5, no production or death of uninfected cells, lifespan of infected cells and virus of 1 day and 6 hours, respectively. The rate of virus production should be 100 per day. You should get a single acute viral infection with no immune response present and a maximum of 70217 infected cells.

Record

Task 2

Let’s explore different mechanisms for the innate response. Keep initial level of innate response at 0, but set innate production and removal rate to 1. Set all innate growth parameters (the fi) and all innate actions (k1, k2, k3) to 0. Run the simulation, confirm that you get an innate response that settles at a steady state (balance between production and removal), but that there is no further increase and that the rest of the dynamics doesn’t change (i.e. you should get the same maximum number of infected cells as above).

Record

Task 3

Now, let’s explore the different types of innate response induction by playing with the fi parameters and the saturation parameter, sV. First, set f1 to 10-5 and Fmax to 1000. Relate what you see in the plots to the equations so you get an idea of how different terms in the equations behave. Continue to keep the ki at 0. This means the rest of the variables should not change. Make ten-fold changes to f1 and Fmax. Try to predict what will happen and then test your predictions by running the simulation.

Record

Task 4

Let’s switch to the alternative innate response induction proceses. Set f1 back to zero. Then, set f2 to 3 and sV to 105. Play around with different values for f2 and sV, each time trying to predict how changes in the parameters will affect the model.

Next, set f2 to zero and set f3 to 2. For any given value of sV, how does switching between innate response induction via f2 differ from f3? (Hint: take another look at the model equations.) Play around with different values for f3 and sV, again trying to predict the output and then running the simulation to confirm. Remember, each time you switch processes, ‘turn off’ the alternative ones.

Record

Task 5

Explore the alternative representations of innate response induction by switching modeled process. Do you think that any of the modeled processes is more biologically reasonable than the others? Why or why not? Are you able to recreate similar dynamics regardless of which process is modeled? What happens if you turn more than one of the alternative processes on at once; is this biologically reasonable? Can you think of improvements to the parameterization?

Record

Task 6

Now, let’s explore what happens when you have non-zero ki. First, set the innate induction parameters as follows: f3 = 5, f1 = f2 = 0, and sV = 105 (this way we can explore the ki effects using the same innate activation processes). Try different values for the ki parameters. At first, turn on one process at a time; after, mix and match.

You’ll find that the action of the innate response now impacts the other variables, which in turn can impact further innate activation. Some of the resulting dynamics can get complex. Pay attention to how different processes of innate activation and innate action do or don’t produce different overall dynamics.

Record

Task 7

Finally, turn on the adaptive response. Note that in this model, there is no adaptive response without innate response (check it by setting the innate response to 0 while having non-zero adaptive growth rates, ai). Also, note that the alternative adaptive growth processes for a1 and a3 further need an initial non-zero value for the adaptive immune response to be able to grow (again, check it for yourself either by reviewing the model equations or running the simulation).

Turn the innate response back on as in Task 6 with k2 = 0.001 and k1 = k3 = 0. Explore how different non-zero adaptive growth rates, ai, affect the adaptive response dynamics. Start by leaving the adaptive action parameters at 0. Then, fiddle with those parameters as well and set them to non-zero values. Also, pay attention to the impact of the saturation constants.

Record

Task 8

Now that we have played with each of the immune response processes, let’s see if we can put together a bit more complicated model.

Set dF = 10, the innate response growth parameters to f3 = 15, f1 = f2 = 0, and sV = 105, and the innate response action parameters to k2 = 0.001 and k1 = k3 = 0. Set the adaptive response initial value to 1, adaptive response growth parameters to a3 = 5, a1 = a2 = 0, and hV = 107, and the adaptive response action parameters to k4 = 0, k5= 0.01, k6 = 0.1, and sA = 1000. Can you intuit what the model output will look like? Run the simulation for 100 days. You should have about 3 uninfected cells remaining at the end of the simulation.

Now, let’s add some processes for the birth and death of uninfected cells. Set the rate of uninfected cell production, n, to 10000 and the rate of natural death of uninfected cells to a value that would, in the absence of infection, equate to a constant 105 number of uninfected cells throughout the simulation. If you have difficulty determining the corresponding value for dU, you can review steady states in the Basic Virus app. Run the simulation. You should get a pretty interesting pattern. How would you interpret this? Does this model, parameter or dynamics, seem biologically reasonable?

Record

Task 9

As you’ll notice, some of the specific model choices (i.e. specific parameters/terms in the model being turned on or off) lead to similar results, while other times results are quite different. For a specific system under study, some ways to formulate the immune response and the dynamics one gets might be better than others. Think about a system you are familiar with and consider which (if any) of the possible mechanisms implemented in this model might best describe that system. Keep playing with the model and see if you can recreate the system!

Record

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

Explorations of different models and their impacts on outcomes for acute virus infections in general can be found in e.g. (Li and Handel 2014) and a more detailed discussion of previously published models and comparison to data for influenza can be found in (Dobrovolny et al. 2013).

References

Dobrovolny, Hana M, Micaela B Reddy, Mohamed A Kamal, Craig R Rayner, and Catherine AA Beauchemin. 2013. “Assessing Mathematical Models of Influenza Infections Using Features of the Immune Response.” PloS One 8 (2): e57088.
Li, Yan, and Andreas Handel. 2014. “Modeling Inoculum Dose Dependent Patterns of Acute Virus Infections.” Journal of Theoretical Biology 347 (April): 63–73. https://doi.org/10.1016/j.jtbi.2014.01.008.