Download Links

Simulate 3D | SBW (Win32) | Bifurcation Discovery | FluxBalance

Saturday, November 14, 2009

Matlab Export Anyone?

SBW for a long time had facilities for exporting SBML models to Matlab and a slew of other formats. I have to admit I never really used the Matlab Export before, and so it came as a surprise when I heard that the export of SBML Assignment rules was broken. But good news, at least this export is now working just fine.

SBW Logo (short)-transparentSo let us look at some examples on how we would use it. For this let us construct a very simple model, a 3 step linear chain:

linear_chain

Here we set Node0 and Node2 to be a Boundary (fixed) Species, as they are not really part of the system. And we want Node0 to be controlled by an Assignment Rule, which sets the value of Node0 to ‘5’ starting at 1 second for 2 seconds. Outside this window Node0 should be close to zero (and I say close to zero and not zero so that the integrators will pick up the change). So this translates into a piecewise function:

Node0 = 5 if 1 < time < 3 and 0.1 otherwise

in SBML infix speak this translates into:

Node0 = piecewise(5, and(geq(time,1), leq(time, 3)), 0.1)

here of course piecewise, stands for the piecewise operation, note that you can have as many pieces as you’d want … for every piece you would add two terms, the value and a Boolean expression. The Boolean expressions supported are:

Name

Argument type

Explanation

and n-ary n-ary and like in the example above, it is 1iff all arguments are 1
xor n-ary n-ary xor, is 1 iff not all arguments are 1 or all arguments are 0
or n-ary n-ary or, is 1 if at least one of the arguments is 1
not unary is 1 if argument is 0 and 0 otherwise
gt(a,b) binary greater: is 1 if a > b
lt(a,b) binary less than: is 1 if a < b
geq(a,b) binary greater or equal: is 1 if a >= b
leq(a,b) binary less or equal: is 1 if a <= b
eq(a,b) binary equal: is 1 iff a == b
neq(a,b) binary not equal: is 1 iff a != b
piecewise( value, condition, otheriwse) n-ary piecewise function: each piece is defined with a value, condition pair and concluded with an value for the otherwise clause. all values and conditions can of course be function expressions as well.  

So let us look at the complete model in the JarnacLite language (this will allow you to just paste it into JarnacLite without you having to download the SBML model):

p = defn AsssignmentExport

var Node1;
ext Node0,Node2;

J0: Node0 -> Node1; J0_k*Node0;
J1: Node1 -> Node2; J1_k*Node1;

Node0 = piecewise(5, and(geq(time,1), leq(time, 3)), 0.1);

end;

p.Node0 = 0;
p.Node1 = 0;
p.Node2 = 0;
p.J0_k = 0.1;
p.J1_k = 0.1;

When in JarnacLite, a click on SBW\Translate SBML –> Any will bring up the SBML Translators, and a click on the Matlab tab shows you the newly translated model:

image

As you can see this model is complete with instructions on how to use it in Matlab. And here the good news it works in Octave as well! (you’d just download ode23.m and put it in the same directory and you should be good to go!) So all that is left is to save the file as .. say … AsssignmentExport.m into your Matlab work directory and run:

x0 = AsssignmentExport
[t, x] = ode23s(@AssignmentExport, [0 20], AssignmentExport);
plot(t,x);

and you should see a graph like this:

image

And here the disclaimer, I do know that you’d normally implement these sort of things as SBML Events, but so far we don’t export SBML events to Matlab, but you can always use roadRunner to have them simulated correctly.

So if you want to give this new version of the Matlab export a try, download a new Installer, or select Systems Biology Workbench\Utilities\Update SBW from an existing SBW installation. 

Friday, November 6, 2009

Changing Initial Concentrations the easy way

It’s been some time since I updated the SBW Simulation Tool, just to jog the Memory the SBW Simulation Tool, is the application, that will interact with all SBW enabled Simulators and makes it a snap to perform simulation experiments (be it time course simulations, steady state computations, pulse or scan experiments or even Frequency Analysis). Especially neat, if you ask me, is the Options\Slider feature, which basically attaches a handle to all parameters / boundary conditions of a model and allows you to quickly modify the current value and see what effect it has on the simulation you were performing.

image

Changing parameters and boundary conditions was great, but what about initial concentrations of all the floating species. Of course that is an operation that should have been there in the first place, and so *drum roll* here finally a version that makes it a snap to modify those values as well. So lets try it, lets take a simple bi-stable model like this one:

p = defn Bistable

var S1, S2;

$X0 => S1; k1*(1+x)/(1+k2*pow(S2,2));
$X0 => S2; k3/(1+k4*pow(S1,2));

S1 => $X0; k0*S1;
S2 => $X0; k0*S2;

end;
// initialize Parameters
p.k1 = 1; p.k2 = 1; p.k3 = 1; p.k4 = 1; p.k0 = 0.1;

// and initial conditions
p.S1 = 5; p.S2 = 5;

You’d paste the model above simply into JarnacLite and then click SBW\Simulation Tool: RoadRunner to get it into the simulator. And then select Options\Sliders … and now if you vary the initial conditions of S2 you see how the behavior changes … amazing, isn’t it?

Here the result for S1 = 4

image

and S1 = 6

image

Neat … just as an aside … remember to check the “Fix Y Axis” Checkbox! otherwise the experience is limited, as the graph will scroll the whole time to adapt to the values.

Monday, November 2, 2009

Systems Biology Workbench / Linux made easy

I’m just back from the monospace event, which by the way was really amazing. In his keynote Miguel presented SUSE studio, which makes it very easy to put together a Linux live cd, VMware image or USB images with your favorite Linux app.

testdrive-networking

Given the huge number of support requests I received for the SBW Linux versions, i thought it would make a good test case to put together a live CD for the last SBW version. Here the download links:

The Linux distribution is openSUSE (11.1) and automatic login is set up for user ‘sbw’ with password ‘linux’ which is also the admin password.

And here a screen cast of what the experience is like (For this i just downloaded the VMware Image above, extracted the archive (using for example WinRAR) and next started the VMware Image using VMware Workstation (a free VMware player is also available)):

Now admittedly, this is not yet working as smoothly as possible, I will polish the build process in time for the next SBW release and then all the remaining GUI glitches will be gone.

Monday, September 14, 2009

Debugging the Systems Biology Workbench

SBW Logo (short)-transparent Work on an SBW and JSim integration is in full progress. However the other day I came across a minor snag with the SBW Java bindings, for the life of me I couldn’t find out why we could not send a model from one application to another. On any other platform (OSX, Ubuntu, Windows), I would just have started the SBW Inspector, and called the methods from the UI, or I would have used PowerShell, or the CSharp interactive shell, or even IronPython to code against the SBW object model. However I was out of luck, I did not have the mono runtime available on that system. So it dawned to me that really there should be some sort of simple debugging tools available. Given that on the system the only thing I had available was Java, I went and wrote the simplest Java SBW modules to narrow down the process. I figured in case others have the same problem I might as well put them up here for grabs.

So how would you use those java classes:

  1. Download the SBWtest.tar.gz file
  2. Extract with: tar zxf SBWtest.tar.gz
  3. change to the directory: cd SBWtest

at this point you will find two jar files (SBWCore.jar and SBWCore-debug.jar). Those jar files are the SBW Java bindings. All the following commands will assume that you include them in your classpath. There are two jar files, the SBWCore.jar will silently do its work and SBWCore-debug.jar will work just the same but add tons of debugging information for when it is really needed. Usually you’d just use the SBWCore.jar, and only switch to the other one if something fishy is going on. Let us have a brief look at the java classes included in the archive:

ListModules This all this simple class does, is to connect to SBW, and get a list of registered modules and print them to stdout. Use with:

java –cp SBWCore.jar:. ListModules

This will print a list of module names, you will have the ‘unique’ module name, followed by an equals sign and then the human readable name.
ListRunningModules This class connects to SBW and lists all currently running SBW modules. Use with:

java –cp SBWCore.jar:. ListRunningModules
StartModule A simple java class, that will just start another SBW module, it expects one argument, the ‘unique’ name of an SBW module (the name before the equals sign in the ListModules output). Start with:

java –cp SBWCore.jar:. StartModule <moduleName>

for example:

java –cp SBWCore.jar:. StartModule edu.caltech.NOM

to start the SBML support module.
Analyzer The Analyzer class represents a simple SBW module by itself. It belongs to the ‘/Analysis’ category, and as such will when registered appear in the SBW module. It has one method, ‘void doAnalysis(string)’ which will take a string (usually an SBML model, when called through the SBW menu) and print it to the command line. As with all SBW modules, it takes one argument, either ‘-sbwmodule’ in which case it is launched as module, or ‘-sbwregister’ in which case it registers with the Broker (and it should be displayed with a call to ListModules as ‘testAnalyzer’). Use with:

java –cp SBWCore.jar:. Analyzer –sbwregister

to register, or with:

java –cp SBWCore.jar:. Analyzer –sbwmodule

to run it as module.
CallAnalyzer Finally there is CallAnalyzer, a simple class, that takes two arguments, the first is a ‘unique’ SBW module name (as given by ListModules) and the other is a fileName of a SBML file, which is read and passed to the SBW module. This basically mimics what will happen if an SBW analyzer is called from the SBW menu. Use with:

java –cp SBWCore.jar:. CallAnalyzer <moduleName> <fileName>

as in:

java –cp SBWCore.jar:. Analzer ~/SBML\ Models/BorisEJB.xml

I hope they will be useful for someone else … btw … turns out that the only thing that was not working as planned, was that the module in question was registered as SELF_MANAGED module instead of a UNIQUE one … so all is well with the bindings …

Wednesday, September 9, 2009

SBW FluxBalance Module – Step 2

Some time ago I’ve implemented a basic FluxBalance SBW Module. It never was that useful really, all one could do was to load an SBML file and to define a couple of constraints and objectives. So while Brett Olivier is visiting Seattle, we sat together and came up with a scheme to store this sort of Information. This resulted in the next version of the FluxBalance tool:

2009-09-09_-_FBA

This new version does not do much more than it did before, however now at least it stores the constraint and objective function in an SBML compliant annotation (which hopefully later on becomes an official SBML Level 3 package for flux balance analysis).

There is a new Windows Installer, that you can try right away …

Tuesday, September 8, 2009

RoadRunner and Events

Finally I’m back from this years ICSB. In discussions at the SBML Forum I noticed that the timing of events in roadRunner could be improved. RoadRunner is of course our high performance simulator, which is also available as web application on our home page. I’ve just finished the modifications on roadRunner and ran through the test suite again:

2009-09-08_-_TestSuite_-_NoAlgebraicNoFast

And while roadRunner still won’t support Algebraic Rules, the ‘fast’ flag on SBML Reactions or Delay Differential Equations, we now pass all other tests. (You might wonder about the isolated four points that in red scream that the event timing would be off. For full disclosure those are the test cases 408, 428, 684 and 849. In discussions with the COPASI team and Chris Myers from iBioSim it would seem that it is the test cases that are to blame.)

Windows users can get the new roadRunner installed from here, or by choosing “Systems Biology Workbench\Utilities\Update SBW” from the Start menu of an existing SBW 2.7.10 release. A new Linux and OSX release will be made later in the month, or early next month, when we hopefully have SBML Level 3.

Wednesday, August 19, 2009

SBW 2.7.10 Released

Finally, the  new version of SBW is released, just in time for this years ICSB. Here the full release announcement:

SBW-Logo We are pleased to announce the a release of the Systems Biology Workbench 2.7.10,

available from:

http://sys-bio.org

The Systems Biology Workbench (SBW), is a software framework that allows heterogeneous application components-written in diverse programming languages and running on different platforms - to communicate and use each others' capabilities via a fast binary encoded-message system. Our goal was to create a simple, high performance, open-source software infrastructure which is easy to implement and understand. SBW enables applications (potentially running on separate, distributed computers) to communicate via a simple network protocol.

The interfaces to the system are encapsulated in client-side libraries that we provide for different programming languages.

There are a number of significant changes in this release:

  1. Event support in Jarnac Lite, improved event support in roadRunner (and support for delayed events), improved display of discrete events in the Simulation Tool.
  2. Improved support for SBML Layout and proposed Render Extension, changes in auto layout module, adding of a SBGN style sheet based on SBO terms.
  3. Numerous bug fixes and usability improvements

For a full list of changes see: http://sys-bio.org/changelog

For a list of modules included with the Systems Biology Workbench and a description of what they do please have a look at http://jdesigner.sourceforge.net/

In case you are interested in instruction in how to use the Systems Biology Workbench join our tutorial at this year’s ICSB, for more information see: http://www.sys-bio.org/sbwWiki/tutorials/icsb2009

As always we appreciate any feedback from users send to: sbwteam@gmail.com

Thanks
- Frank (for the SBW Development Team)

Monday, August 17, 2009

Almost there – Next SBW Release

I’m finally in the final phase of testing the next SBW installer. Here the list of operating systems tested so far: Win 2000, Win XP, Vista, Windows 7, Windows Server 2003, Windows Server 2008, Fedora 11, Centos 4.6, Centos 5, Debian 5.0, Ubuntu 5, Ubuntu 9.04, openSUSE 11.1, Slackware 12.2 and of course OS X 10.5. All seems to be well and ready to go.

SBW-Logo So here the links to the current installers let me know if things need to change:

Of course things go sometimes horribly wrong, especially with … shall we say … not quite up-to-date linux installations. So here a couple of things to keep in mind:

  • get a new-ish MONO, it will help a lot the current version of MONO 2.4.2 is just amazing and it seems to be feature complete. Thus there is no real reason not to use it. Alas, for some distros it is really hard to get to a working MONO installation. If your system belongs to this category, have a look here, and download the 1.9.2 binary installer.
  • Some linux distros forsake a good and working Java installation with a gnu compiler, unfortunately our java modules do not play nice with it, in fact the post installation step is likely to fail if you have it as first java in your path. You’d be better of getting a nice JDK, like the one from SUN, or even the OpenJDK from your linux distro.
  • If you still have trouble with the post installation step, you don’t have to uninstall SBW, just run the post installation step manually as in:

    <sbw-2.7.10 dir>/register.sh <full path to sbw 2.7.10 dir> or 

    ./register.sh /home/fbergmann/SBW-2.7.10

    that usually works and if a step takes too long a friendly ps-ef followed by a kill –9, or even simply a

    killall –9 java, killall –9 mono, killall –9

    Broker works wonders. 

Cheers and on to more testing.

Monday, March 16, 2009

Re-release of SBW 2.7.9

Just a follow up on last weeks entry about Installation Problem of SBW 2.7.9 on Windows XP machines. The problem has now been resolved (by recompiling all C++ modules using VS 2003). And SBW 2.7.9 R2 is available for download from SourceForge.

SBW Logo (short)-transparent

Here the full change log:

Changes in Version 2.7.9 R2
===========================

This release is a re-release of SBW 2.7.9, that was necessary because some windows machines
had problems running the new version due to problems with the C++ Runtime. In this version:

- all C++ modules and libraries have been recompiled with MSVC7

- JacobianViewer: The JacobianViewer was recompiled to run on 64bit systems in the 32bit
  sub system.
- C# Inspector: BugFix: some UI-controls would not align properly when the window was resized.

FluxBalance Analysis with SBW

Herbert came across the LPsolve, a LPGL library for solving linear programming questions. Steady state flux balance analysis can be stated as linear programming question. This is what the new SBW FluxBalance module does:

image

You can load an SBML file, specify all flux constraints and your objective that is to be minimized / maximized and the module will solve the LP problem.

The prototype is available for download. In the near future this functionality will also be included in LibStructural.

Sunday, March 8, 2009

Installation problems of SBW 2.7.9 on Windows XP

SBW Logo-blackWhile away on conference I have heard of several issues installing SBW 2.7.9. I’m terribly sorry for the problem. A new installer will be issued end of next week, this will give me time to sort out the issue.

In order to make the current SBW 2.7.9 working all that is needed is to install the Visual Studio 2008 SP1 Runtime in fact the installer is attempting to install the runtime, but in the cases where the installation fails, this obviously did not work. To use this version of SBW 2.7.9 :

Again I’m sorry for the inconvenience.  The new version next week, will re-use an older version of the runtime, resulting in some loss of functionality, however it does not require the separate runtime installation.

Tuesday, March 3, 2009

Join us at SIGCSE 2009

I’ll be presenting new developments for the Systems Biology Workbench, as well as Athena, our CAD / CAM Software for Synthetic Biology at the 40th ACM Technical Symposium on Computer Science Education or short SIGCSE 2009. You can find us in Exhibit Hall A, at the Microsoft booth #201.

Systems Biology Workbench 2.7.9 released

We finally have a new release of the Systems Biology Workbench. Here the release announcement:

We  are pleased  to announce  a release  of the  Systems Biology  Workbench 2.7.9,

available from:

http://sys-bio.org

The  Systems  Biology  Workbench   (SBW), is  a  software   framework  that allows   heterogeneous   application    components-written   in     diverse programming   languages  and   running   on  different   platforms   -   to communicate  and use  each  others' capabilities via a fast binary  encoded -message system. Our goal was  to create  a simple, high  performance, open -source   software  infrastructure  which   is   easy  to  implement    and understand.  SBW enables  applications  (potentially  running on  separate, distributed computers) to communicate via a simple network protocol.

The interfaces  to the  system  are  encapsulated in  client-side libraries that we provide for different programming languages.

Of  primary focus  for this  release was  to improve  performance for  core SBW components.  Now roadRunner  as well  as all  AutoLayout procedures are much  faster than before. The ‘Simulation Tool’ now also allows  performing frequency  analysis experiments.  Much effort  has  gone  into making  sure that this release works  on the Win64 architecture. This release   includes also fixes for  Jarnac,  JDesigner and  most other applications  we deliver with the framework.

For  this Windows  release we  switched  to  a new  compiler. Thus  it  is recommended to uninstall  the previous version  of SBW prior  to installing this  release. It  is also    recommended   to    install   the    compiler runtime   components  from: http://shrinkster.com/14xc

For a full list of changes see: http://sys-bio.org/research/sbwChangelog.htm

As always we appreciate any feedback from users send to: sbwteam@gmail.com

Thanks

- the SBW Development Team

SBW Logo-black

Saturday, February 28, 2009

Frequency Analysis integrated …

For a long time now roadRunner has the capability to calculate the frequency response for the currently loaded model. Of course the functionality was never used, as it was not exposed in any of our interfaces. So for the upcoming release of SBW 2.7.9 I have integrated a Frequency Analysis Control with the ‘Simulation Tool’. What is different from previous applications that we had, is that now it is integrated with the environment, that is now it is possible to change the parameters, and interactively explore the frequency response. Of course the values can be exported directly to Excel (or your favorite CSV viewer), or printed. You could try it out in the release candidate to SBW 2.7.9.

image

What you see on the picture is that the simple linear chain model that we include with the SBW installation acts as a low pass, that is it will let a signal with low frequencies through, but not signals with high frequencies.

Simplifying Bifurcation Analysis

Update: I've corrected the download location for this program. It is available from:  here

All tools for Bifurcation analysis have always been a bit difficult to use. This was the motivation for a new frontend to Auto 2000. Below a screenshot showing the stability of BioModel #203.  All that was needed was to load the model, set the Parameter to ‘A’, change the End value to ‘100’, as i wanted to sweep the range [0:100] and then to press run. In the output i noticed that the value never quite reached ‘100’ and thus i increased the number of points. All in all, really easy to use.
image

Of course it needs more testing, if you are interested in it you can download it. As always it will require SBW to be installed. The program also works nicely on Linux (tested with Ubuntu 8.10), you need to drop me a line, and i can wrap that up. So far I did not have much luck getting it to run on OS X.