Class CobraUtil


  • public class CobraUtil
    extends Object
    Contains some useful methods to manipulate 'COBRA SBML'
    Since:
    1.1
    Version:
    $Rev: 2390 $
    Author:
    Nicolas Rodriguez
    • Constructor Detail

      • CobraUtil

        public CobraUtil()
    • Method Detail

      • parseCobraNotes

        public static Properties parseCobraNotes​(idare.imagenode.internal.Services.JSBML.SBase sbase)
        Parses the notes of the given SBase element.

        The notes are expecting to have some 'p' elements with a content of the form 'KEY: VALUE'. The key will be used for the property name and the value will be the property value. The key is inserted even is the value is an empty String.

        Below are examples for a species and a reaction:

          <body xmlns="http://www.w3.org/1999/xhtml">
            <p>FORMULA: H4N</p>
            <p>CHARGE: 1</p>
            <p>HEPATONET_1.0_ABBREVIATION: HC00765</p>
            <p>EHMN_ABBREVIATION: C01342</p>
            <p>INCHI: InChI=1S/H3N/h1H3/p+1</p>
          </body>
        
          <body xmlns="http://www.w3.org/1999/xhtml">
            <p>GENE_ASSOCIATION: 1594.1</p>
            <p>SUBSYSTEM: Vitamin D metabolism</p>
            <p>EC Number: </p>
            <p>Confidence Level: 4</p>
            <p>AUTHORS: PMID:14671156,PMID:9333115</p>
            <p>NOTES: based on Vitamins, G.F.M. Ball,2004, Blackwell publishing, 1st ed (book) pg.196 IT</p>
          </body>
        
        Parameters:
        sbase - the SBase object
        Returns:
        a Properties object that store all the KEY/VALUE pair found in the notes. If the given SBase has no notes or if the notes are not of the expected format, an empty Properties object is returned.