Published June 23, 2016 | Version v1
Software Open


  • 1. California Institute of Technology
  • 2. ETH Zürich
  • 3. EMBL-EBI


MOCCASIN stands for "Model ODE Converter for Creating Automated SBML INteroperability". MOCCASIN is designed to convert certain basic forms of ODE simulation models written in MATLAB or Octave and translate them into SBML format. It thereby enables researchers to convert MATLAB models into an open and widely-used format in systems biology.

For more information about how to use MOCCASIN, please visit


The version 1.1.0 release features a major overhaul of the underlying MATLAB parser, as well as a substantial rewrite of the SBML/XPP converter code. The new system is much more robust in the face of a greater range of MATLAB inputs, although the types of MATLAB models it recognizes and can convert are still relatively limited.

The new MATLAB parser correctly parses much more of the MATLAB syntax, thus eliminating many previous parsing errors and failures. There are now hundreds of new test cases for different syntactic forms of MATLAB. The known cases of MATLAB syntax that are not yet handled are only the following:

  • user-defined classes are not yet supported at all
  • cell arrays are parsed in a limited way, and in particular, nested cell array references will fail
  • commas and spaces cannot be mixed in a row of an array: e.g., [1, 2 -3 +4] will fail to parse as expected
  • comments inside arrays are discarded
  • comments after continuations are discarded
  • continuations (i.e., ...) inside strings will cause the strings to be mangled
  • continuations in shell commands are not handled correctly

The MATLAB parser also implements a weak, heuristic form of "kind" analysis to try to disambiguate function calls from array references (which in MATLAB are syntactically identical). The inability of MOCCASIN to access the user's MATLAB environment makes it impossible for MOCCASIN to ever be able to do full kind analysis, but the heuristics take it very far for many use-cases in MOCCASIN's domain.

The update converter is more robust for more cases, and reports many more errors and failures of conversion. It takes advantage of more features of the XPP input syntax handled by BIOCHAM, allowing the final converted SBML output to be a more faithful representation of the input model. However, the scope of models it can convert has only widened slightly – the converter is not yet able to convert a greater range of MATLAB models than it did before. Handling a wider range of MATLAB inputs will require implementing solutions to such things as handling loops, handling if statements, loading .mat files, and converting array variables into scalar variables so that they can be expressed in SBML (which does not yet support array variables).

Despite these limitations, the converter is able to convert significant real-world models. As an example of the capabilities of MOCCASIN 1.1.0, it was used to convert model BIOMD0000000608 in BioModels Database. The original MATLAB model is 770 lines long and the converted form has 140 SBML reactions.


Files (29.4 MB)

Name Size Download all
14.6 MB Download
14.8 MB Preview Download