Search
Links and Functions
Language Selection
Breadcrumb Navigation
Home Software/Services FERN - A Java Framework for Stochastic Simulation and Evaluation of Reaction Networks
Main Navigation
Content
FERN - A Java Framework for Stochastic Simulation and Evaluation of Reaction Networks
FERN (Framework for Evaluation of Reaction Networks) is an extensible and comprehensive framework for efficient simulations and analysis of chemical reaction networks written in Java. It includes state of the art algorithms for stochastic simulation and a powerful visualization system based on gnuplot and Cytoscape.
Although FERN consists of more than 100 classes and interfaces,
most classes are basically just implementations of one of
three major interfaces and abstract classes.
The interface Network provides the network structure of the model.
The abstract class Simulator performs simulations on a Network . It additionally calls the registered observers during the simulation run.
The abstract class Observer traces the simulation progress and creates the simulation output.
FERN is freely available under the GNU Lesser General Public License (LGPL).
Download
Requirements
Colt
included with FERN
Jdom
included with FERN
libSBML (optional)
link
Cytoscape (optional)
link
CellDesigner (optional)
link
Changelog
1.3
First public release (BMC Bioinformatics paper)
1.4
Added Composition/rejection method
Documentation
How to use FERN
There are several ways of using the FERN: First and most important it is a library which can be utilized in other Java applications, either by just instantiating FERN's objects or by extending FERN's classes and thereby supplementing them with further functionality. Second, it has a command line interface for performing simulations and creating trend curves for a reaction network.
Furthermore, a Cytoscape plugin is included which makes it possible to run simulations and to observe the simulation progress in a reaction network in real-time from within the Cytoscape environment as shown below.
Example
Network net = new FernMLNetwork( new File ( "mapk.xml" ) ) ;
Simulator sim = new GibsonBruckSimulator( net) ;
IntervalObserver obs =
( IntervalObserver) sim.addObserver (
new AmountIntervalObserver( sim,10 ,"E0*" ,"E1*" ,"E2*" ,"E3*" ,"E4*" ,"E5*" )
) ;
GnuPlot gp = new GnuPlot( ) ;
gp.setDefaultStyle ( "with lines" ) ;
for ( int i= 1 ; i<= 100 ; i++ ) {
sim.start ( 1000 ) ;
if ( i<= 10 || i% 10== 0 ) {
gp.getCommands ( ) .clear ( ) ;
gp.addCommand ( "set title \" MAPK time course after " + i+ " repeats" ) ;
obs.toGnuplot ( gp) ;
gp.plot ( ) ;
gp.saveImage ( new File ( String .format ( "images/mapk%03d.png" ,i) ) ) ;
gp.clearData ( ) ;
}
}
This piece of java code creates images, below presented as an animated gif.
Code explanation
For a more comprehensive documentation of FERN's classes and their interplay, please refer to the documentation.
First, three object are created:
a FernMLNetwork is read from the file mapk.xml
a Simulator object is created containing the algorithm of Gibson and Bruck
a Observer, which is going to record the amounts of the species E0*-E5* every 10 time units; it is also registered at the simulator
Then, an object of the class GnuPlot is instanciated and configured, which is an interface to the popular tool gnuplot and a method for creating
time courses of molecular species.
Within the for loop, 100 simulations up to the time 1000 are performed. After some runs (e.g. the first 10 and then every 10th) a time course is created:
First, a meaningful title for the plot is set. Then, the simulation data is passed to the gnuplot object and is plotted therein.
Note, how the toGnuplot method behaves if it is invoked after multiple simulation runs: always the average simulation
data is passed to gnuplot (if you want only the recent one, you have to call toGnuplotRecent). Last, the plot is saved
as an image and the data is cleared from gnuplot (without clearing, every call toGnuplot would add another 6 data axes
and hence another six trend curves to the plot).
Contact
If you have questions or suggestions concerning FERN, please contact Florian Erhard
References
Service Menu
Footer