Download Links

Simulate 3D | SBW (Win32) | Bifurcation Discovery | FluxBalance
Showing posts with label combine. Show all posts
Showing posts with label combine. Show all posts

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.

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.