Simulation Software Methods and Biological Processes Marco Antoniotti
Simulation: Software Methods and Biological Processes Marco Antoniotti NYU Courant Bioinformatics Group
Outline ➢ Simulation fundamentals ➢ Modeling ➢Modeling Tools ➢ Mathematical Tools (Differential Equations, Timed Systems) ➢ Languages ➢ Software ➢Models infrastructure and implementations of computations ➢Numerics
Outline (continued) ➢ Tools ➢ General ➢Matlab, Mathematica, Maple, Macsyma ➢ Specialized ➢Discrete Event with Extensions ➢Hybrid System Simulators ➢ Biological ➢E-CELL, Simulations Virtual. Cell
Modeling ➢ There are several frameworks that can be used for modeling ➢ Differential Equations (continuous) ➢ Discrete Systems ➢Finite State Automata ➢Petri Nets ➢Dataflow Diagrams
Time ➢ The main issue behind all of these modeling frameworks is Time ➢ Consequences ➢What constitues progress ➢How do we implement simulators for systems that assume a different notion of `time'
Differential Equations ➢ Ordinary Differential Equations (ODE's) are a standard tool used to model physical, biological and engineering systems y'(t) = F(y(t), t) y(0) = k ➢ Time t is `continuous'
Discrete Models ➢ Finite State Machines ➢ Petri Nets ➢ Discrete Event Systems ➢A queue of `events' generated by some `sources' and processed by `components' ➢ Time is a usually a derived notion (e. g. by observing the sequence of events or a Wall Clock)
ODE Repressilator System ➢ The repressilator system (Elowizt, Leibler 2000) comprises three proteins, Lac. I, CI, and Tet. R controlling each other. Tet. R Lac. I CI
ODE Repressilator System ➢ The repressilator system (Elowizt, Leibler 2000) is simply described as an ODE system (deterministic version): (i, j) = (lac. I, c. I) or (tet. R, lac. I) or (c. I, tet. R)
Stem Cell Population Model ➢ There Cells are different kinds of (Adult) Stem ➢ Hematopoietic, ➢A Neuronal, Muscle, Epithelial Stem Cell differentiates into Committed Progenitor Cells, which in turn differentiate into Regular Cells (T-cells, Red Blood Cells, Skin Cells)
Stem Cell Differentiation and Proliferation ➢ Stem Cell Division/Proliferation ➢ Asymmetric ➢ Symmetric ➢ Environmentally Asymmetric
Stem Cell FSA Asymmetric Division Ns = n. of Stem Cells Np = n. of Progenitor Cells Np = Np + 1 Symmetric Division 2 S Ns = Ns -1 quiescent Ns = Ns + 1 die Np = Np + 2 Ns = Ns -1 Symmetric Division 2 P
Stem Cells Population ODE Model
Simulation Traces ➢ Running a simulation (numerically solving a set of differential equations) produces a trace ➢A trace is a sequence of vectors of values, possibly symbolic ➢ E. g. for the FSA Stem Cell Model we have <(100, 1 e 5), (101, 1 e 5), . . . (98, 1 e 5)>
Discrete Event Systems ➢ The notion of trace gives rise to a more low level notion of system. ➢ Discrete Event Simulators are defined in terms of the underlying timed traces and of their generators
Simulator Template Architecture System Specification Simulation Results (Traces) Simulation Engine Trace Inspection Synchronous GUI Plotter Math Analysis
Implementing a Simulator ➢ The engine of a simulator is essentially a loop for i from start to finish do (evaluate next(i)) ➢ The nature of (evaluate next(i)) determines the type of simulator we are using
Simulator Runtime ➢ The simulator runtime can be ➢ stopped ➢when stopped, one or more individual components can be instantiated (or retrieved) and activated ➢ restarted ➢when restarted, the simulation will proceed with the individual components behaving as if part of the overall simulation (this may be considered as a lens effect)
Implementing a Discrete Event Simulator ➢ Specification Sources, Computing Units and Sinks ➢ Sources: square wave generators ➢ Units: down samplers, logical operation ➢ Engine ➢A queue of pairs <time, value> ➢ Evaluators for the units ➢Each unit can sense if it has inputs
Implementing a FSA Simulator ➢ Specification ➢A set of Finite Automata ➢ Two possibilities ➢Construct a product automata and then simulate ➢Keep Automata separate and make simulation slightly more complex ➢ Engine ➢ check the set of all enabled transitions from the current state and produce the next state
Implementing an ODE Simulator/Solver ➢ Specification ➢A set of ODE's ➢ Engine ➢ Evaluate at discrete time steps the value of the function and of its derivative ➢Several different methods are available ➢ Euler ➢ Runke-Kutta
Implementing an ODE Simulator/Solver (contd) ➢ Euler Method (unrecommended) ➢ Runge-Kutta 4
Implementing an ODE Simulator (contd. ) ➢ Complete formulation of midpoint computations in Runge-Kutta 4
Stem Cell Population Octave (Matlab) Code ➢ The ODE formulation is function dn = f(N, t) alphap = 0. 01; alphas = 0. 01; beta = 5; gamma = 0. 2; theta = 0. 2; kappa = 0. 5; Ks = 1000; Kp = 10000; dn(1) = (beta * (Ks - N(1))/Ks - theta * (Kp - N(2))/Kp - alphas) * N(1); dn(2) = (Kp - N(2))/Kp * ((gamma + 2 * theta) * N(1) + kappa * N(2)) - alphap * N(2); endfunction N 0 = [50; 1000]; t = linspace(0, 15, 100)'; N = lsode("f", N 0, t);
Running the code
A Finite Automata Language: Esterel ➢ Consider the following example ? B ? A ? R ? B!O ? A? B!O ? R ? A!O
Esterel Rendition ➢ The previous automata is rendered as module ABRO: input A, B; output O; loop [await A; await B]; emit O each R end ➢ Each transition happens at each tick
Putting it all together ➢ How do we reconcile a high level modeling view with a low level continuous time based simulation? ➢ Hybrid Systems are one of the latest developments mixing Finite State Automata and Continuous Systems
Hybrid Systems ➢A Hybrid System is a computational tool that switches among different sets of ODE's accoding to a some conditions y > k 1 dy/dt = 3 k 1 > k 2 dy/dt = -1. 5 y < k 2
A Hybrid System Implementation ➢ The main loop of a Hybrid System simulation engine becomes let h = <some value> loop for i from start to finish do evaluate the current set of ODE's for one step h if (any transition becomes enabled) do switch ODE set
Stem Cells Population Hybrid System Formulation ➢ The Stem Cell ODE formulation is a deterministic and continuous approximation of the real (? !? ) model ➢ An Hybrid System formulation can be made closer to the discrete and stochastic counting nature of the model
Stem Cells Population Hybrid System (contd) ➢ We model the Stem Cell Population as a Hybrid System with only one differential (continuous) variable: time (time) ➢ Our system will therefore integrate d time / dt = 1
Stem Cells Population Hybrid System (contd) ➢ We associate to each transition an exponential decay rate ➢ The exponential decay rate represents the `rate' of an event in the population model (asymmetric division, apoptosis) quiescent die Ns = Ns -1 d(time)/dt = 1 r(die) = random() - ln(r(die)) < alpha * Ns * time
Stem Cells Population Hybrid System (contd) ➢ One language that can be used to this end is l-Shift (Simsek 2000, UC Berkeley) (defhybrid SC-behavior (). . . (: discrete ('quiescent : flow ((d/dt time) (random 1. 0)))) (: transitions ('quiescent 'die : when (<= (- (log r) (* alpha n_s time))) : do ((time 0) (n_s (decf n_s)))) ))
Problems with HS ➢ There are several Numerical problems ➢ Guard Crossings
Conclusions ➢ Simulations are a good tool for Modeling several systems, hence Biological Systems as well ➢ We saw different kinds of simulation paradigms ➢ continous ➢ discrete ➢ hybrid
Conclusions (2) ➢A simulation tool must be fitted to the problem at hand ➢ Proper modeling is always a prerequisite to produce data that can be analyzed by matching it with laboratory experimental results
The Model Cell Differentiation ➢ Cell Differention (e. g. multipotent HSCs, Metcalfe et al. 1997) M V G 2 G 1 R S G 0 C Apoptosis
The Model Cell Differentiation ➢ Cell Differention (e. g. multipotent HSCs, Metcalfe et al. 1997) GM-Progenitors Macrophages Granulocytes
- Slides: 39