Metannogen Tutorial: Annotate existing SBML Files

This tutorial demonstrates how biological networks given as can be annotated with Metannogen.

Loading SBML networks into Metannogen

Please start Metannogen. You may use the following jnlp link: metannogen.php?networks=RECON1. You will see the following input form to specify the server URL or the local file. Please chose a file for storing the annotations on your computer or chose the demo project hosted on the server. Then press the green "Go" button to start the Metannogen session.

For testing we will rather use a smaller network instead of RECON1. Please open "Menu-bar>File>Import>Load read-only network from SBML file". There is a text box for the SBML files. Comment out existing lines by adding a leading "#" and add the following line:
      http://jjj.biochem.sun.ac.za/database/lambeth/Lambeth.xml
    
This network will then be loaded. A new Tab appears in the left part of Metannogen. This Tab contains the network as a browsable tree. Please find the reaction vgp.

Annotate a reaction

Open the context menu of the reaction "vgp" and activate the menu-item "Annotate reactions by new datasets". The new dataset is shown in the right half of Metannogen. It will have the same ID as the reaction, here "vgp". Both, the reaction and the annotation are linked by this ID. There is a large central text area. Please type some text there. Save the project and reopen Metannogen again. The text should be still there. Please find the ID-field and note that the dataset has the same ID as the reaction. Therefore the ID is annotating the reaction. The reaction has therefore a traffic-light-icon. You may change the ID and watch the icon to vanish. It comes back when the ID is changed back.

Create an XML attribute

To add XML elements, the text needs to be written like a variable declaration in computer languages. Please add to the large multi-line text-field:
      $MYATTRIBUTE="hello world"
    
which is equivalent to:
      $MYATTRIBUTE="hello"
      $MYATTRIBUTE+=" world"
    
Now lets see how this text is included into the XML. Open "Menu-bar>File>Export>Add Attributes to existing SBML file". A dialog appears with a button "Insert Metannogen annotations into existing SBML file". At the top of the dialog, you need to select the correct network in the choice menu. Then you can press the buttons "Add attributes to existing SBML". You will then get the slightly modified version of the original SBML file. The reaction will have the "hello world" attribute:
           <?xml version="1.0" encoding="UTF-8"?>
           <sbml  level="2" version="3" 
           ...
           ...
             <reaction id="vgp" MYATTRIBUTE="world"  name="Ph + GLY __> G1P " reversible="false">          
               <listOfReactants>
                 <speciesReference species="Ph_Undefined" stoichiometry="2" />
                 <speciesReference species="GLY_Undefined" stoichiometry="2" />
               </listOfReactants>
               <listOfProducts>
                 <speciesReference species="G1P_Undefined" stoichiometry="2" />
               </listOfProducts>
             </reaction>
           ...
    
In the above SBML output, the additional text is an attribute of the <reaction...>-attribute. If you want to insert text after the closing reaction </reaction> tag, you need to enclose the text in XML_BEGIN and XML_END.
      XML_BEGIN 
      Your text comes here 
      XML_END.
    

Creating RDF style annotations

Enter the following attribute declaration and watch the output.
      $IS_DESCRIBED_BY="hslv_ecoli"
    
The file http://www.bioinformatics.org/strap/metannogen/data/annotationFormats.txt contains the rule for converting $IS_DESCRIBED_BY= attributes. This file is always loaded. Own files can be added using the program option "-annotationFormats".

Concluding remarks

Two documents are merged, (I) the SBML document created with another program and (II) the annotations created by STRAP. That means that Metannogen does not alter the original SBML file. It just creates a new one which may serve as input for another step of network analysis. The advantage of having both kind of data separated is that the SBML document can be updated in the other program without losing the Metannogen annotations.

Here we loaded the network Lambeth from a web address. Alternatively, a local file on the hard-disk may be given. In this case Metannogen would notice any changes to this file would be automatically reload the network, whenever the file is modified. This is useful, when the network is annotated and designed at the same time.