march 19, 2002marco antoniotti nyu bioinformatics group1 simulation: software methods and biological...
Post on 30-Jan-2016
218 views
TRANSCRIPT
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Simulation:Simulation:Software Methods and Software Methods and Biological ProcessesBiological Processes
Marco AntoniottiNYU Courant Bioinformatics Group
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Outline
Simulation fundamentals Modeling
Modeling Tools Mathematical Tools (Differential Equations, Timed Systems) Languages
Software infrastructure and implementations Models of computations Numerics
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Outline (continued)
Tools General
Matlab, Mathematica, Maple, Macsyma Specialized
Discrete Event with Extensions Hybrid System Simulators
Biological Simulations E-CELL, VirtualCell
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Modeling
There are several frameworks that can be used for modeling Differential Equations (continuous) Discrete Systems
Finite State Automata Petri Nets Dataflow Diagrams
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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'
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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'
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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)
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
ODE Repressilator System
The repressilator system (Elowizt, Leibler 2000) comprises three proteins, LacI, CI, and TetR controlling each other.
TetR
CILacI
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
ODE Repressilator System
The repressilator system (Elowizt, Leibler 2000) is simply described as an ODE system (deterministic version):(i,j) = (lacI,cI) or (tetR,lacI) or (cI,tetR)
dm i
dt= miƒ
·
1ƒ p jn ƒ · 0
dpidt
= ¸ p i mi
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cell Population Model
There are different kinds of (Adult) Stem Cells Hematopoietic, Neuronal, Muscle, Epithelial
A Stem Cell differentiates into Committed Progenitor Cells, which in turn differentiate into Regular Cells (T-cells, Red Blood Cells, Skin Cells)
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cell Differentiation and Proliferation
Stem Cell Division/Proliferation
Asymmetric
Symmetric
Environmentally Asymmetric
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cell FSA
Ns = n. of Stem CellsNp = n. of Progenitor Cells
SymmetricDivision 2S
AsymmetricDivision
die
SymmetricDivision 2P
quiescent
Ns = Ns + 1
Np = Np + 1
Np = Np + 2Ns = Ns -1
Ns = Ns -1
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cells Population ODE Model
dN p
dt= 2¾ƒ ¹ N sƒ ÀN p
K p N p
K p
· p N p
dN s
dt= ¸
K s N s
K s
¾K p N p
K p
· s N s
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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, 1e5), (101, 1e5), ... (98, 1e5)>
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Simulator Template Architecture
System Specification
Simulation Engine
Simulation Results (Traces)
Trace Inspection Synchronous GUI Plotter Math Analysis
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Implementing a Simulator
The engine of a simulator is essentially a loop
loop for i from start to finishdo (evaluate next(i))
The nature of (evaluate next(i)) determines the type of simulator we are using
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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)
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Implementing a Discrete Event Simulator
SpecificationSources, 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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Implementing an ODE Simulator/Solver (contd)
Euler Method (unrecommended)
Runge-Kutta 4
ynƒ 1= ynƒ h F x n , yn
y n
y nƒ 1m1
m2
xn xnƒh2
xnƒ h
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Implementing an ODE Simulator (contd.)
Complete formulation of midpoint computations in Runge-Kutta 4k 1=hF x n , yn
k 2=hF x nƒh2, y nƒ
k 12
k 3=hF x nƒh2, y nƒ
k 22
k 4=hF x nƒh2, y nƒ
k 32
y nƒ 1= y nƒk 16
ƒk 23
ƒk 33
ƒk 46
ƒ O h 5
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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);endfunctionN0 = [50; 1000]; t = linspace(0, 15, 100)';N = lsode("f", N0, t);
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Running the code
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
A Finite Automata Language:Esterel
Consider the following example
?A
?B!O
?R
?R
?R
?B
?A!O
?A?B!O
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Esterel Rendition
The previous automata is rendered as
module ABRO:input A, B; output O;loop
[await A; await B];emit O
each Rend
Each transition happens at each tick
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Hybrid Systems
A Hybrid System is a computational tool that switches among different sets of ODE's accoding to a some conditions
y < k2
y > k1k1 > k2
dy/dt = 3 dy/dt = -1.5
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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 hif (any transition becomes enabled)
do switch ODE set
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cells PopulationHybrid 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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cells PopulationHybrid 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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cells PopulationHybrid 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)
Ns = Ns -1quiescent
die d(time)/dt = 1r(die) = random()
- ln(r(die)) < alpha * Ns * time
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Stem Cells PopulationHybrid System (contd)
One language that can be used to this end is -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))))
))
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
Problems with HS
There are several Numerical problems
Guard Crossings
y(t)
t
time step
(0, 0)
guard: y(t) < 0
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
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
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
The ModelCell Differentiation
Cell Differention (e.g. multipotent HSCs, Metcalfe et al. 1997)
C
V
G1
R
S
G2
M
G0
Apoptosis
G-CSFGMC-SF
IL-6IL-11
...
M-CSFGM-CSFO-CSF
IL3...
Otherfactors
March 19, 2002 Marco Antoniotti NYU Bioinformatics Group 1
The ModelCell Differentiation
Cell Differention (e.g. multipotent HSCs, Metcalfe et al. 1997)
G-CSFGMC-SF
IL-6IL-11
...
M-CSFGM-CSFO-CSF
IL3...
GM-ProgenitorsMacrophages
Granulocytes