SBML2Octave

= Conversion from SBML to Octave =

Introduction

 * About SBML
 * SBML is a machine-readable format for representing models. It is oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML framework is suitable for representing models commonly found in research on a number of topics, including cell signalling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. If you want to know more, you can read the Basic Introduction on SBML


 * About Octave
 * GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab.

Documentation
The converter is based on JSBML, so support all the levels and versions of SBML until SBML level 3 version 1 core.

Most of the mathematical parts of the SBML model are converted into a set of declarations or equations that can be executed in Octave or Matlab.


 * SBML elements not supported
 * delay
 * constraint
 * initialAssignment
 * stoichiometryMath


 * Information lost in the conversion
 * compartment
 * units
 * sboTerm
 * notes
 * most annotations

Download
You can download SBML2Octave here: .

End users
To run SBML2Octave you need.

After unpacking the zipped file, move to the folder that have been created and run:

# Convert SBML (any *.xml files if you put a folder) to Octave. # The output file(s) will be in the same folder as the SBML file(s) with an extension .m   ./sbml2octave.sh [file.xml | folder]

File editing for Matlab
The generated m file using this converter works with Octave. If you decide to execute it with Matlab, you can either use the specific converter sbml2matlab, or you can edit this generated file directly by commenting / uncommenting some lines in the source code using the Matlab/Octave comment symbol '%'. In the latter case, you have to comment the Octave code and uncomment the Matlab code for: as shown below.
 * the ODE solver method; and
 * for the f function signature

ODE solver call: % Depending on whether you are using Octave or Matlab, % you should comment / uncomment one of the following blocks. % This should also be done for the definition of the function f below. % Start Matlab code tspan=[0:0.01:100]; opts = odeset('AbsTol',1e-3); [t,x]=ode23tb(@f,tspan,x0,opts); % End Matlab code

% Start Octave code %	t=linspace(0,100,100); %	x=lsode('f',x0,t); % End Octave code f function signature: % Depending on whether you are using Octave or Matlab, % you should comment / uncomment one of the following blocks. % This should also be done for the definition of the function f below. % Start Matlab code function xdot=f(t,x) % End Matlab code

% Start Octave code %function xdot=f(x,t) % End Octave code

Developers
To compile SBML2Octave from source, you also need Apache Ant 1.6.5 or higher.

After editing the source code you can build the jar file by just typing in the SBML2Octave folder: # Generate the jar file ant jar

# Generate Java documentation ant javadoc