SBML2xlr8r Reference Home

SBML2xlr8r[filename, options] reads an SBML file into an xlr8r model.


Requires xlr8r 0.25, MathSBML 2.5.25, and Mathematica 5.1

filename is the name of the SBML file.

options are any valid options for MathSBML`SBMLRead.

The return value has the form

     {xCelleratorNetwork→{reaction1, reaction2...},
         xCelleratorIC→{x1→val1, x2→val2,...}, 
         xCelleratorRates→{r1→v1, r2→v2,...}}

where reaction1,... are standard cellerator arrow forms; xi are cellerator variables defined in the reactions; vali is the initial value for cellerator variable xi; ri→vi is a Mathematica rule that should be applied to the system.

Example
        <<xlr8r.m
        <<mathsbml.m
        <<SBML2xlr8r.m
        ...
        m=SML2xlr8r[filename];
        net=xCelleratorNetwork/.m;
        ic=xCelleratorRates/.m;
        r=xCelleratorRates/.m;
        i=interpret[net]/.r;
        sim=run[i, initialConditions→ic, rates→r];
        runPlot[sim]
Implementation Notes
  • A more stable way to input SBML is to use py[xlr8r] to convert the SBML file to a pyxlr8r flat file and then the pyxlr8r convert function to generate a mathematica notebook containing the model. Pyxlr8r supports more features of SBML and is libsbml-based.

  • Events, Functions, and Algebraic Rules in the SBML Model are ignored because these concepts do not exist in xCellerator at the present time, although they may be added in the future.

  • Reactions are converted to xCellerator mass-action reactions or xCellerator user reactions.

  • In general the model is immediately xCellerator compatible:
            m=SBML2xlr8r[filename];
            n=interpret[ xCelleratorNetwork/.m ];           
            r=run[n//. (xCelleratorRates/.m), 
                  initialConditions→(xCelleratorIC/.m)];
    

    However, if algebraic rules, events, or functions are defined in the model the run command will either cause an error (because of undefined variables or missing information) or will produce results that the modeller did not intend.

  • Only SBML Level 2 is supported. Level 1 models should first be converted to level 2 using the online-converter at sbml.org

  • The followng SBML constructs have no meaning in xCellerator and will be ignored: units, compartmentType, speciesType, constraints and initialAssignments.

See Also:

[rev. 18 July 2012]