Conversion from SBML to XPP
XPP-Aut is a
numerical analysis software. It permits to solve differential equations, difference equations,
delay equations, functional equations, boundary value problems, and stochastic equations.
The java SBML to XPP converter is developed inside the System Biology Format Converter (SBFC) framework that will allow us and contributors to add easily new converter.
The framework is developed on sourceforge, see the System Biology Format Converter project pages.
Java Version
Quick Setup
Download and unpack the sbml2xpp-1.2.tar.gz file, move to the folder
that have been created and run:
./sbml2xpp.sh [file.xml | folder]
Will try to transform SBML (any *.xml files if you put a folder) into XPP
The output file(s) will be in the same folder as the SBML file(s) with an extension .xpp
Prerequisite
- java 1.5 or higher. You can find it here
- Apache Ant 1.6.5 or higher (only needed to build from source).
You can find it here
Build
If you want to modify the sources and build the jar file
just type on the sbml2xpp folder:
ant jar
to generate the jar file
ant javadoc
to generate the java documentation
Download
Getting Help and Support
Please send any help requests or bug reports to :
biomodels-net-support at lists.sourceforge.net
XSL version
Quick Setup
To generate an XPP-Aut ode file from an SBML model, run:
Xalan MyModel_sbml.xml sbml_xpp16.xsl > MyModel.xpp
You can download the XSL stylesheet in the section below.
Download
- sbml_xpp16.xsl
- xpp_math16.xsl
- xpp_test16.xsl
- xpp_variable16.xsl
- bounds16.xsl
Documentation
The conversion is performed in one XSLT pass, but using five stylesheets.
1. Test if we can convert this SBML model
We are calling several templates and running several tests to see if we can reasonably convert the SBML model.
- First we count the number of XPP parameters that would be created, and if this number is above 300, XPP will not be able to handle the file.
Xpp parameter are compartment, global parameter, species with their attribute constant=true and all local parameter, as they are always constant.
- Second, if there is any events we cannot convert the model. Also, the program was written for SBML level 2 version 1, so will disregard any
new SBML elements introduced since then.
- Third, we control the units of the model, if there is user-defined units that do not change an SBML built-in unit, we cannot currently convert this model.
- Last, we check the MathML to see if there is any user-defined functions or some MathML functions that we cannot handle in XPP, in that case we cannot convert the model either.
2. Writing the XPP file
Here is what we wrote to the ode file :
- all SBML ids are changed to comply to the XPP rules. In XPP id should be 9 character long maximum and we have to
put the local parameter in the same id space as all the others.
- the name of the SBML model as a comment, in general we put a comment for each SBML element that we include in the ode file
- we declare several functions used in the MathML expression and that do not exist by default in XPP, like root, power,..
- the compartment elements as para or init
- the global parameters elements as para or init
- the species elements as para or init
- d species/dt=ODE (if this species actually be affected by reaction/kineticLaw) (ODE should be concentration/time, but kineticLaw usually be substance/time, depending on species unit) (in ODE all the reaction/kineticLaw will be represented as RXNindex)
- rules
- reaction/kineticLaw
- we set several XPP values to be able to simulate the model
- done (the word "done" as to be written at the end of an Xpp ode file)
|