DOC PREVIEW
MIT 6 00 - Simulating Virus Population Dynamics

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

MIT OpenCourseWare http://ocw.mit.edu 6.00 Introduction to Computer Science and Programming Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.6.00: Introduction to Computer Science and Programming Problem Set 12: Simulating Virus Population Dynamics Handed out: Thursday, November 20, 2008 Due: Friday, December 5, 2008 Introduction In this problem set, you will design and implement a stochastic simulation of virus population dynamics. There are medications for the treatment of infection by viruses; however, viruses may become resistant to one drug, sometimes to multiple drugs due to mutations. Despite not having gone to medical school (or maybe because of this), you can still decide on a good drug treatment regimen by observing how the virus population responds to the introduction of different drugs. We have been unable to reserve a bio lab for 6.00, so you will have to simulate the virus population dynamics with Python and reach conclusions based on the simulation results. For this problem set, you should submit both your code, ps12.py, and a writeup in pdf format, writeup.pdf (you may find this online pdf converter useful). Workload Please let us know how long you spend on each problem. We want to be careful not to overload you by giving out problems that take longer than we anticipated. Collaboration You may work with other students. However, each student should write up and hand in his or her assignment separately. Be sure to indicate with whom you have worked. For further details, please review the collaboration policy as stated in the syllabus. Getting Started Download and save this file. ps12.py: The code template for the simulation Background: Viruses, Drug Treatments, and Computational Models Viruses such as HIV and Influenza represent a significant challenge to modern medicine. One of the reasons that they are so difficult to treat is because of their ability to evolve. As you may know from introductory biology classes, the traits of an organism are determined by its genetic code. When organisms reproduce, their offspring will inherit genetic information from their parent. This genetic information will be modified, either due to mixing of the two parents’ genetic information, or through errors in the genome replication process, thus introducing diversity into a population. Viruses are no exception and carry and propogate their own genetic information. Two characteristics of viruses make them particularly difficult to treat. The first is that their replication mechanism often lacks the error checking mechanisms that is present in more complex organisms. Secondly, viruses replicate extremely quickly, orders of magnitude faster than humans. Thus, while we may be used to thinking of evolution as a process which occurs over long time scales, populations of viruses can undergo substantialevolutionary changes within a single patient over the course of treatment. These two characteristics allow a virus population to quickly acquire genetic resistance to therapies over the course of a treatment. In this problem set, we will make use of simulations to explore the effect of introducing drugs on the virus population and determine how best to address these treatment challenges within a simplified model. Computational modeling has played an important role in the study of viruses such as HIV (for example, see this paper, by Time Magazine’s Man of the Year, David Ho). In this problem set, we will implement a highly simplified stochastic model of virus population dynamics in vivo. Many details have been swept under the rug (host cells are not explicitly modeled and the size of the population is several orders of magnitude less than the size of actual virus populations). Nevertheless, our model exhibits biologically relevant characteristics and will give you a chance to analyze and interpret simulation data. Problem 1: Implementing a Simple Simulation (No Drug Treatments) We start with a trivial model of the virus population - the patient does not take any drugs and the viruses do not acquire resistance to drugs. We simply model the virus population in a patient as if it were left untreated. At every time step of the simulation, each virus particle has a fixed probability of being cleared (eliminated from the patient’s body). If the virus particle is not cleared, it is considered for reproduction. Unlike the clearance probability, which is constant, the probability of a virus particle reproducing is a function of the virus population. With a larger virus population, there are fewer resources in the patient’s body to facilitate reproduction, and the probability of reproduction will be lower. One way to think of this limitation is to consider that virus particles need to make use of a the patient’s cells to reproduce, they cannot reproduce on their own. As the virus population increases, there will be fewer available host cells for viruses to utilize for reproduction. To implement this model, you will need to fill in the SimpleVirus class, which maintains the state of a single virus particle, and the SimplePatient class, which maintains the state of a virus population associated with a patient. The update() method in the SimplePatient class is the “inner loop” of the simulation. It modifies the state of the virus population for a single time step and returns the total virus population at the end of the time step. update() should first decide which virus particles are cleared and which survive by making use of the doesClear() method of each SimpleVirus instance and update the collection of SimpleVirus instances accordingly. update() should then call the reproduce() method for each virus particle. Based on the population density, reproduce() should either return a new instance of SimpleVirus representing the offspring of the virus particle, or raise a NoChildException indicating that the virus particle does not reproduce during the current time step. The update() method should update the attributes of the patient appropriately under either of these conditions. After iterating through all the virus particles, the update() method returns the number of virus particles in the patient at the end of the time step. The reproduce() method in SimpleVirus should produce an offspring by returning a new instance of SimpleVirus with probability: self.maxBirthProb * ( 1 - popDensity) self.maxBirthProb is the birth rate under optimal


View Full Document

MIT 6 00 - Simulating Virus Population Dynamics

Download Simulating Virus Population Dynamics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Simulating Virus Population Dynamics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Simulating Virus Population Dynamics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?