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

Slides:



Advertisements
Similar presentations
Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
Advertisements

Intro to modeling April Part of the course: Introduction to biological modeling 1.Intro to modeling 2.Intro to biological modeling (Floor) 3.Modeling.
Process Control: Designing Process and Control Systems for Dynamic Performance Chapter 6. Empirical Model Identification Copyright © Thomas Marlin 2013.
Variants of Stochastic Simulation Algorithm Henry Ato Ogoe Department of Computer Science Åbo Akademi University.
Modeling and Computational Tools for Contemporary Biology By Jeff Krause, Ph.D. Shodor 2010 NCSI/iPlant CBBE Workshop.
Multiscale Stochastic Simulation Algorithm with Stochastic Partial Equilibrium Assumption for Chemically Reacting Systems Linda Petzold and Yang Cao University.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2011 –47658 Determining ODE from Noisy Data 31 th CIE, Washington.
COMPUTER MODELS IN BIOLOGY Bernie Roitberg and Greg Baker.
Stochasticity in molecular systems biology
Computational Biology, Part 17 Biochemical Kinetics I Robert F. Murphy Copyright  1996, All rights reserved.
Stochastic Simulation of Biological Systems. Chemical Reactions Reactants  Products m 1 R 1 + m 2 R 2 + ··· + m r R r – ! n 1 P 1 + n 2 P 2 + ··· + n.
Statistics.
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
Announcements Topics: Work On:
Estimation 8.
Experimental Evaluation
Numerical Solutions of Ordinary Differential Equations
Simple Linear Regression. Introduction In Chapters 17 to 19, we examine the relationship between interval variables via a mathematical equation. The motivation.
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
PART 7 Ordinary Differential Equations ODEs
Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Computational Biology BS123A/MB223 UC-Irvine Ray Luo, MBB, BS.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 9 Section 1 – Slide 1 of 39 Chapter 9 Section 1 The Logic in Constructing Confidence Intervals.
Random Sampling, Point Estimation and Maximum Likelihood.
Converting Macromolecular Regulatory Models from Deterministic to Stochastic Formulation Pengyuan Wang, Ranjit Randhawa, Clifford A. Shaffer, Yang Cao,
Section 8.1 Estimating  When  is Known In this section, we develop techniques for estimating the population mean μ using sample data. We assume that.
Lecture 4: Metabolism Reaction system as ordinary differential equations Reaction system as stochastic process.
Computational Biology, Part 15 Biochemical Kinetics I Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Stochastic modeling of molecular reaction networks Daniel Forger University of Michigan.
Workshop on Stochastic Differential Equations and Statistical Inference for Markov Processes Day 3: Numerical Methods for Stochastic Differential.
Rates of Reactions Why study rates?
Numerical Methods for Solving ODEs Euler Method. Ordinary Differential Equations  A differential equation is an equation in which includes derivatives.
Lecture 2 Basics of probability in statistical simulation and stochastic programming Leonidas Sakalauskas Institute of Mathematics and Informatics Vilnius,
Biol 304 Week 3 Equilibrium Binding Multiple Multiple Binding Sites.
Beginning Programming for Engineers
Simulation is the process of studying the behavior of a real system by using a model that replicates the system under different scenarios. A simulation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
EE102 – SYSTEMS & SIGNALS Fall Quarter, Instructor: Fernando Paganini.
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
Lecture – 3 The Kinetics Of Enzyme-Catalyzed Reactions Dr. AKM Shafiqul Islam
MA354 An Introduction to Math Models (more or less corresponding to 1.0 in your book)
Chapter 8: Simple Linear Regression Yang Zhenlin.
Biochemical Reactions: how types of molecules combine. Playing by the Rules + + 2a2a b c.
Intro to Simulink April 15, Copyright , Andy Packard. This work is licensed under the Creative Commons.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
CHAPTER 2.3 PROBABILITY DISTRIBUTIONS. 2.3 GAUSSIAN OR NORMAL ERROR DISTRIBUTION  The Gaussian distribution is an approximation to the binomial distribution.
SS r SS r This model characterizes how S(t) is changing.
MA354 Math Modeling Introduction. Outline A. Three Course Objectives 1. Model literacy: understanding a typical model description 2. Model Analysis 3.
CHAPTER- 3.2 ERROR ANALYSIS. 3.3 SPECIFIC ERROR FORMULAS  The expressions of Equations (3.13) and (3.14) were derived for the general relationship of.
ChE 452 Lecture 09 Mechanisms & Rate Equations 1.
Intro to Simulink Modified by Gary Balas 20 Feb 2011 Copyright , Andy Packard. This work is licensed under.
Lecture 9: PID Controller.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
R. Kass/W03 P416 Lecture 5 l Suppose we are trying to measure the true value of some quantity (x T ). u We make repeated measurements of this quantity.
The inference and accuracy We learned how to estimate the probability that the percentage of some subjects in the sample would be in a given interval by.
Announcements Topics: -sections 6.4 (l’Hopital’s rule), 7.1 (differential equations), and 7.2 (antiderivatives) * Read these sections and study solved.
Modelling Complex Systems Video 4: A simple example in a complex way.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
Fundamentals of Data Analysis Lecture 11 Methods of parametric estimation.
Study of Reaction Rates
OPERATING SYSTEMS CS 3502 Fall 2017
Chapter 7. Classification and Prediction
Chapter 7: Sampling Distributions
Chapter 2 ERROR ANALYSIS
Class Notes 18: Numerical Methods (1/2)
Introduction to Instrumentation Engineering
Factors that Affect Reaction Rate Constant
Presentation transcript:

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

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.

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

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

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

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

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

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

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

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

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

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.

Gillespie Algorithm Define Initial Conditions State Probability distributions Sample random numbers

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

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

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

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

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

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

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.

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?

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

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

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

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.

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

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

Mass Action equations  Ste2  * koff = 9 * 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 PMID * From a computational model. kon = 2 * 10 4 M -1 s -1, koff = 1 * s -1 (corresponding to a Kd = 500nM) was used. This these numbers were referenced to Yi et al 2003 PMID who used the same koff, but a kon 100x greater. Kofahl and Klipp 2004 PMID yeastpheromonemodel.org

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.

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?

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.

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

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.

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

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

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:

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:

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.

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.

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

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.

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:

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

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.

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

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.

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.

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.

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.

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.