click on the Biowiki logo to go to homepage Home Home | EditEdit | Attach Attach | New New | Site Map Site Map | Help Help
Research Teaching
Fall12 | Sandbox
Biowiki > Teaching > UndergraduateClass > ImmuneSystemDynamics


Advanced search...



Completing this homework is optional; if you do complete it, your lowest-graded homework will be discarded when we compute your final grade.

As always, assessed tasks are in boldface:

  1. plot a graph of viral load using the parameters for patient #102
  2. numerically simulate the linear differential equations for viral load (this is now extra credit)
  3. describe two alternate nonlinear models, and how you would investigate them



(Mock data)

Time/days .2 .4 .6 .8 1 1.2 1.4 1.6 1.8 2 3 4 5 6 7
Viral load (Patient 1) 4.95 5.06 5.01 5 5 4.75 4.8 4.81 4.7 4.65 4.5 4.2 4.18 4.14 3.6

Viral loads expressed in log10(RNA copies/ml)


We will first try simulating the simplest version of the model of Perelson et al using the simplest technique to scan through parameters to find the best fit to the data. Progressing through the practical, we will use increasingly sophisticated models and methods.

  • We will work first with the explicit solution given in equation (6) of the paper
    • Verify that this equation is a solution of equations (3)-(5)
  • Simulate Perelson et al 's linear model by plugging in the formula from equation (6)
    • Use any language/visualization tool of your choice (I like Perl and xgraph, but Matlab, Excel, etc. also fine)
    • Plot a graph of the viral load over a 7-day period, using the parameters estimated for patient #102 in the paper .
  • Write code to evaluate the sum-of-squares difference to the above patient data
    • Why is sum-of-squares-difference a good metric? (Or is it?)
  • Estimate the virion clearance rate () and infected cell death rate () from the data
    • Try several different values for and , e.g. (10,0.25); (10,1); (2,0.25); (2,1)
    • Scan a range of parameter values to find the best fit
    • How do these rates relate to more intuitive time-like quantities, i.e. mean time until virion clearance (or cell death)?
  • Simulate the linear model in equations (3)-(5) and plot the results. Use Euler's method.
    • Use the following parameters, again from patient 102: where (from footnote 10) and
      • Note that one parameter is undetermined by the above equations (either or ). What are the meanings of these parameters? What values of and give you the results closest to the formulae?
    • Note: because of the original ambiguity in this part of the exercise, the above question (Euler simulation) is now an optional task for extra credit.
    • (Optional) Instead of Euler, try the Runge-Kutta method
  • Describe the nonlinear models mentioned in footnote 12 to the paper, and suggest how you would investigate them:
    • ...the imperfect-drug model
    • ...the increasing target cell model
  • Try simulating one (or both) of the above models.
  • Investigate the further reading for this exercise (below).


  • Use Perl, Matlab, Microsoft Excel, or anything else you like to do the simulations and calculations here.
  • CellML is interesting but somewhat overkill for this exercise:

Further reading

Actions: Edit | Attach | New | Ref-By | Printable view | Raw view | Normal view | See diffs | Help | More...