Suggested exercises and mini-projects
Following are exercises and mini-projects that were designed to help people get started with using SBML.
Idea: LibSBML examples in different languages
The libsbml library source code currently includes a few simple examples written in only two programming languages. Libsbml supports several other languages too. Exercise: pick one language you are interested in, and rewrite the libsbml examples in that language. Please make sure the code has comments so that people reading it can understand it more easily, and please write code that is portable to at least Linux and Windows. We will split the current libsbml "examples" directory into separate languages (e.g., "examples/java", "examples/perl", etc.) and incorporate your new example code in the appropriate examples/language subdirectory. Currently the languages missing from the examples are: Python, Lisp, MATLAB.
Idea: Better SBML output program
The current command-line-based readSBML and printSBML programs in the examples directory print only a small amount of information about an SBML model. Write an improved version of printSBML that outputs more information about a model. (But, maintain its ability to output to the terminal, so that it's maximally portable.) The output could, for example, include not only general information about the model, but also print a formatted list of the different components of a model (species, compartments, etc.) and their attributes.
Idea: SBML viewer applet
Idea: SWIG bindings for libSBML for other languages
Idea: Within-SBML translation facilities
Some model constructs can be expressed in more than one way in SBML. For example, a model can contain mathematical statements assigning values to named parameters, or the model can be written such that the numerical values themselves appear everywhere in the model where they are used. Some software tools cannot handle models containing assignment statements or other kinds of Rules, but can handle models that contain the values or other kinds of constructs substituted in. For these tools, the second style of model representation is preferable; the first style of model is inaccessible to them on the face of it, yet could in principle also be accessible to the tool if it had a means for interpreting the model and translating it into a more appropriate form. Write an SBML translator to perform certain types of these translations. Here is a list of ideas to start:
- Analyze a model's use of assignment rules, determine whether they can actually be substituted out ahead of time (e.g., the value is actually a constant), and make the appropriate changes or substitutions in the model.
Idea: SBML "normalizer" program
With the variety of SBML applications out there, there is some variability in the form of the SBML being written by different applications. Since it is unrealistic to assume that all the different tools will eventually use a common library like libSBML, we can assume there will always be different examples of SBML formatting and style. A simple aid would be to have a program that reads in SBML, "normalizes" it, and writes out the result. Currently, this can be done extremely simply by writing a program that calls on libsbml's reader function and then immediately calls libsbml's writer function. It could be made to work with Unix pipes, so that you could use it as part of a pipeline. This would be a very simple program to write, but would go a long way towards normalizing the form of the XML generated. Perhaps there are additional ways of normalizing, pretty-printing, and sanitizing SBML?
Idea: Validation in SBMLToolbox
Currently the SBMLToolbox does not validate a document before importing it into MATLAB. Write a MATLAB program that will locate the schema files and incorporate validation into the translateSBML function using libSBML.