* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download ORDINARy DIFFERENTIAL EqUATIONS AND CELLULAR
Survey
Document related concepts
Transcript
Theoretical models in immunology Ordinary Differential Equations and cellular automata. Nicolas Rapin Algorithms in Bioinformatics The Bioinformatics Centre, Copenhagen University Biotech Research and Innovation Center , Copenhagen University Sunday, October 24, 2010 Why models? Mathematical modeling allows to: •Understand better the phenomena •distinguish what is relevant/redundant •Make hypothesis, test different scenarios •analyse dynamics •Estimate parameters. Sunday, October 24, 2010 Why models? Models make simplifications of the reality, mainly an unknown reality. A model can describe different parts of the reality, its function or its appearance. Models have different levels of abstraction. Sunday, October 24, 2010 Bioinformatics centre a PE model 108 107 ρ N r PE M δM = 0 α 106 Cell number THE ROLE OF MODELS IN UNDERSTAN -DING CD8+ T-CELL MEMORY Apoptosis 105 104 ρ = 2.9 day –1 Ton = 1.3 days Toff = 5.9 days r = 0.009 day –1 α = 0.57 day –1 103 dPE = ƒ(t)ρPE – [1–ƒ(t)]( α + r)PE dt dM = r[1–ƒ(t)]PE – δ MM dt 102 101 0 10 Where ƒ(t) =1, if Ton ≤ t < Toff ; and ƒ(t) = 0, otherwise 108 E δM = 0 α Apoptosis BEST FIT A procedure that estimates the parameters in a model by minimizing the differences between the predictions of the 14-06-10 model and experimental data. Sunday, October 24, 2010 1 0 4 | FEBRUARY 2005 105 104 102 dE dt 101 = ƒ(t)rPM – α [1 – ƒ(t)]E Unconstrained ρ = 172 day –1 Ton = 2.54 days Toff = 5.98 days r = 169.3 day –1 α = 0.58 day –1 103 dPM = ƒ(t)( ρ – r)PM – δ MPM dt Where ƒ(t) =1, if Ton ≤ t < Toff ; and ƒ(t) = 0, otherwise | VOLUME 5 Constrained ρ = 5 day –1 106 r Cell number PM N 40 Unconstrained ρ =172 day –1 107 ρ 30 Time (days) Antia et al. NRI05 b PM model 20 0 10 20 30 Constrained ρ = 5 day –1 Ton = 1.25 days Toff = 5.04 days r = 2.30 day –1 α = 0.11 day –1 40 Time (days) www.nature.com/reviews/immunol Two kinds of mathematical models Descriptive models, where the aim is to fit biological data to achieve prediction through a statistical model calibration. ‣Machine based learning. NetMHC. Analytical models, based on systems of ordinary differential equations (ODEs), take into consideration the mechanisms involved in the studied system. ‣a famous example is the Lotka-Volterra model for predator/preys interactions. Sunday, October 24, 2010 Modeling choices mathematical space continuous vs. discrete time and/or space •Continuous time, continuous space (PDE) •Continuous time, discrete space •Discrete time, continuous space (coupled maps) •Discrete time, discrete space (cellular automata) Presence of non-determinism •Deterministic models •Stochastic models Sunday, October 24, 2010 Aims Mathematical models in immunology: • Rely on concepts • Theoretical • Stirred models (averaged populations) Bioinformatic models in immunology • Rely on collected data • Data driven Sunday, October 24, 2010 Continuous Time Models Sunday, October 24, 2010 Continuous Time Models Differential equation for the growth of a population of size x as a function of continuous time t : f Where is a function that relates the populationʼs rate of change dx(t)/dt to its size x(t) at the time t. After integration, we get x as a function of time. Sunday, October 24, 2010 Continuous Time Models Differential equation for the growth of a population of size x as a function of continuous time t : f Where is a function that relates the populationʼs rate of change dx(t)/dt to its size x(t) at the time t. After integration, we get x as a function of time. Sunday, October 24, 2010 Continuous Time Models Differential equation for the growth of a population of size x as a function of continuous time t : f Where is a function that relates the populationʼs rate of change dx(t)/dt to its size x(t) at the time t. After integration, we get x as a function of time. Sunday, October 24, 2010 Per capita rates We define C(x)=f(x)/x as the per capita growth rate, where : f(x) x is the function describing the growth/death rate. is the number of individuals in the population. Sunday, October 24, 2010 A very simple model The variable P increases at rate k per unit of time. The ODE describes the change in P. k is a free parameter. Note that f is not a function of P. example: bank account. k P Sunday, October 24, 2010 constant growth rate : dP/dt = k 15 k 10 dy/dt = k 5 0 Sunday, October 24, 2010 solution: y(t) = k*t 5 10 15 20 25 constant growth rate : dP/dt = k 15 k 10 dy/dt = k 5 solution: y(t) = k*t dP/dt= k - s = k’ 0 Sunday, October 24, 2010 5 10 15 20 25 constant growth rate : dP/dt = k 15 k 10 k’ dy/dt = k 5 solution: y(t) = k*t dP/dt= k - s = k’ 0 Sunday, October 24, 2010 5 10 15 20 25 Exponential decay The variable P decreases at a rate proportional to the current value of P (times a factor k). The solution is well known as: examples: decay of radioactive particles. Sunday, October 24, 2010 P k Integration of exp. decay Sunday, October 24, 2010 Integration of exp. decay Shuffle variables, so that Ps are on one side and other terms on the other Then, integrate with respect to P and time Sunday, October 24, 2010 Exponential growth The variable P change at a rate proportional to the current value of P (times a factor µ). The solution is well known as: P µ Sunday, October 24, 2010 Fitting bacterial growth: 2400 2000 1600 1200 800 400 0 Sunday, October 24, 2010 2.5 5 7.5 Fitting bacterial growth: 2400 2000 1600 1200 800 400 0 Sunday, October 24, 2010 2.5 5 7.5 Fitting bacterial growth: µ= 0.69 = ln(2)/1 growth rate is 69% per hour. 2400 2000 1600 1200 800 400 0 Sunday, October 24, 2010 2.5 5 7.5 Logistic growth Exponential growth doesn’t always reflect reality completely. P d n Sunday, October 24, 2010 Logistic growth Exponential growth doesn’t always reflect reality completely. P d n Sunday, October 24, 2010 Logistic growth Exponential growth doesn’t always reflect reality completely. Two solutions: ‣Density dependent death rate and fixed growth rate. ‣Density dependent growth rate and fixed death rate. Sunday, October 24, 2010 Density-dependent per capita rates B ir th rat e Death rate individual birth/death rate individual birth/death rate Maximal rate D te a r h eat Birth rate Minimal rate Population size Sunday, October 24, 2010 Population size Density-dependent per capita rates equilibrium point B ir th rat e Death rate individual birth/death rate individual birth/death rate Maximal rate D te a r h eat Birth rate Minimal rate Population size Population size carrying capacity Sunday, October 24, 2010 Density-dependent rates Density independent death rate: rate is constant Density-dependent death rate: rate is a (linear) function of the population Sunday, October 24, 2010 Density-dependent rates Density independent death rate: rate is constant Density-dependent death rate: rate is a (linear) function of the population Sunday, October 24, 2010 Logistic growth The model becomes: Sunday, October 24, 2010 Logistic growth The model becomes: Sunday, October 24, 2010 Logistic growth The model becomes: Sunday, October 24, 2010 Logistic growth The model becomes: 1500 Exponential growth dP/dt = rN 1250 K = 1250 1000 Logistic growth dP/dt = rN (1- P/K ) 750 500 250 0 Sunday, October 24, 2010 2.5 5 7.5 10 12.5 15 Steady states Sometimes, analytic solutions are hard to find. Sunday, October 24, 2010 Steady states Sometimes, analytic solutions are hard to find. Sunday, October 24, 2010 Steady states Sometimes, analytic solutions are hard to find. It is possible to find the equilibrium point, or Steady Sate of this equation, by assuming that at steady state, the change is zero. i.e. dP/dt = 0 Sunday, October 24, 2010 Steady States in mathematical terms, we assume the following: This is for a stable steady state. t Sunday, October 24, 2010 Steady States in mathematical terms, we assume the following: This is for a stable steady state. t Sunday, October 24, 2010 Mass action law, interacting populations The rate of a chemical reaction is directly proportional to the product of the effective concentrations of each participating molecule. Sunday, October 24, 2010 Interacting populations The predator/prey system: Rabbit population grows exponentially, and is a source of food for pumas. Puma population increases by eating rabbits, and decrease following exp. decay. a P R µ Sunday, October 24, 2010 d Lotka-Volterra Sunday, October 24, 2010 Interacting populations 240 200 160 Pumas numbers 120 80 40 0 2500 5000 7500 Rabbits numbers Sunday, October 24, 2010 1!104 1.25!104 Interacting populations 240 Stable limit cycle 200 160 Pumas numbers 120 80 40 0 2500 5000 7500 Rabbits numbers Sunday, October 24, 2010 1!104 1.25!104 Interacting populations Pumas and rabbits can be replaced by immunologicaly relevant entities, such as target cells and infected cells in the case of viral infection. Target cells Infected cells T I β δT I T σ Sunday, October 24, 2010 δI Steady states, Exercise, 10 minutes. Find the steady states of the model. Sunday, October 24, 2010 Steady states, Exercise, 10 minutes. Find the steady states of the model. Sunday, October 24, 2010 Simulations with Discrete Models A step towards artificial life Nicolas Rapin Algorithms in Bioinformatics Center for Biological Sequence analysis. Sunday, October 24, 2010 Cellular automata ‣An Automaton is an entity which can exist in one of a set of states and make transition between these states based on a set of rules ‣A Cellular Automaton (CA) consists of a set of objects (usually) arranged in a regular grid (Lattice). ‣ Each of these objects is a cell. ‣Discrete dynamics: at each discrete unit time, each cell updates its current state according to a transition rule that Sunday, October 24, 2010 Modeling Choices Geometry: dimension and topology. Boundary conditions: mirrored, periodic. Neighborhood: von Neumann, Moore. Cell: defined through the set Σ. Transition rule(s). Sunday, October 24, 2010 Topology 3 neighbors Sunday, October 24, 2010 4 neighbors 6 neighbors Topology 3 neighbors Sunday, October 24, 2010 4 neighbors 6 neighbors Topology 3 neighbors Sunday, October 24, 2010 4 neighbors 6 neighbors Topology 3 neighbors Sunday, October 24, 2010 4 neighbors 6 neighbors Boundaries Sunday, October 24, 2010 Boundaries Sunday, October 24, 2010 Boundaries Sunday, October 24, 2010 Neighborhoods in 2D CA von Neumann: four cells, the cell above and below, right and left from each cell. The radius r of this definition is 1. Moore: enlargement of the von Neumann neighbourhood containing the diagonal cells. In this case, the radius r = 1. Extended Moore neighbourhood equivalent to description of Moore neighbourhood, but neighbourhood reaches over the distance of the next adjacent cells. r = 2 (or Sunday, October 24, 2010 von Neumann Moor e Moore (r=2) Neighborhoods in 2D CA von Neumann: four cells, the cell above and below, right and left from each cell. The radius r of this definition is 1. Moore: enlargement of the von Neumann neighbourhood containing the diagonal cells. In this case, the radius r = 1. Extended Moore neighbourhood equivalent to description of Moore neighbourhood, but neighbourhood reaches over the distance of the next adjacent cells. r = 2 (or Sunday, October 24, 2010 von Neumann Moor e Moore (r=2) Neighborhoods in 2D CA von Neumann: four cells, the cell above and below, right and left from each cell. The radius r of this definition is 1. Moore: enlargement of the von Neumann neighbourhood containing the diagonal cells. In this case, the radius r = 1. Extended Moore neighbourhood equivalent to description of Moore neighbourhood, but neighbourhood reaches over the distance of the next adjacent cells. r = 2 (or Sunday, October 24, 2010 von Neumann Moor e Moore (r=2) Neighborhoods in 2D CA von Neumann: four cells, the cell above and below, right and left from each cell. The radius r of this definition is 1. Moore: enlargement of the von Neumann neighbourhood containing the diagonal cells. In this case, the radius r = 1. Extended Moore neighbourhood equivalent to description of Moore neighbourhood, but neighbourhood reaches over the distance of the next adjacent cells. r = 2 (or Sunday, October 24, 2010 von Neumann Moor e Moore (r=2) Conway’s game of life ‣Moore’s neighborhood, square lattice. ‣Each cell can be either alive or dead. ‣A dead cell with exactly 3 live neighbors becomes alive (or is born). ‣A live cell with 2 or 3 live neighbors stays alive; otherwise it dies (from loneliness or overcrowding). Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 Small example Who in the class says the state changes? Sunday, October 24, 2010 The game of life Sunday, October 24, 2010 The future: Agent based models (ABMs) Agent-Based Modeling (ABM), a relatively new computational modeling paradigm, is the modeling of phenomena as dynamical systems of interacting agents. Other names for ABM is individual-based, micro-simulation and multi-agents modeling. Sunday, October 24, 2010 ABMs A promising technique made feasible with the advent of greater computer power. Each agent consists of state variables and a set of rules that governs its behaviour. Agents can interact either directly with each other or indirectly through the environment. Because all individuals in a population are explicitly represented, they can have unique histories and behaviours. Sunday, October 24, 2010 ABMs One important characteristic of ABMs, which distinguishes them from Cellular Automata, is the potential asynchrony of the interactions among agents and between agents and their environments. In ABM agents typically do not simultaneously perform actions at constant time-steps, as in CAs. Their actions follow discrete-event cues or a sequential schedule of interactions. The discrete-event setup allows for the cohabitation of agents with different environmental experiences. Also ABMs are not necessarily grid-based nor do agents "tile" the environment. Sunday, October 24, 2010 The emergence of complex behavior ABM represents dynamic systems in a manner permitting the systems to evolve over time through agent interactions, with a minimum of apriori assumptions. Macroscopic system behaviors are then observed as emergent properties (emergent behavior). In particular, the richness of detail one can take into account in ABM makes this methodology very appealing for the simulation of biological and social systems, where the behavior and the Sunday, October 24, 2010 Definition and properties of ABMs When building an ABM to simulate a certain phenomenon, we need: • to identify the actors first (the agents). • We then need to consider the processes (rules) governing the interactions among the agents. Sunday, October 24, 2010 Definition and properties of ABMs The range of agent interactions: • global interaction (every agent interacts with every other agent); • local interaction (every agent only interacts with a local neighborhood of other agents); • local interaction with some degree of global reach (e.g., small-world networks). Agents' behaviors are determined by rules. These rules range from simple first order predicate logic to algorithms comprising thousands of lines of code. (this is called a video game in that case) In many ABM applications, modelers introduce some form of spatial landscape (e.g., lattice) that constrains potential agent interactions. In some cases this spatial landscape is represented as a purely passive platform upon which agents interact. In other cases, however, the spatial landscape is itself represented as an agent with its own internal states and behavioral rules (e.g., a region of land with naturally growing food sources). Sunday, October 24, 2010 Definition and properties of ABMs The system evolves over time. The interactions of the agents take place in a certain order. This order should, in principle, not be sequential since agents behave individually in parallel with each other. In practice however, since computers are sequential in nature,the order needs to be serialized though randomized. Simulation of agents can also be done on parallel machines, in this case the asynchrony is easily and better represented. Sunday, October 24, 2010 Predator / prey system Rules: •When a rabbit meets another rabbit, they mate and produce one offspring if there is space for it. They can only die when eaten. They move around. •When a puma is near a rabbit, the rabbit gets eaten. A puma can eat more than one rabbit at a time. there a probability that puma produce an offspring if it has eaten during a time step and if there is space for it. Pumas move around and die if they don’t eat for 10 time steps. Sunday, October 24, 2010 Craig Reynolds Boids Cohesion: steer to move toward the average position of local flockmates Separation: steer to avoid crowding local flockmates Alignment: steer towards the average heading of local flockmates Sunday, October 24, 2010 a boid's neighborhood Sunday, October 24, 2010 ABMs in immunology more states, movements, diffusion even complete organs and much more!! Sunday, October 24, 2010 ABMs in immunology LEGEND Input IL12 Naive Th0 MF (1) becomes (2) (1) secretes (2) (1) affects (+/-) (2) (1) contact (2) TNF_ Input TGF` (+) (+) Th1 (-) (+) (-) (-) (-) Activated Th0 (+) Th2 Naive B IL4 INFa (class switch of B cell) (class switch of B cell) Plasmocyte IgG2 IgM helper T cell (+) IgG1 Sunday, October 24, 2010 Activated B Parameter estimation Sunday, October 24, 2010 Parameter estimation Parameters value need to: Sunday, October 24, 2010 Parameter estimation Parameters value need to: ‣Be estimated from experiments. Sunday, October 24, 2010 Parameter estimation Parameters value need to: ‣Be estimated from experiments. ‣Guessed. Sunday, October 24, 2010 Parameter estimation Parameters value need to: ‣Be estimated from experiments. ‣Guessed. Mathematical model allow to explore the parameter space or test some assumptions. Sunday, October 24, 2010 Parameter estimation Parameters value need to: ‣Be estimated from experiments. ‣Guessed. Mathematical model allow to explore the parameter space or test some assumptions. It is best to have few parameters & processes than many! Sunday, October 24, 2010 Merging it all: System Biology paradigm Population plots Parameters file Graphical spatial output Input data HLA database C-ImmSim Output data antigen's peptide database Distributions >vif MGARASVLSGGKLDK WEKIRLRPGGKKKYR LKHIVWASRELERYAL NPGLLETSEGCKQIIG QLQPAIQTGTEELRS LYNTVATLYCVHKGID VKDTKEALEKMEEEQ NKSKKKAQQAAADT GNNSQVSQNYPIVQ NLQGQMVHQAIS BLOSUM matrices Sunday, October 24, 2010 bits Last position-specific scoring matrix computed A R N D C Q E G H I L K M F P S T W Y V 1 A -0.758 -0.822 0.373 -0.982 2.230 0.082 -1.238 -0.140 0.355 0.050 0.474 -0.347 -0.157 0.696 -0.529 -0.026 -0.355 -0.187 2 A 0.624 -1.175 -1.497 -2.260 -2.194 -0.141 -1.838 -2.304 -2.619 -0.730 -0.492 -1.734 0.259 -2.789 -2.358 3.532 3.744 -3.511 3 A 0.093 -2.321 0.208 4.649 0.179 -0.638 2.466 -1.503 -1.906 -2.336 -2.903 -1.261 -0.994 -1.097 -0.905 0.652 -1.337 -3.538 4 A -1.325 -1.641 -0.347 2.046 -0.505 0.850 0.133 0.359 0.311 -0.520 -0.420 -0.244 0.103 -0.251 1.513 -0.946 0.385 -3.002 5 A -0.690 -0.011 -0.206 -1.269 -1.482 0.584 0.164 -0.393 -0.881 -0.530 -0.307 0.087 -0.282 1.174 0.488 0.625 -0.142 -0.126 6 A -1.104 -0.176 0.989 0.422 -1.513 -0.300 -1.516 -0.696 0.878 -0.242 0.046 -1.193 0.233 1.762 0.832 0.027 0.420 -0.180 7 A -0.108 -0.059 1.286 0.777 -1.478 0.581 -0.527 -0.891 1.288 -1.094 0.466 -0.990 0.639 -0.196 0.062 0.710 0.011 1.815 8 A -0.337 -0.825 0.394 0.155 0.373 -1.192 0.077 -1.057 -0.369 -0.147 1.063 -0.335 0.820 1.111 -1.980 -0.109 -0.046 -0.310 9 A -2.783 -2.685 -3.101 -4.039 -3.936 -2.294 -2.882 -4.172 0.893 -2.354 -1.911 -1.371 -1.940 1.723 -3.701 -2.263 -2.765 0.891 1 1.999 -0.607 -2.723 0.203 -0.461 -2.935 0.687 -0.419 2.253 -0.150 1.607 -0.970 0.013 -1.692 0.514 -0.135 7.946 -2.035 | S H A H E QH C I Y T Q R I Q W VEY Y MTML S H WD H CKNP D TNRR HCEGVGRF G DDHLVWVCEPGV A FASTA files V F AQS C CPNC G WKY I F N CQ TNGNSR YR H W T G QRYDFPHPPVSDLY VF L YDVPLQTM MSWD HRQWDQ SEALR I ENA VTRV MYNP NYGQEQE FMWHLSKWKA TYAR VQSLED NV F YYGL HA I A T I N C 0 | N Q Y VDTFV I H DFTNMAY I YKEPKAEPPLN AVA RNVQI FI KHGA M KANLEFWQ NYLR NCFNQFYNDQTQGVAWFMLQLSPHMSYMKFNDYHYHWWI CI I GAEWDMELI ATHI V I I EEAPQF C DD FN Y C M P Q P I PWVMWKNIP P MSYGTFI VTSYER LAYFRLTPLDWLGEE RNHDCLMFV PST L FE SRW S I Y H HA R I YDSNCYW I R I EWWH T P DN Y I HE M I QGPE R MF LEHMP I TQ I GDH YL RW CY RYQ I RNRFGFSQGMMME Q G Q WW I NTMCNL WP W WGG LV HH Y E QWPFNT LNK TWCT G VF Y HL RTH LF K N H YDK D L ESQDDM WE HECD KGFPQMKWSYQGDPKRMDKVD I HS GSF C S I T HN E LH K MWE EF M KEH K C MDV H WG S H CCGG H K S L L A K V D K M P A K N G D V AP W RC R M RS WA MK F RTKG P M V F AQ VETS YAN M F VK K D GTV M AGA AC R YQ L VG K S G REMQ Y E FC V G GQQRVS STT P F KS L H I T A Y F N R L N C KQ G S T P I L T L Y R C V G A D T V P C W D L H T L H K P C C Q W D L K H M F S P F C Q S A T W A C M M A L Y D T P S V E C G A I M N Q R T K R V N D P K Y W E S D P T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 # gibbss_mc -onlymat -swt 1 -wlc 200 -m matrices/A0101.mat -- LOGO files Mathematical / Bioinformatic model of HIV infection Sunday, October 24, 2010 Bioinformatics centre Modelling HIV infection with a twist of bioinformatics 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Mutations 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV TIME COURSE 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Large scale simulation of HIV infection: - The idea Model with immune memory cells. •One single non-mutating HIV should be cleared. Several strains may co-exist. (ABM-like model) •Virus sequences are allowed to mutate. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Large scale simulation of HIV infection Bioinformatics methods evaluate: •fitness (infectivity) as a function of viral genome. •epitopes (given a set of MHCs, haplotype). Immune system pressure as a function of epitope/MHC predicted binding affinity. No super infection of cells. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre flowchart of HIv infection model k Infection rate p Virions per day I Infected Cells b Death V Virus T Target Cells c Clearance Perelson A. nri:02 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Model of HIV infection dI kV T I dt dV pI cV dt dT kV T dt Ordinary Differential Equations (ODE) 14-06-10 Sunday, October 24, 2010 k Infection rate p Virions per day I Infected Cells b Death V Virus T Target Cells c Clearance Perelson A. nri:02 Bioinformatics centre Model of HIV infection dI kV T I dt dV pI cV dt dT kV T dt Ordinary Differential Equations (ODE) 14-06-10 Sunday, October 24, 2010 k Infection rate p Virions per day I Infected Cells b Death V Virus T Target Cells c Clearance Perelson A. nri:02 Bioinformatics centre Role of memory cells in primary and persistent infection Memory is associated with resistance to reinfection. Viral infection models predict that diseases are chronic if R0 (per capita growth) is larger than one. R0 is > 1 in HIV models chronic behaviour. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Cell number A R0 > 1 Chronic infection Time Cell number B R0 < 1 Transient infection 14-06-10 Sunday, October 24, 2010 Bioinformatics centre The problem 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV Models predict persistence Cell number The problem Time (days) 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV Models predict persistence HIV should be cleared like flu Cell number The problem Time (days) 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV should be cleared like flu New model where memory CTLs help clear infection Time (days) Cell number HIV Models predict persistence Cell number The problem Time (days) 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV should be cleared like flu New model where memory CTLs help clear infection Model no longer represents reality Time (days) Cell number HIV Models predict persistence Cell number The problem Time (days) 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV should be cleared like flu New model where memory CTLs help clear infection Time (days) Cell number HIV Models predict persistence Cell number The problem Model no longer represents reality There must be other mechanisms that need to be considered to restore chronic behavior (escape Mutations) 14-06-10 Sunday, October 24, 2010 Time (days) Bioinformatics centre Conclusion The new mathematical model predicts clearance of the virus. We can apply this to a more descriptive model. Can genetic resolution, and mutation give the chronic behavior back? 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Full HIV model Immune Response Immune Response Immune Response Virus Virus Target cell Infected cell Immune Response Infected cell Immune Response Immune Response Immune Response Immune Response Immune Response Virus Immune Response Infected cell Immune Response Immune Response Immune Response 14-06-10 Sunday, October 24, 2010 Immune Response Immune Response Sunday, October 24, 2010 Target cells infected cells Productively infected cells (i.e. those the immune system sees) Naive CTL cells Effector CTL cells Memory CTL cells Sunday, October 24, 2010 fi fi Sunday, October 24, 2010 Need a way to put numbers for f (fitness) and kappa (CTL killing efficiency) Bioinformatics centre How to assign fitness to a strain in the model? Survival is a balance between loss of fitness and immune escape. The bad: mutations may lead to impaired protein functions. The good: at the same time, mutations can be beneficial to a virus, as epitopes may be lost. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Predicting fitness from sequence. sequence structure function. Mutation in protein can lead to impaired function. Impaired functions reduce fitness. fitness = f (ATCGCGTGAGCG...GTGAGCGCGA) 14-06-10 Sunday, October 24, 2010 Bioinformatics centre 14-06-10 Sunday, October 24, 2010 Bioinformatics centre How different is my query sequence from the consensus? 14-06-10 Sunday, October 24, 2010 Bioinformatics centre BLOSUM Matrix 14-06-10 A R N D C Q E G H I L K M F P S T WY V A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 N -2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 D -2 -2 1 6 -3 0 2 -1 -1 -3 -4 -1 -3 -3 -1 0 -1 -4 -3 -3 C 0 -3 -3 -3 9 -3 -4 -3 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1 Q -1 1 0 0 -3 5 2 -2 0 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2 E -1 0 0 2 -4 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 G 0 -2 0 -1 -3 -2 -2 6 -2 -4 -4 -2 -3 -3 -2 0 -2 -2 -3 -3 H -2 0 1 -1 -3 0 0 -2 8 -3 -3 -1 -2 -1 -2 -1 -2 -2 2 -3 I -1 -3 -3 -3 -1 -3 -3 -4 -3 4 2 -3 1 0 -3 -2 -1 -3 -1 3 L -1 -2 -3 -4 -1 -2 -3 -4 -3 2 4 -2 2 0 -3 -2 -1 -2 -1 1 K -1 2 0 -1 -3 1 1 -2 -1 -3 -2 5 -1 -3 -1 0 -1 -3 -2 -2 M -1 -1 -2 -3 -1 0 -2 -3 -2 1 2 -1 5 0 -2 -1 -1 -1 -1 1 F -2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6 -4 -2 -2 1 3 -1 P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7 -1 -1 -4 -3 -2 S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 1 -3 -2 -2 T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -2 -2 0 W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 112 -3 Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1 V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 Henikoff et al. (1992) Sunday, October 24, 2010 Bioinformatics centre Position specific scoring matrix for fitness evaluation A R N D C Q E G H I L K M F P S T W Y V S L Y N T V A T L .. . 1 -1 -2 -2 0 0 4 0 -1 -1 -2 -2 0 -1 -3 -1 -1 -2 1 -3 -2 6 0 -3 -2 0 -3 0 -4 -3 1 -1 -3 -2 -1 -4 -1 -1 -2 -3 -1 -1 0 -1 -1 0 -2 -1 0 -1 -2 -1 -1 -2 0 -3 -2 0 -1 -2 -1 -1 -3 0 -4 -3 0 -2 -3 0 -2 -4 -1 -3 2 1 -2 -3 -2 -2 -3 -2 2 -1 -3 -1 3 -1 -1 2 -2 4 -1 -3 -1 1 -1 -1 4 0 -2 -2 0 -1 -2 -1 -1 -2 -1 2 -1 -2 -1 1 -1 -1 2 -2 0 3 -3 -2 -1 -2 -2 0 -1 -3 -3 -2 -1 -2 -1 -1 -3 4 -2 -2 1 1 -2 1 1 -2 1 -1 -2 0 5 0 0 5 -1 -3 -2 2 -4 -2 -3 -3 -2 -2 -2 -1 7 -2 -2 -1 -2 -2 -1 -2 1 -1 -3 0 4 0 0 1 14-06-10 Sunday, October 24, 2010 V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 Virus SLYNTVATL FQYMFHGAI GLNYPLMPH TKYRLIALQ APKNVVIRR CSLPNIPTK MIGEKSTLL DIEINDRTR FRPLAVYTA HLLQVELKY SAFGNMKKL DAYPNISCG SDHSMILDR Fitness 1.0 0.242 0.246 0.418 0.365 0.265 0.262 0.234 0.309 0.248 0.374 0.291 0.280 Sequence used to build the PSSM is the consensus sequence Bioinformatics centre Kappa value. The CTLs killing efficiency. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Infected cell A*0201 14-06-10 Sunday, October 24, 2010 GCTCTTCAGACAGGATCAGAAGAACTTAGATCA TTATATAATACAGTAGCAACCCTCTATTGTGTA CATCAAAGGATAGAGGTAAAAGACACCAAGGAA Virus Bioinformatics centre Infected cell A*0201 14-06-10 Sunday, October 24, 2010 GCTCTTCAGACAGGATCAGAAGAACTTAGATCA TTATATAATACAGTAGCAACCCTCTATTGTGTA CATCAAAGGATAGAGGTAAAAGACACCAAGGAA ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE Virus Bioinformatics centre GCTCTTCAGACAGGATCAGAAGAACTTAGATCA TTATATAATACAGTAGCAACCCTCTATTGTGTA CATCAAAGGATAGAGGTAAAAGACACCAAGGAA ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI Infected cell Virus A*0201 CTL Response CTL Response CTL Response CTL Response ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI 14-06-10 Sunday, October 24, 2010 Bioinformatics centre ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE Infected cell CTL Response CTL Response CTL Response CTL Response ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI 14-06-10 Sunday, October 24, 2010 Bioinformatics centre ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE Infected cell CTL Response CTL Response CTL Response CTL Response ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI 14-06-10 Sunday, October 24, 2010 Bioinformatics centre ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE Infected cell CTL Response CTL Response CTL Response CTL Response ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI Infected cell ALQTGSEELRSLINTVATLYCVHQRIEVKDTKE 14-06-10 Sunday, October 24, 2010 Bioinformatics centre ALQTGSEELRSLYNTVATLYCVHQRIEVKDTKE Infected cell CTL Response CTL Response CTL Response CTL Response ALQTGSEEL SLYNTVATL NTVATLYCV TLYCVHQRI CTL Response SLINTVATL Infected cell No cross reactivity!! ALQTGSEELRSLINTVATLYCVHQRIEVKDTKE 14-06-10 Sunday, October 24, 2010 Bioinformatics centre HIV total population analysis T=2e11 sigma=2e9 tmax=500 disp=1 mutarate=1e-4 seqshor.txt 1e+12 T I V E P+I+T Numbers #/mm 1e+10 1e+12 1e+10 1e+08 1e+08 1e+06 1e+06 10000 10000 100 1 100 0 14-06-10 Sunday, October 24, 2010 100 200 300 Time (days) 400 1 500 Bioinformatics centre IS CTL KILLING OF HIV INFECTED CELLS CONSTANT? debate: once activated, CTLs kill infected cells with the same efficiency. •some claim it’s true. •other claim it is not. is killing or proliferation correlated to MHC binding? 14-06-10 Sunday, October 24, 2010 D (CTL) Bioinformatics centre One would expect that D(CTL) is close to one because of dominance. 14-06-10 Sunday, October 24, 2010 D (HIV) A B Bioinformatics centre conclusion Developed a model of HIV where bioinformatics and mathematical modelling are used at the same time Mutation is necessary for the virus to remain. 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Key points System level models enable: Simulations of millions of experiments Years of experimentation can be simulated in hours help select “best” or “most informative” experiments for actual screening 14-06-10 Sunday, October 24, 2010 Bioinformatics centre Conclusion The Immune System is complex Models increase our understanding of the immune system •If you can make a simple model of a system, you capture its main components Genomic resolution is important to understand host/pathogen interaction System level models address the biological complexity 14-06-10 Sunday, October 24, 2010 CA of Predator / prey system Sunday, October 24, 2010 Definition and properties of ABMs When building an ABM to simulate a certain phenomenon, we need: • to identify the actors first (the agents). • We then need to consider the processes (rules) governing the interactions among the agents. Sunday, October 24, 2010 CA of Predator / prey system Rules: •When a rabbit meets another rabbit, they mate and produce one offspring if there is space for it. They can only die when eaten. They move around. •When a puma is near a rabbit, the rabbit gets eaten. A puma can eat more than one rabbit at a time. there a probability that puma produce an offspring if it has eaten during a time step and if there is space for it. Pumas move around and die if they don’t eat for 10 time steps. Sunday, October 24, 2010 step by step creation of a CA Information of the environment stored in a matrix. Cells can be either: • empty (0) • rabbit (1) • puma (2); pumas need another way to remember their age. use another matrix. The result of every time step is stored in a temporary matrix. Sunday, October 24, 2010 Initialisation: • Create environment matrix. (made of zeros) • randomly put preys (1) and predators (2) inside. Loop: • for each cell in the matrix , apply evolution rules. Sunday, October 24, 2010 Empty Do nothing Sunday, October 24, 2010 Rabbit count rabbits around Do nothing no n>1 yes generate random position Do nothing no cell is empty yes generate random position put a new rabbit there cell is empty yes move rabbit there Sunday, October 24, 2010 no Do nothing Puma decrease counter yes counter = 0 Puma is terminated no count rabbits around Do nothing no n>0 yes Generate random position. Remove ALL rabbits around cell is empty yes no Do nothing generate random position put a new puma there cell is empty yes move puma there Sunday, October 24, 2010 no Do nothing 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 Sunday, October 24, 2010 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 Sunday, October 24, 2010 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 0 2 0 0 0 1 0 0 0 2 0 0 0 Sunday, October 24, 2010 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 8 0 0 0 0 0 0 0 10 0 0 0 Sunday, October 24, 2010 The problem Heavy computations require: • fast compiled languages. (C, fortran ... ). • fast computers. • or many computers in parallel. • IF execution speed is an issue: • Use an already written C / fortran(number crushing) library • Write your own library • IF not (think development time): • Use Maltab or R or python. Sunday, October 24, 2010 GNU Scientific library / SUNDIALS ‣GNU Scientific libraries provide a complete set of scientific functions. ‣Can replace Matlab but is not necessary faster (as Matlab uses extremely well optimised functions). ‣Documentation is human readable. Sunday, October 24, 2010 SUNDIALS SUNDIALS (SUite of Nonlinear and DIfferential/ ALgebraic equation Solvers) consists of the following four solvers: CVODE solves initial value problems for ordinary differential equation (ODE) systems. CVODES solves ODE systems and includes sensitivity analysis capabilities (forward and adjoint). IDA solves initial value problems for differential-algebraic equation (DAE) systems. KINSOL solves nonlinear algebraic systems. In addition, SUNDIALS provides a Matlab interface to CVODES and KINSOL, sundialsTB. Sunday, October 24, 2010 Open MP We all have now 2+ processors in our computer. www.openmp.org The idea is to annotate C source code to make it parallel, with close to no knowledge of traditional parallel framework like MPI. Sunday, October 24, 2010 vfgen A Vector Field File Generator: • Generate code for ordinary and delay differential equations. • Specify your equations once, and export to multiple file formats. • Generate analytical expressions for Jacobians and higher derivatives automatically. • Available export formats include MATLAB, Scilab, AUTO, GNU Scientific Library (GSL), SciPy, PyDSTool, XPP and more. Sunday, October 24, 2010 Processing Easy visualisation.... and programing. Now it’s up to you! Sunday, October 24, 2010 Python Numerical libraries • SciPy • Numpy • Rpy2 Machine learning libraries • mlpy • mdp • hcluster Visualization: • pylab (matplotlib) • mayavi Bioinformatics libraries • BioPython Takes 1 week to be up an running using the free book “Dive Into Python”. Sunday, October 24, 2010 Bioinformatics centre Acknowledgements Ole Lund, Morten Nielsen, Claus Lundegaard CBS The vaccine group Binf @ KU. BRIC @ KU. 14-06-10 Sunday, October 24, 2010 Boids - prettier. Sunday, October 24, 2010