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.
Options
| 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="http://www.w3.org/1998/Math/MathML">
<apply>
<plus/>
<ci>x</ci>
<ci>y</ci>
</apply>
</math>
</assignmentRule>
Example 2: list of rules:
The input string:
ruleToSBML[{{type->"algebraicRule", math->x^2},
{type -> "rateRule", variable->y, math->2*x}
}]
returns
<listOfRules>
<algebraicRule>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<power/>
<ci>x</ci>
<cn type="integer">2</cn>
</apply>
</math>
</algebraicRule>
<rateRule variable="y">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<cn type="integer">2</cn>
<ci>x</ci>
</apply>
</math>
</rateRule>
</listOfRules>
Example 3: Experimental Array assignments
ruleToSBML[type->initialAssignmentRule,variableLink->{x->i},ArrayDimensions->{
i->{1,3}},data->{5,10,15}]
returns the following SBML:
<annotation xmlns:="">
<initialAssignmentRule>
<listOfDimensions>
<dimension id="i">
<upperLimit>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn type="integer">3</cn>
</math>
</upperLimit>
<lowerLimit>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn type="integer">1</cn>
</math>
</lowerLimit>
</dimension>
</listOfDimensions>
<variableLink object="x">
<listOfIndices>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<ci>i</ci>
</math>
</listOfIndices>
</variableLink>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<vector>
<cn>5</cn>
<cn>10</cn>
<cn>15</cn>
</vector>
</math>
</initialAssignmentRule>
</annotation>
Go to the top of this page