Download Links

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

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.