160
CHEMICAL AND BIOCHEMICAL KINETICS
6.8
Software
for
simulating
stochastic
kinetic
networks
Although it is very instructive to develop simple algorithms for simulating the dy-
namic evolution
of
biochemical networks using a high-level language such as
R,
this
approach will not scale well to large, complex networks with many species and many
reaction channels. For such models, it will be desirable to encode them in
SBML, and
then import them into simulation software designed with such models in mind.
Such
"industrial-strength"
simulators are often developed in fast compiled languages such
as C/C++, and written carefully to be memory efficient, accurate, and fast.
Tl)ere are many software systems available for simulating the continuous deter-
ministic kinetics corresponding to an
SBML model (many such packages are listed
on the
SBML.org web page). However (at the time
of
writing), when it comes to dis-
crete stochastic simulation there is less choice, and there are serious problems
of
lack
of
rigorous testing and inconsistencies in interpretation
of
SBML as one moves from
one software product
to
another. There are several reasons for this. The deterministic
framework has been around longer and is still more widely used than the stochas-
tic framework, and so
SBML was originally designed with continuous deterministic
modelling in mind and involved the authors
of
several
of
the standard determinis-
tic simulators. There is also a fairly sophisticated
SBML test suite for deterministic
simulators, which can be used to ensure the correctness
of
SBML interpretation and
simulator correctness in the deterministic case.
On the other hand, SBML Level 1
was not entirely appropriate for encoding discrete stochastic models (as discussed in
Chapter 2), and so developers
of
stochastic simulators had to either ignore SBML
or
adopt their own particular conventions for the interpretation
of
SBML. Although
it
is possible to correctly encode a discrete stochastic model in SBML Level 2 in
an
unambiguous way, there is little in the way
of
guidance on this issue in version 1
of
the specification, so the "Level 1 effect" has not yet gone away. This problem is
further compounded by the difficulty
of
testing stochastic simulators, and the lack
of
a good test suite for stochastic simulators. In response to this, I have co-developed
a test suite for discrete stochastic simulators that support
SBML
Level2
(there is a
link to it from this book's website).
It
consists
of
a range
of
simple models for which
direct analytic analysis
of
the implied stochastic process is possible (using a master
equation approach), together with time-course data on the mean and standard devi-
ation
of
the output that would be expected from many runs
of
the simulator on the
same model.
One simulator that passes most
of
the tests in the suite is a simulator
known as
gillespie2,
developed for the BASIS project, described in Kirkwood
et
al. (2003), and based on a core stochastic simulation engine I wrote in C. Another
well-known and highly regarded stochastic simulator is known as
"Dizzy," which is
written in Java. However, at the time
of
writing, it only accepts models encoded in
SBML Level 1 (in addition to its own native format), but this may well change in the
future. There is also a simple Gillespie simulation service bundled with the
Systems
Biology Workbench (SBW).