MathSBML

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.

Example


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

Annotations can be specified heirarchically, as in the following:

Input:  setAnnotationNamespace["http://url"];
        setAnnotationPackage["helloWorld"];
        annotationToSBML[
        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">
         <foo>
          <I write="SBML">
           <like apples="red" bananas="yellow" cherries="red"/>
          </I>
          <we>
           <livein submarine="yellow">
            <house color="red" size="big"/>
           </livein>
          </we>
         </foo>
        </annotation>
         




[07-23-04]