Download Links

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

Sunday, November 13, 2011

New SBML Translator Application online!

As second application I’m glad to announce the new SBML Translator application:

http://sysbioapps.dyndns.org/Translator

The application is a major redesign from the basic version.  Its features:

  • multiple file upload (with drag & drop for chrome and firefox)
  • translation of files via URL
  • pasting of SBML
  • Syntax Highlighting of the result
  • downloading of translation with proper mime-type / extension

The translators have been updated to ensure that assignment rules  are sorted correctly in the translation (an issue that seems to have caused problems in the past). As soon as the SBFC project comes along I plan to include their translators as well. As always a screencast says more than words:

Unable to display content. Adobe Flash is required.

As always I’d love to hear any feedback that you have!

Saturday, November 12, 2011

libSBML 5.2.0 released

This morning Sarah sent the announcement that a new version of libSBML is available for download from:
http://sf.net/projects/sbml/files/libsbml/5.2.0/ 
New this time around is that we also provide binaries for all the SBML Level 3 Extension packages. So if you are interested in providing software support for:
  • FBC
  • COMP
  • LAYOUT
  • GROUPS
  • REQ
  • SPATIAL
you can simply download your favorite binaries (including language bindings) from the experimental directory.

New Features

There are two new features I want to bring to your attention, that is the facility for custom validators and converters. By inheriting form SBMLConverter or SBMLValidator it is now possible for your application to quickly check for specific aspects of documents that is important to you.
Here just one example on how you could check that your SBML model does not contain Algebraic Rules or Fast reactions if your application does not support them.
   1: /** 
2: * Declares a custom validator to be called. This allows you to validate
3: * any aspect of an SBML Model that you want to be notified about. You could
4: * use this to notify your application that a model contains an unsupported
5: * feature of SBML (either as warning).
6: *
7: * In this example the validator will go through the model and test for the
8: * presence of 'fast' reactions and algebraic rules. If either is used a
9: * warning will be added to the error log.
10: */
11: class MyCustomValidator : public SBMLValidator
12: {
13: public:
14: MyCustomValidator() : SBMLValidator() {}
15: MyCustomValidator(const MyCustomValidator& orig) : SBMLValidator(orig) {
16: 
17: }
18: virtual ~MyCustomValidator() {}
19: 
20: virtual SBMLValidator* clone() const { return new MyCustomValidator(*this); }
21: 
22: virtual unsigned int validate() {
23: // if we don't have a model we don't apply this validator.
24: if (getDocument() == NULL || getModel() == NULL)
25: return 0;
26: 
27: // if we have no rules and reactions we don't apply this validator either
28: if (getModel()->getNumReactions() == 0 && getModel()->getNumRules() == 0)
29: return 0;
30: 
31: unsigned int numErrors = 0;
32: // test for algebraic rules
33: for (unsigned int i = 0; i < getModel()->getNumRules(); i++)
34: {
35: if (getModel()->getRule(i)->getTypeCode() == SBML_ALGEBRAIC_RULE) {
36:
37: getErrorLog()->add(SBMLError(99999, 3, 1,
38: "This model uses algebraic rules, however this application does not support them.",
39: 0, 0,
40: LIBSBML_SEV_WARNING, // or LIBSBML_SEV_ERROR if you want to stop
41: LIBSBML_CAT_SBML // or whatever category you prefer
42: ));
43:
44: numErrors++;
45: }
46: }
47: 
48: // test for fast reactions
49: for (unsigned int i = 0; i < getModel()->getNumReactions(); i++)
50: {
51: // test whether value is set, and true
52: if (getModel()->getReaction(i)->isSetFast() &&
53: getModel()->getReaction(i)->getFast()) {
54: 
55: getErrorLog()->add(SBMLError(99999, 3, 1,
56: "This model uses fast reactions, however this application does not support them.",
57: 0, 0,
58: LIBSBML_SEV_WARNING, // or LIBSBML_SEV_ERROR if you want to stop
59: LIBSBML_CAT_SBML // or whatever category you prefer
60: ));
61: 
62: numErrors++;
63: 
64: }
65: }
66: 
67: return numErrors;
68: }
69: 
70:
71: };
72: 
73: 
74: int
75: main (int argc, char *argv[])
76: {
77: if (argc != 2)
78: {
79: cout << endl << "Usage: addCustomValidator filename" << endl << endl;
80: return 1;
81: }
82:
83: const char* filename = argv[1];
84: 
85: // read the file name
86: SBMLDocument* document = readSBML(filename);
87: 
88: // add a custom validator
89: document->addValidator(new MyCustomValidator());
90: 
91: // check consistency like before
92: int numErrors = document->checkConsistency();
93: 
94: // print errors and warnings
95: document->printErrors();
96: 
97: // return number of errors
98: return numErrors;
99: 
100: }


Linux Packages

For this release we provide again DEB and RPM files with binaries compiled on CentOS 4.6 and Ubuntu 8. This means they use a libc version that is reasonably old and will not cause problems on newer distributions.

Listening to feedback from our users the default install prefix has been changed to /usr. And we also include language bindings in them.

The plan was to use the OpenBuildService (OBS),  but unfortunately I was not yet able to create binaries with language bindings for all different distributions. I hope we can sort this out for the next release.

Saturday, November 5, 2011

Introducing sysbioapps/Layout

Ever since the SBW applications have been pulled from sys-bio.org and are only available via IP I am working on a new version for each of these applications. Today I’ve made the new version of my Layout web application available:

http://sysbioapps.dyndns.org/Layout 

See it live:

Unable to display content. Adobe Flash is required.

Features

The new application has the same basic features as the old one:

  • upload of an SBML file
  • displaying SBML Layout / SBML Render Format
  • displaying JDesigner / JDesigner 2 / CellDesigner annotation
  • generating a layout
  • exporting images / SVG / PDF

New in this version:

  • multiple file support
  • Chrome / Firefox: upload multiple files
  • Chrome / Firefox: drag and drop files onto the web site to upload
  • support for SBGN-ML

Implementation

The new version has been implemented using ASP.NET MVC3  and JQuery / JQueryUI. The actual heavy lifting is performed by the SBML Layout Library. The PDF export is made possible through sbml2tikz, followed by a compilation by pdflatex.

As always any feedback is welcome.