SBW/BioSPICE - OpenWetWare
Download
Report
Transcript SBW/BioSPICE - OpenWetWare
Modeling with the Systems
Biology Workbench
Herbert M Sauro
Frank Bergmann
University of Washington
Department of Bioengineering
Seattle, WA
Why Develop Software?
1.
Basic simulation software can now be purchased off the self, a much cheaper option
that developing equivalent solutions in house.
2.
Reasons for Academia to development software:
1.
2.
3.
3.
New algorithms
New visualization techniques
New biological applications.
Pushing the envelope on software
provision in Systems Biology.
SimBiology – Matlab
(30+ man hours)
Topics
1. Modeling
2. Architecture
3. Using the software
Differential Equation Models
Basic System Equations
v = reaction rate
Let S be a
molecular species
in a cellular map
Molecule S
then the rate at which S changes in time is given by the equation:
Differential Equation Models
Simple example:
Model Definition
Stoichiometry Matrix
Species Vector
Rate Vector
Parameter Vector
What we Actually Use:
= Independent Species
= Reduced Stoichiometry Matrix
= Dependent Species
= Part of the ‘Link’ Matrix
= Conservation Vector Totals
An Example:
An Example:
An Example:
Why is Reduction Important?
Because it permits us to compute a non-singular Jacobian
Reduced Stoichiometry Matrix
Elasticity Matrix
Transfer Function
Transfer Function
Why is the Jacobian Important?
Steady-State
Stochastic
Time Course
Jacobian
Elasticities
(N
Kinetic Laws
N r L K C)
Stoichiometry
Model
SBML
SBW
Choosing Appropriate Rate Laws
Different kinds of rate laws for continuous modeling:
1. Mass-action
2. Aggregate Rate laws, e.g. Michaelis-Menten
3. Power Laws – S Systems
4. LinLog
Joseph Heijnen and Diana Visser
Delft University of Technology, The Netherlands
Choosing Appropriate Rate Laws
SBW Architecture
Module 1
SBW C++ Binding
Module 2
SBW Broker
SBW Java Binding
SBW is a
lightweight
framework that
allows different
applications written
in different
languages and on
different platforms
to communicate.
SBW C# Binding
Module 3
16
SBW Architecture
Module 3
SBW Java Binding
Module 2
SBW C# Binding
SBW
Broker
Module 1
SBW C++ Binding
SBW C++ Binding
Module 1
Module 2
SBW Java Binding
SBW Broker
SBW C# Binding
Module 3
17
SBW Architecture
Module 3
SBW Java Binding
Module 2
SBW C# Binding
SBW
Broker
Module 1
SBW C++ Binding
SBW C++ Binding
Module 1
Module 2
SBW Java Binding
SBW Broker
SBW C# Binding
Module 3
18
SBW Architecture
Module 3
SBW Java Binding
Module 2
SBW C# Binding
SBW
Broker
Module 1
SBW C++ Binding
SBW C++ Binding
Module 1
Module 2
SBW Java Binding
SBW Broker
SBW C# Binding
Module 3
19
Perspectives – Developer
reuse
functionality
provided by
other SBW
modules
C/
C++
Python
.NET
Supported
Languages
share
functionality
for use in
other SBW
modules
Matlab
Java
Delphi
/ Kylix
Windows, Linux and Mac OSX
20
Programmer’s Perspective
SBW
Broker
-Small application programming interface (API)
- Minimize the amount of work necessary to implement
- Libraries implement inter-program communications
- A registry of services for applications to query
- XML-based model representation (SBML)
- Modular, distributed, broker-based architecture
Uses a simple lightweight binary TCP/IP communication protocol
Message Structure
- Messages are passed as binary streams via TCP/IP
- Blocking and non-blocking calls
- Exception handling built-in
Supported types in the payload: Byte, Boolean, int, double, string, complex,
arrays, lists
Details on SBW’s internal architecture can be found at:
Sauro HM, Hucka M, Finney A, Wellock C, Bolouri H, Doyle J and Kitano H. (2003) Next
generation simulation tools: the Systems Biology Workbench and BioSPICE integration. OMICS.
2003 Winter;7(4):355-72.
Resource Structure
mathModule
Module Level
……
log
trig
…
Service Level
sin
log10
…
cos
ln
…
tan
exp
Demo Inspector
…
Method Level
Exposing methods
public class sbwInterface {
[Help("Returns the Sine of a value")]
public double Sin(double value) {
return Math.Sin (value);
}
}
Using Other Modules – VS Addon
C,C++,C#
Module Lib File
Example - Matlab
Building Matlab Services
function y = myAdd (a, b)
%SBW module SBWMath
%SBW service myService
%SBW method myAdd service myService sig=“double myAdd(double,double)”
y = a + b
Calling SBW from Matlab CLI
sbwconnect;
getSBML = sbwGetMethod (‘JDesigner’, ‘model’, ‘string getSBML()’);
sbwStr = sbwCall (getSBML);
Web Services from SBW/BioSPICE
A Web Application is provided that allows every SBW Module to be
wrapped up in a Web Service:
Web Service Generator web page available at
http://134.173.97.95/sbwwebservicecreatorinterface/webform1.aspx
Web Interface Example
http://134.173.97.95/simulation/webform1.aspx
Categories
Dynamically locate services in a given category
Categories permit SBW applications to recognize standard interfaces
in other SBW applications. We currently have three defined categories:
1. Translation
2. Analysis
3. Simulation
Categories
Translation
SBW applications that define the translation category are capable of
translating SBML into some other format (eg Matlab, XPP) and returning
the translation to the caller.
Analysis
SBW applications that define the analysis category are capable of accepting
an SBML model and by implication are capable of doing ‘something’ with the
model.
Simulation
SBW applications that define the simulation category mean they support
the simulation API.
User Experience
Categories permit users to ‘move’ seamlessly from one application to another
taking with them the model under study
SBW Menu
32
Perspectives – User
Script
based
Model
Editor
Oscill8
Script
based
Model
Editor
Simulator
Bifurcation
Discovery
Tool
Auto
Layout
Frequency
Analysis
Script
based
Model
Editor
Graphical
Network
Editor
33
Available SBW Simulators
Copasi
Stochastic
Simulators
Dizzy
Simulators
SBML ODE
Solver
Jarnac
roadRunner
Oscill8
34
Jarnac
XPP
Java
Matlab
SBML Layout
Extension
SBML Support
SBML Translators
CLAPACK
Struct Analysis
Auto Layout
Available SBW Modules
35
Examples – Model Editors
JDesigner
http://www.sys-bio.org/
cellDesigner
http://celldesigner.org/
Discovering Qualitative Behavior
Discovery Tool
Used to search for
possible oscillators
and bistable switches
in stoichiometric
networks.
The tool uses a search
technique based on
a genetic algorithm.
Discovery Tool
Specialist Modules:
Emery Conrad’s Oscill8 Interface
Implements the
Analysis category
so that models can
be accessed from
SBW.
Specialist Modules: Structural
Analysis Tool
Implements the analysis category.
Specialist Modules: Frequency
Analysis Tool
Implements the
Analysis
category and
permits the
frequency response
of a model
to be determined.
Specialist Modules:
Stochastic Simulators
Implements the analysis
category and permits
models to be simulated
using a stochastic solver.
Supports additional
analysis such as
PDF generation,
Power Spectra,
autocorrelation,
population metrics.
The GUI implements a
callback to the Gillespie
simulators to support the
progress bar.
Auto layout of SBML models
We use this tool to take raw SBML
and generate SBML containing the
layout standard that is being
developed by the SBML community.
Uses a spring and mass model to
determine layout. Has specific rules
for determining Bezier orientation
and Includes a gravity field to main
cohesion of disconnected subgraphs.
Anastasia Deckard
3D Visualization of Simulation Runs
Based on OpenGL, currently an installer is available for Windows
but the source is portable to the Mac and Linux. Requires a decent graphics
card for maximum gratification! ( http://public.kgi.edu/~fbergman )
3D Visualization of Simulation Runs
Based on OpenGL, currently an installer is available for Windows
but the source is portable to the Mac and Linux. Requires a decent graphics
card for maximum gratification! (http://public.kgi.edu/~fbergman )
3D Visualization of Simulation Runs
QT Based version
SBW Workflow for 3D Tool
Structural Analysis Module
Model Editor
SBML Module
Simulator
3D Interface
Availability
RoadRunner (Simulator)
X
X
X
X/X
X/+
X/X
SimDriver (Simulator GUI)
X
+
X
StructAnalysis Tool
X
+
X
Bifurcation Discovery Tool
X
+
X
Jarnac / JarnacLite
X
- /+
-/X
SBML Translators
X
X
X
3D Tool
X
X
X
JDesigner
X
-
-
Network Layout ( Service / GUI )
Example Usage
Acknowledgments
Frank Bergmann (SBW)
Ravi Rao (Structural Analysis)
Vijay Chickarmane (Bif Discovery Tool)
Anastasia Deckard (Docs, layout tool)
Sri Paladugu (libSBML intregration)
Mike Hucka and Ben Bornstein (libSBML)
Alan Hindmarsh (CVODE)
Nowak and Weimann (NLEQ)
LAPACK (NSF/DOE)
GTL
Availability:
www.sys-bio.org
http://public.kgi.edu/~fbergman
BioSPICE
Exposing methods
// create a new service
sbwInterface oService = new sbwInterface();
// create SBW module
ModuleImplementation oModule = new ModuleImplementation(
"edu.kgi.trig",
“Trig Module",
LowLevel.ModuleManagementType.UniqueModule,
"Provides Trig Functions");
// add the service to it
oModule.addService(
“trig",
“Trig Module",
"plugin/math/trig",
“Provides Trig Functions",
ref oService);
oModule.run(args);
Generic Simulation Interface
Any simulator that implements the Sim API (even level 1) will
automatically be able to use the interface via this generic simulation interface.
Those API methods that are not supported are disabled in the interface.