Download Links

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

Friday, December 20, 2013

libSBML Python Bindings

For a long time we have received reports, that the bindings to some of the supported bindings are hard to build. Usually we would prefer to provide binaries, however in the case of some languages this is not feasible, as there are different versions (that are incompatible with each other) being used. For this reason we have decided to work on creating standalone source packages for python, ruby, perl and r bindings.
The first package that I looked into was python. The idea would be to create two flavors of the source packages, one with libSBML core + accepted packages (dubbed python-libsbml), and another that includes also all proposed packages (dubbed python-libsbml-experimental).
With these source packages, installing the python bindings is as simple as running:
python setup.py install
Thanks to the Open Build Service this also makes it possible to provide binaries for a variety of linux distributions for them. They provide even repositories, so that the packages could be automatically updated, when a new version has been released.

Source:
Linux Binaries:

Hopefully in time for the next release we want to add these packages to the standard repositories (like pypi) over. And so I would like to ask you for feedback on the packages so far. Thanks!

Thursday, November 28, 2013

Building LibSBML on Windows …

Building libSBML is really straightforward on all platforms. Especially with CMake. All one needs to do is to specify the dependencies. And while one of the parser libraries (libxml, expat or xerces-c) is surely available on every Linux or OS X system. It is sometimes difficult to track those binaries down for windows.

Since I upgraded my machine to use VS2013 today, I released new dependency archives on SourceForge. (for recent releases of Visual Studio (both in 32 and 64 bit and with / without static runtime)). The downloads are available from:

http://sf.net/projects/sbml/files/libsbml/win-dependencies

The binaries included are for the following libraries:

  • bzip2 v1.0.6
  • check v0.9.8
  • expat v2.0.1
  • iconv v1.9.2
  • libxml2 v2.7.7
  • xerces v3.1
  • zlib v1.2.3

Using the dependency archives

Please download the dependency archive, that matches your Visual Studio Version (i.e vs9 files, if you use Visual Studio 2008, vs11 files if you use Visual Studio 2012 ... ) as well as the build type (release / debug) and desired VS runtime (static runtime, vs dynamic (no extension)).

Then extract the file which will contain a folder libSBML Dependencies-1.0.0-b1-win32 for 32 bit, or libSBML Dependencies-1.0.0-b1-win64 for 64bit files.

Now checkout libSBML or download one of the release archives. Next create a build directory from the Visual Studio Command line. Ensure you have cmake in the path and run:

cmake -DLIBSBML_DEPENDENCY_DIR=<dependency dir> -DCMAKE_BUILD_TYPE=Release -DWITH_STATIC_RUNTIME=ON <source dir>

Here <source dir> is the libSBML source directory, and <dependency dir> the extracted directory. If you downloaded the debug archive, replace -DCMAKE_BUILD_TYPE=Release with -DCMAKE_BUILD_TYPE=Debug. In case you downloaded the file with dynamic runtime replace: -DWITH_STATIC_RUNTIME=ON with -DWITH_STATIC_RUNTIME=OFF.


Hope this helps …

Sunday, November 24, 2013

SBML Validation from SBW

The SBML Online Validator, currently represents the most comprehensive validator for SBML files. While we are working on a standalone version of it, it will be some time before it will be released. In the meantime I came across a nice Web Automation Framework (see http://watin.org/). That makes it very easy to test web applications. It was easy enough to wrap it into an SBW module, so that now all SBML files can be easily validated right from your favorite SBW Application:

LaunchOnlineValidator

I’ve pushed the project over to http://fbergmann.github.io/LaunchOnlineValidator/ if you like to see how that was done. Or grab the module right from SourceForge: SetupSBMLValidator_1.0.exe.

Thursday, November 14, 2013

libSBML 5.9.0 Released

Its official the new libSBML 5.9.0 is available immediately from source forge:

http://sourceforge.net/projects/sbml/files/libsbml/5.9.0/

There have been a number of changes. In the past months both the SBML Level 3 Qualitative Modeling Package, and the SBML Level 3 Layout Package have been released. From now on, they will be enabled and fully validated by every libSBML binary release.

And while there are many great new features (such as a converter that promotes all local reaction parameters to global ones, or a converter that attempts to infer units of elements), there are two new API introductions that I want to highlight below. Please see also the full release announcement.

ElementFilters: searching for elements

LibSBML 5.9.0 also introduces a new API, that makes it easier to search for specific elements in the SBML documents. You might be familiar with the SBase::getAllElements method, that until now would have returned all SBase elements below a certain element. So if you called it on a Event you would get a list containing of Trigger, Delay and EventAssignments. New is now, that getAllElements can optionally take an ElementFilter. In order to use the ElementFilter you would create a new class, that inherits from ElementFilter and implements one method:

virtual bool filter(const SBase* element);

This function can inspect an SBase element for its properties, and if it should be returned by getAllElements it would return true and false otherwise. This also works in the bindings languages, such as Python, Java or C#. So for example in C# if you would like a filter that filters for elements that contain Notes, you would implement the method like so:

public override bool filter(SBase element)
{
// return in case we don't have a valid element
// or the element contains no notes.
if (element == null || !element.isSetNotes())
return false;

// otherwise include it in the result
return true;
}

Then you simply pass that class into the call to getAllElements, and you would only receive elements with notes. Examples for this are in the examples folder of libSBML:



IdentifierTransformer: transforming elements


Another new concept included in 5.9.0 is the IdentifierTransformer class. This was initially motivated by the comp package, where often identifiers (SIds / METAIDs) would have to be renamed during flattening. Of course when you rename things, then you have to go through all references, to ensure that these would be corrected as well. To make this easier we included the IdentifierTransformer class. Similar as to the ElementFilter you would again inherit from that class and implement:

virtual int transform(SBase* element);

in order to use the transformer, you would first call getAllElements with the appropriate filter, to get a hold of all elements you would want to transform. and then go through them applying the transformer to the items. Of course this is useful even outside of comp. As example we include a transformer, that will updated all SBML Ids, to be as close as possible to their elements Name (by ensuring that all invalid characters such as spaces are removed from the name to represent a valid id):



Of course these transformers don't have to be used at all in the context of renaming identifiers. The general API also allows them to do pretty much any manipulations of the elements that you would like.

Sunday, November 10, 2013

Updated FluxBalance Tool

Today I want to announce a new version of the FluxBalance tool. New in this version is that it works better with SBW. By adding a new entry to the menu bar “Export L2”, it is now possible to export the Flux Balance problem designed to other SBW modules as SBML Level 2 Version 4 files with the FluxBalance annotation. Is the button not pressed the SBML Level 3 File with the official Flux Balance Constraints Package will be exported. The new installer is available immidiately from SourceForge under:

http://sourceforge.net/projects/sbw/files/modules/FluxBalance/

Screenshot 2013-11-10 16.09.45

Unfortunately, we are still not quite there for the next SBW release, last changes on JDesigner are in the process. In the meantime there is a new update for SBW please feel free to download the latest version.

Wednesday, October 16, 2013

Applying the Scientific Method to Simulation Experiments …

I’ve just finished a one hour Rosa & Co webinar, and thought to post the slides below. You might also be interested in their other webinars, you can find the webinar archive here.

Wednesday, September 25, 2013

Systems Biology Workbench 2.10.0 - RC2

We are still working on the next release for SBW. Some users commented, that the last release candidate did not work for them, having issues in JDesigner. As of right now a new Windows build is available, from the Update tool or:

http://128.208.17.26/fbergman/files/latest/SetupSBW.exe

image

Thank you again for all the reports so far, please keep them coming.

Monday, September 16, 2013

SED-ML Level 1 Version 2–Release Candidate

The COMBINE meeting has just started, and we finally made the release candidate for the SED-ML Level 1 Version 2 specification available. SED-ML L1V2 finally extends the simulation experiments covered by SED-ML to include any kind of repeat and perturbation experiment. Apart from that it also includes the possibility to fully parameterize simulations, by specifying algorithm specific parameters like relative and absolute tolerances of integrators. The specification is available online from:

http://tinyurl.com/sed-ml-l1v2-rc

On my end I’ve updated the libSedML, and the SED-ML Script editor and of course SBW to be able to simulate L1V2. Another major change has been applied to the SED-ML Web Tools that now also support L1V2, and are now also capable of simulating the repeatedTask concept with CellML additionally to SBML.

As always any feedback is appreciated.

SED-ML Logo 5

Sunday, September 1, 2013

Systems Biology Workbench 2.10 (RC1)

As hinted at, a couple of days ago, we are shortly before the release of the next version of SBW with enhancements for all associated programs. Today I want to announce a new release candidate. On SourceForge you will find installers for Windows, OSX as well as Linux (x86 & x64). You can download them from:

http://sourceforge.net/projects/sbw/files/sbw/2.10.0/rc1/

I’ve also created virtual machines & live images with SUSE studio, that are available online:

32bit OpenSUSE 12.3,
64bit OpenSUSE 12.3

Any feedback is appreciated.

SBW-Logo

Saturday, August 17, 2013

Preparing the next SBW release (2.10)

It has been some time since the last release. Of course we never stopped working, as you can tell if you look at the change log:

SBW Change log

Apart from major upgrades to JDesigner and Jarnac, there is full support for the newly released Layout package. Additionally, Level 3 models using the Hierarchical Modeling (i.e. comp) Package can be automatically flattened for use in our simulators. Also an import option has been added to many modules, so that COPASI files can be opened.

The new windows installer can be downloaded from:

Windows Installer

Or obtained from the update program.

SBW-Logo

Wednesday, July 24, 2013

SBML Layout Specification RC2

Finally, after a good 10 years since the first presentation of a layout extension to SBML, the specification has been sent to the SBML editors for approval. One might think it is actually quite easy to describe where something is, and it should not take all that long to agree on a bare minimum for a standard, but be that as it may, we are now in the final stretches. If you like, you could have a look at the specification:

SBML Layout Specification RC2

It is of course fully supported by libSBML. Now that the specification is in the approved format for L3 packages, including a whole number of validation rules, validation is currently added to libSBML and will be available from the Online Validator with the acceptance of the package. In the meantime you could use the

SBML RNG Online Validator

Software support is shaping up: SBW has been supporting SBML Layout since 2005, and COPASI has it enabled in publicly released builds since last year. Both software tools also import CellDesigner annotations! At last years HARMONY meeting the layout specification has received its biggest change, by adding a GeneralGlyph, that makes it possible to also layout elements, that previously where not possible. Support for that is available in the latest SBW builds,

SBML Online Layout Viewer

And within the COPASI codebase, to be released sometime soon.Here a screenshot, showing the exchange between COPASI & SBW of an SBML Level 3 model with a GeneralGlyph that represents an SBML Event, including Trigger and Event Assignment:

image

Saturday, April 27, 2013

Ninja to the rescue

Don't you hate all these long compile times? I've head of Ninja a long time ago, but never gave it much thought. In case you don't feel like following the page, Ninja is a replacement for make / nmake. So today I gave it a try:

Installation

Couldn't be simpler. I cloned the git repository, opened a VS command line, called bootstrap.py with python 2.7, and added the directory to the path.

Configuring libSBML

I figured libSBML makes for a great test project, at least on my machine a build of it with tests takes forever. So I configured a new build of libsbml, release, static runtime, with tests. Thus the configuration line is:

cmake -G Ninja -DWITH_CHECK=ON -DWITH_STATIC_RUNTIME=ON -DLIBSBML_DEPENDENCY_DIR=..\..\vs11_dependencies_32_static-release ..\..

and the build is ready to go. To collect timing information, i run using time:

\cygwin\bin\time.exe ninja

And *drumroll*, time reported: 0.00user 0.00system 2:29.59elapsed 0%CPU. If you know Windows C++ builds (on non SSD drives), you know they take forever, so having all these projects build in two and a half minutes is amazing.

counter example

Just so you know, here the counter example, of using NMake as distributed by VS11. Here the configure line is:

cmake -G "NMake Makefiles"  -DWITH_CHECK=ON -DWITH_STATIC_RUNTIME=ON -DLIBSBML_DEPENDENCY_DIR=..\..\vs11_dependencies_32_static-release -DCMAKE_BUILD_TYPE=Release ..\..

running timed build again leaves gives us: 0.00user 0.00system 8:31.14elapsed 0%CPU. A whole 6 minutes more!

More data

So I couldn’t stop there, a compilation of libSBML on OSX  took (again with tests) 1m55.769 (vs. 4m4.568 for the regular make, and 2m2.698 for make –j 4). With universal binaries (i386 + x86_64) that time doubles as expected. Not too much of a difference. But this is made up by the fact that the output of ninja displays all critical things like warnings an errors nicely.

Today I used ninja for COPASI. Just as example: CopasiSE + CopasiUI + java bindings builds in just 4 minutes, 28! As compared to the 24m28 that nmake was using.

It seems obvious that using Ninja definitely saves a bunch of time, especially when compiling on Windows. The next thing to try is to use it as external build tool in VS!

Thursday, April 18, 2013

Flux Balance Tools

For the Friday morning here a collection of links to software applications and databases all around flux balance analysis.

Tools
  • Systems Biology Workbench: While SBW does not in and of itself deal with flux balance analysis, it does make it easy to construct networks. And makes it easy to send models between applications.
    Download 
  • FluxBalance; An application to add constraints and objectives to SBML models and to evaluate them using LPsolve.
    Download
  • CBMPy: comprehensive python package for analyzing flux balance models. Installation instructions are here.
  • OpenCOBRA: MATLAB toolbox for genome scale reconstruction. Instructions on how to use are here.
WEB
  • F.A.M.E: Web based environment for Flux Analysis. With a tutorial here
Databases
  • KEGG Pathway: KEGG PATHWAY Database (used by F.A.M.E for visualization).
  • BIGG Database: Database of genome scale reconstructed networks. Among them the global reconstruction of the human metabolic network.


Wednesday, April 10, 2013

SED-ML Web Tools & COMBINE archive

A couple of days I've published the COMBINE archive project to github. Today, I'm proud to let you know, that you can now upload / download COMBINE archive also to the SED-ML web tools:

  http://sysbioapps.dyndns.org/SED-ML_Web_Tools/

If you rather try it offline on your Windows box, try the SED-ML Script editor:

  SetupSedML-win32-1.11.exe


Friday, April 5, 2013

COMBINE archive … an implementation

It has been quite some time ago, that the COMBINE archive was proposed it seemed a simple enough format. I had a library for some time, but was not yet sure where to read it. As with any format, if no files are around there will be no applications written to support them.

In any case, since the conversion is going again, I’ve decided to put all the information about the library, and an first version of a graphical frontend for it. As with any experimental frontend it is written again for Windows. The links below have the details:

About the User Interface

When you open an archive in the application, you will find the following layout:

image

On the left you find the list of files contained in the archive, separated by their type, currently only a limited number of the COMBINE standards is recognized and an even smaller number can be interacted with, but that will change in the future. When you select a file, the systems preview handler will be used to generate a preview, as you can see in the screenshot with the PDF. Also recognized are images, and websites. Can the format not be determined, the file will be displayed as plain text, which may or may not be helpful.

If an SBML file is selected, it will be displayed as plain text. But if you have SBW installed, you will see this pane on the top:

image

That will allow you to open the file immediately for simulation / editing with one of the defined favorite applications. Or you could choose any other installed SBW Analyzer. The next version will allow you to simulate SED-ML files, and view SBGN files … stay tunes! I’m also working on an online version for sysbioapps.

Monday, March 4, 2013

libSBML 5.8.0 Released

Just as follow up to the release of the SBML Level 3 Package for Flux Balance Constraints: we have now released a new version of libSBML, that includes the FBC package enabled in all binaries. That is not just the core library, but also all language bindings (including MATLAB). Particularly I want to highlight three features:

  • the first one is full validation: all validation rules have been implemented in libSBML and will be validated automatically on a checkConsistency() call on SBMLDocuments.
  • the other one are the converters: we have included converters from the COBRA annotation to the FBC package and vice versa. Examples are available online, or in the source archives including the package.
  • Finally, C++ documentation of the package is available online. While package documentation is not yet available for language bindings, they do use the same function calls, so the information is transferable.

See also the full release announcement for more information.

Thursday, February 14, 2013

SBML Level 3 Package for Flux Balance Constraints

It is official, the SBML Level 3 Package for Flux Balance Constraints has been released! In its first version it allows to efficiently store constraints of Flux Balance models along with objectives to be met.

image

You can find the full specification online under:

http://identifiers.org/combine.specifications/sbml.level-3.version-1.fbc.version-1.release-1

As of today the next release of libSBML (5.8.0) has gone into code freeze, that will include the FBC package, along with full validation and conversions from SBML Levels that use the COBRA annotations to SBML Level 3 models with the FBC package. This new version is bound to be released by the end of the month. In the meantime nightly windows builds can be found on our build server.

With this release I’ve also made a new version of my FluxBalance tool available. Version 1.7 now already uses the COBRA importer, and has been redesigned to efficiently compute flux balance solutions for even genome scale models (albeit the loading of these models still takes a while).

A big thanks to the SBML editors and the community to make this possible!

Sunday, February 10, 2013

New SBML Test Suite Database!

As you might have noticed there is a new online service available on sbml.org, the SBML Test Suite Database. We of course had the SBML Test Suite for quite some time, with an amazing number of 1196 tests (to date), that now also include tests for the Flux Balance Package and even Hierarchical Modeling. This new application lets you browse all these tests, filter for tests (for example: Show me all tests, that test ‘RandomEventExecution’) and  download a selection of tests right there.

2013-01-30_-_TestSuiteDB

At the heart of course is the capability to *upload* a zipped set of test results, and analyze them for yourself in a private area, and once you are happy with them have them published publicly for the world to see. I’ve am working on a new version of SBW, that uses the 5.7.0 version of libSBML. And here is what a result for RoadRunner would look like:

2013-01-30_-_TestSuiteDB_RR_Result

As you can see in yellow, RoadRunner will still not support AlgebraicRules, FastReactions or CSymbolDelay. However, libSBML will flatten comp models for RoadRunner, and so all comp tests that do not use the above mentioned elements will work just fine.

Wednesday, January 30, 2013

COPASI 4.9.45 Released

Just in time for last weeks COPASI workshop we released a new version of COPASI. This has been the first release I’ve seen since joining the team in March of last year. There have been a number of changes in this release, and I thought I would call out those, that help me the most. The first one definitely has to be the changes in plots. Starting with COPASI 4.9.45 you can go ahead and define line style and widths of curves (and points). To make that even easier, you can do so for multiple curves at once. So that should make it much easier to create appealing plots. Also the plot window has changed:
image
It now allows to toggle between log mode of the individual axes, without the need to re-execute the task. Also prominently featured is the Window menu, that finally allows you to quickly select the plot you were looking for.
Having been re-elected for another term as SBML editor, I can’t help but mention that more of the models you define in COPASI can now be shared with other SBML capable tools. Most notably COPASI now exports rates of compartments, species and global parameters (using a custom annotations) as well as the drawing of random numbers from uniform and normal distribution (again using a custom annotation). These annotations (see below for example) follow the approach I’ve outlined before (Though I adapted it to use a reference to the UncertML definition that people liked much better for some reason). The newest snapshot of SBW can readily import these annotations already!
Apart from these, this COPASI release features a first spring layout algorithm and import for CellDesigner annotations.
image
There also is a new cross section task, that you could use for bifurcation plots (rather than to define events to scan over yourself), but those will be part of a future post! In any case there are a large number of additional changes that will make working with COPASI quite a lot easier, so grab your version here:
And as promised, here the function definitions exported.
rateOf:
<functionDefinition id="rateOf">
  <annotation>
    <symbols xmlns="http://sbml.org/annotations/symbols" 
    definition="http://en.wikipedia.org/wiki/Derivative"/>
  </annotation>
  <math xmlns="http://www.w3.org/1998/Math/MathML">
    <lambda>
      <bvar>
        <ci> a </ci>
      </bvar>
      <notanumber/>
    </lambda>
  </math>
</functionDefinition>

Uniform:
<functionDefinition id="RUNIFORM">
  <annotation>
    <distribution xmlns="http://sbml.org/annotations/distribution" 
    definition="http://www.uncertml.org/distributions/uniform"/>
  </annotation>
  <math xmlns="http://www.w3.org/1998/Math/MathML">
    <lambda>
      <bvar>
        <ci> a </ci>
      </bvar>
      <bvar>
        <ci> b </ci>
      </bvar>
      <apply>
        <divide/>
        <apply>
          <plus/>
          <ci> a </ci>
          <ci> b </ci>
        </apply>
        <cn type="integer"> 2 </cn>
      </apply>
    </lambda>
  </math>
</functionDefinition>

Normal:
  <functionDefinition id="RNORMAL">
     <annotation>
    <distribution xmlns="http://sbml.org/annotations/distribution" 
    definition="http://www.uncertml.org/distributions/normal"/>
     </annotation>
     <math xmlns="http://www.w3.org/1998/Math/MathML">
       <lambda>
         <bvar>
           <ci> m </ci>
         </bvar>
         <bvar>
           <ci> s </ci>
         </bvar>
         <ci> m </ci>
       </lambda>
     </math>
   </functionDefinition>

Monday, January 28, 2013

libSBML 5.7.0 Released

I know I’m two weeks late by now, still I wanted to let you know that we released a new version of libSBML (be sure to have a look at the full release announcement). Since the last release the hierarchical modeling composition package was approved and thus for the first time the comp package is enabled in all binaries. So no matter which one you grab, you will be able to build comp models with it, and read and write them. Much work has gone into the flattening algorithm so that even if your software does not actually make use of the comp package yet, you could automatically flatten the model into a Level 3 core model. To make this possible even from the (otherwise from comp neglected) C API, we finally wrapped the libSBML Converter API for C (including the SBMLConverterRegistry). So now you can query for converters from all languages. Example conversions are available that demonstrate how to flatten the model for all binding languages. Just as example, given an SBMLDocument ‘doc’ all it would take to convert the model are these three lines (in C#)

var props = new ConversionProperties();
props.addOption("flatten comp", true, "flatten comp");
int result = doc.convert(props);

After that, the document will be flattened. And can be treated as a regular Level 3 model. (Though you might want to check for a zero result, just to make sure no issues crept up during the conversion (which would be logged in the error log)).


Perhaps one more word about ExternalModelDefinitions. LibSBML will automatically locate files on the *local* hard drive, relative to the document opened. If you are loading documents from string, and want this feature to be working, you can set the SBMLDocuments locationURI property. More generally the comp package includes a ResolverRegistry, where you can register your own resolvers. These resolvers basically allow you to return an SBML document for a given URI. This facility also would allow you to easily extend the resolvers to resolve documents from the web, from databases and other non-local sources. To demonstrate this, I wrote an example, the SBMLHttpResolverExample, that uses libCURL to download a model from any given website (with the caveat that the comp specification does not allow the inclusion of non-level 3 models, which means that all models from the BioModels Database are rejected for the time being. If you, like me, don’t particularly like that behavior, you might want to raise that issue with the comp working group).


Please grab the new version from SourceForge:


http://sourceforge.net/projects/sbml/files/libsbml/5.7.0/


Happy coding!


SBML logo