MathSBML Home Page MathSBML Site Map

Model Builder: annotationToSBML

annotationToSBML[options] returns SBML for an annotation.

See also:

New in MathSBML version 2.3.0. Heirarchical annotations in version 2.3.29.
Option Default Description
namespace value of most recent call to setAnnotationNamespace Namespace (URL) to be used in annotation
package value of most recent call to setAnnotationPackage Name of package to use in annotation.
xml (none) contains symbolic SBML to be placed in the annotation. If not specified, all additional options will be treated as data for the symbolic SBML.


Input:  setAnnotationNamespace["http://www.stuff"]
        annotationToSBML[hello -> "goodbye", yes -> no]
Output: <annotation xmlns:bedrock="http://www.stuff">

Annotations can be specified heirarchically, as in the following:

Input:  setAnnotationNamespace["http://url"];
        foo -> {I -> {write-> SBML, like -> {apples -> red, bananas -> yellow, cherries -> red}}, 
                we -> {livein -> {submarine -> yellow, 
                                  house -> {size -> big, color -> red}}}}];
Output: <annotation xmlns:helloWorld="http://url">
          <I write="SBML">
           <like apples="red" bananas="yellow" cherries="red"/>
           <livein submarine="yellow">
            <house color="red" size="big"/>