MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: ruleToSBML

ruleToSBML[options] returns an SBML rule definition

ruleToSBML[{{options},{options},...}] returns a <listOfRules .../> where each option list corresponds to the options for single rule definition.

ruleToSymbolicSBML[arguments] returns Symbolc SBML for a rule definition

New in version 2.1.5. Modified in 2.3.0, 2.4.18.


Option Default Description
type none type of rule: algebraicRule, assignmentRule, rateRule, orconstraintRule (L2V2 only).
variable none Required name of variable for assignmentRule, or rateRule.
math 0 Formula to use for the rule. Required.

Experimental Options

The following PROPOSED LEVEL 3 options are allowed if Arrays->True is set by the most recent call to newModel[]:
ArrayDimensions {} {i->{min,max},j->{min,max},...}
variableLInk {} {variable->{index1,index2,...}}
data {} List of data values to assign to array.

Example 1: Single rule definition:

ruleToSBML[type -> assignmentRule, variable -> x, math -> x + y]
returns the string
<assignmentRule variable="x">
 <math xmlns="">

Example 2: list of rules:

The input string:
ruleToSBML[{{type->"algebraicRule",  math->x^2},
            {type -> "rateRule", variable->y, math->2*x}
  <math xmlns="">
    <cn type="integer">2</cn>
 <rateRule variable="y">
  <math xmlns="">
    <cn type="integer">2</cn>

Example 3: Experimental Array assignments

returns the following SBML:
<annotation xmlns:="">
   <dimension id="i">
     <math xmlns="">
      <cn type="integer">3</cn>
     <math xmlns="">
      <cn type="integer">1</cn>
  <variableLink object="x">
    <math xmlns="">
  <math xmlns="">
Go to the top of this page