Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some foundations of Cellular Simulation Nathan Addy Scientific Programmer The Molecular Sciences Institute November 19, 2007.

Similar presentations


Presentation on theme: "Some foundations of Cellular Simulation Nathan Addy Scientific Programmer The Molecular Sciences Institute November 19, 2007."— Presentation transcript:

1 Some foundations of Cellular Simulation Nathan Addy Scientific Programmer The Molecular Sciences Institute November 19, 2007

2 The alpha pathway: The system we study here at the Molecular Sciences Institute A full model of this system requires one simulation algorithm per chemical reaction.

3 There are two basic methods for simulating cellular systems. Stochastic Algorithms Differential Equations

4 Stochastic Simulation algorithms Use probabilities and the random numbers generation to generate a statistically accurate time course of the system. Define Initial Conditions State Probability distributions Sample random numbers

5 Gillespie Algorithm A B A A A B B B B B B B B B B B B C C A + + A B + AA A B C A well-mixed container. 3 reactions. B

6 Gillespie Algorithm B A A A B B B B B B B B B B B B C + A A B Propensity = 39 * p AB 3 * 13 ways this reaction can occur p AB = ‘intrinsic’ probability of the A + B reaction

7 Gillespie Algorithm A A A B B B B B B B B B B B B C Propensity = 6 * p AA 3 * 2 ways this reaction can occur p AA = ‘intrinsic’ probability of the A + A reaction AA + AA

8 Gillespie Algorithm A A A B B B B B B B B B B B B C Propensity = 13 * p BC 13 * 1 ways this reaction can occur p BC = ‘intrinsic’ probability of the B + C reaction C B + B C

9 Gillespie Algorithm A A A B B B B B B B B B B B B C Total propensity = propensity AB + propensity AA + propensity BC

10 Gillespie Algorithm A A A B B B B B B B B B B B B C Probability that the next reaction to occur given this state will be the ‘A + A’ reaction is Propensity of ‘A + A’ reaction Total Propensity 6 * p AA 39 * p AB + 6 * p AA + 13 * p BC

11 Gillespie Algorithm A A A B B B B B B B B B B B B C P(A + A) = P(B + C) = P(A + B) = 6 * p AA 39 * p AB + 6 * p AA + 13 * p BC 13 * p BC 39 * p AB + 6 * p AA + 13 * p BC 39 * p AB 39 * p AB + 6 * p AA + 13 * p BC

12 Gillespie Algorithm A A A B B B B B B B B B B B B C Sample the uniform distribution to determine which reaction fires next. Sample the exponential distribution to determine what time the next reaction will occur at.

13 Gillespie Algorithm Define Initial Conditions State Probability distributions Sample random numbers

14 Gillespie Algorithm Population of A starts at 3. Population of B starts at 13. Population of C starts at 1. State Probability distributions Sample random numbers

15 Gillespie Algorithm A = 3 B = 13 C = 1 Probability distributions Sample random numbers

16 Gillespie Algorithm A = 3 B = 13 C = 1 Sample random numbers P(rxn i ) = Propensity(rxn i )

17 Gillespie Algorithm A = 3 B = 13 C = 1 Random number generated. Suppose A + B->AB occurs P(rxn i ) = Propensity(rxn i )

18 Gillespie Algorithm A = 2 B = 12 C = 1 AB = 1 Random number generated. A + B->AB occurs P(rxn 0 ) = Propensity(rxn i )

19 Gillespie Algorithm A = 2 B = 12 C = 1 AB = 1 Probability distributions Sample random numbers

20 Gillespie Algorithm (standing in for all stochastic algorithms) Pros: Simulates things exactly, at the level of the individual molecules. Assumptions don’t break down in very small systems. Model behavior includes noise, which is often important in celluart behavior Cons: Very Slow compared with other methods because reactions only happen one at a time. Generates statistically accurate simulations, so multiple runs may be needed.

21 Differential Equations Equations that describe the behavior of objects over time in terms of their derivatives. Simplest example: Solving A car a starts from rest at position 0 at time 0 and travels with velocity v(t) = 10m/s * t afterwards. Where is it after 10 seconds?

22 Differential Equations A very common style of mathematical modeling: m1m1 m2m2 m3m3 N-body problem

23 Differential Equations Assumptions that differential equations make: All variables have continuous derivatives. Change to model state happens deterministically. There is no system noise.

24 A form of differential equations that model reversible chemical reactions. Mass Action equations A A AA A A AA forward backward

25 Mass Action equations Assumptions: Everything is well mixed. Reaction mechanism is very simple. Everything is in high enough concentrations so that lack of noise and continuous changes to populations of species are acceptable.

26 Mass action equations say that the rates of both the forward and backward reactions are proportional to the product of their concentrations raised to the power of their stochiometries. Mass Action equations A A The p’s are the proportionality constants that act as rate constants. B B The reaction 1A + 1B 1AB comes out to have equations

27 Mass Action equations  Ste2  On and off rates for mass action equations are determined Experimentally, and recorded at places like the alpha model wiki. yeastpheromonemodel.org

28 Mass Action equations  Ste2  * koff = 9 * 10 -4 s -1. Experiment was done using 35S-labeled pheromone at 22°C. TAME was used to prevent pheromone degradation, and cells were treated with NaN3 and KF to prevent growth and other energy-dependent processes. Kd was also measured, but later discounted by the same group. Jenness et al. 1983 PMID 6360378 * From a computational model. kon = 2 * 10 4 M -1 s -1, koff = 1 * 10 -2 s -1 (corresponding to a Kd = 500nM) was used. This these numbers were referenced to Yi et al 2003 PMID 12960402 who used the same koff, but a kon 100x greater. Kofahl and Klipp 2004 PMID 15300679 yeastpheromonemodel.org

29 Simulating mass action equations If we have a system composed of multiple mass action equations, we cannot find solutions analytically; we can (and must) solve them numerically. In general, systems of differential equations must be solved numerically.

30 Numerical methods for solving DiffEqs We saw before the simplest types of differential equations involve simple integrals. If we cannot solve the system directly, we can approximate a solution by using Riemann sums. A car a starts from rest at position 0 at time 0 and travels with velocity. What is its position after 10 seconds?

31 Numerical methods for solving DiffEqs By taking Riemann sums, we can approximate a solution to this differential equation. Where the error is Where M 2 is the maximum absolute value of f’’(x) on the interval.

32 Euler’s method as a numerical solution to mass action equations. Define Initial Conditions State Calculate derivatives Update state

33 Euler’s method as a numerical solution to mass action equations. State Calculate derivatives Update state A and B start at an initial concentration of 1M. AB starts at an initial concentration of 0M.

34 Euler’s method as a numerical solution to mass action equations. Calculate derivatives Update state t = 0 [A] =1M [B] = 1M [AB] = 0M.

35 Euler’s method as a numerical solution to mass action equations. t = 0 [A] =1M [B] = 1M [AB] = 0M. Update State Assume p on =.005 s -1 M -1 and p off =.001 s -1

36 Euler’s method as a numerical solution to mass action equations. t = 0 [A] =1M [B] = 1M [AB] = 0M. With a time step of.2 seconds:

37 Euler’s method as a numerical solution to mass action equations. t =.2 [A] =.999M [B] =.999M [AB] =.001M. With a time step of.2 seconds:

38 Euler’s method as a numerical solution to mass action equations. We have an error condition for solutions producted using this method: If If we expand y(t 0 + h) as a Taylor series around t 0 in h We get Error rises with h 2.

39 Euler’s method as a numerical solution to mass action equations. We can use this error condition to alter the step size as we go along, in order to minimize global error.

40 Other numerical methods There are other more complicated and more accurate methods for simulating differential equations. They all typically use current state to simulate into the future by small time steps. Some use a history of past state as well. Fourth order Runge-Kutta: Cumulative error is on the order of h 4

41 Other numerical methods Different methods can be particularly good for particular systems. (fewer steps, less error) A good ODE solver can combine different numerical methods and switch between them during simulation in order to maximize performance. Pros: Usually much faster than stochastic simulation Cons: Eliminates some biological information. Maybe oversimplifies the system.

42 Parameter Estimation We have a system of differential equations. We have measured most of the reaction constants, but a few are left unknown. We have done experiments that give us overall system input/output relationships. Our system can be represented as:

43 Parameter Estimation Parameter estimation here can be thought of as equivalent To trying to find the value of p that minimizes the function

44 Sensitivity Analysis The majority of parameters in pathway models aren’t known. Some parameters are more important than others. It would be nice to be able to find the really important ones, so that we can focus on energy on them. This is sensitivity analysis.

45 Sensitivity Analysis If we have our model Sensitivity analysis is trying to find parameters, such that the partial derivative is maximized.

46 Analysis Parameter analysis and sensitivity analysis can be used with models of all sorts, not just differential equations. Because the systems have to be solved numerically, solving these problems directly is usually impossible. Numerical methods for solving these problems must be used. Numerical methods for finding zeroes of functions. Numerical methods for function minimization.

47 Hybrid models We have seen examples of modeling using stochastic algorithms and modeling using ODEs. Both have strengths and weaknesses. If… Speed is important. We don’t believe noise is relevant. We can get by approximating integer populations as continuous concentrations. ODES are probably best. If…. Population numbers are low. Noise may be important. Stochastic algorithms are probably best.

48 Hybrid models When we want to make large models, some parts will probably be best represented with ODEs, others stochastic algorithms. Hybrid models are models that use both types of algorithms. Methods have been developed to simulate models that are built from both differential equations and stochastic equations. They amount to interpreting the process of solving differential equations numerically as a “discrete event process” in the same way that stochastic algorithms produce discrete events.

49 Hybrid models Simulating a hybrid model amounts to having a list of events that occur at discrete times. These events can either be stochastic events or corrections to differential equations. These events are executed in order and after each event, any dependent events are rescheduled. This type of modeling combines the strengths of both types of algorithm.

50 Conclusion Reactions can be modeled either using differential equations or stochastic simulations. Systems can be modeled using combinations of both types. Each has advantages/disadvantages. Numerical methods for solving systems of differential equations typically amount to extensions of methods you are familiar with: Riemann sums, the parallelogram method, approximation with Taylor series, etc. Analyzing model output often requires solving minimization And maximization problems, although these two must usually be solved numerically.


Download ppt "Some foundations of Cellular Simulation Nathan Addy Scientific Programmer The Molecular Sciences Institute November 19, 2007."

Similar presentations


Ads by Google