Cannot open A. baylyi SBML model

MarcoFondi
2012-09-13
2013-05-30
  • MarcoFondi
    MarcoFondi
    2012-09-13

    Hi folks.
    I'm trying to open the following model in MATLAB R2012a and Cobra 2.0.5

    http://www.biomedcentral.com/content/supplementary/1752-0509-2-85-S5.xml

    but I get the following error:

    Too many outputs requested.  Most likely cause is missing  around
    left hand side that has a comma separated list expansion.

    Error in convertSBMLToCobra (line 122)
            parameters = modelSBML.reaction(i).kineticLaw.parameter;

    Error in readCbModel>readSBMLCbModel (line 182)
    model = convertSBMLToCobra(modelSBML,defaultBound,compSymbolList,compNameList);

    Error in readCbModel (line 134)
                model = readSBMLCbModel(fileName,defaultBound,compSymbolList,compNameList);

    >> version]
    version]
           |
    Error: Unbalanced or unexpected parenthesis or bracket.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    hope you can help me on this.
    thanks in advance.
    cheers,
    m.

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-09-13

    There's a known bug with processing some sbml files through the cobra toolbox for matlab.

    The fastest way to resolve the problem is to read the sbml in cobra for python and then write the sbml file or use cobrapy for the basic analysis.

    from cobra.io import read_sbml_model, write_sbml_model
    tmp_model = read_sbml_model('1752-0509-2-85-S5.xml')
    write_sbml_model(tmp_model, 'model_for_cobra_toolbox.xml')

    then in matlab you can now read the model:
    clean_model = readCbModel('model_for_cobra_toolbox.xml')

    COBRA for Python
    http://sourceforge.net/projects/opencobra/files/python/cobra/0.2.0/

    Supporting Installers including spyder ide, scipy, numpy, pyglpk, …
    http://sourceforge.net/projects/opencobra/files/python/cobra/extra_installers/

     
  • MarcoFondi
    MarcoFondi
    2012-09-14

    Thanks, I'll try that.
    cheers.

     
  • MarcoFondi
    MarcoFondi
    2012-09-14

    Sorry but which version of cobra for python are you referring to?
    I'm using 0.2.0 but I can't import read_sbml_model and write_sbml_model. It seems they are not present within cobra.io.
    Am I using the proper version?

    thanks in advance.
    m.

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-09-14

    There's a good chance that you don't have libsbml installed or if you're using Mac OS X or GNU/Linux the libsbml python module's not in your python path or for MS windows you didn't select the python bindings when installing libsbml.  see install instructions: http://opencobra.sourceforge.net/openCOBRA/Install.html

    to check if you've got libsbml installed, in python type: import libsbml

    to make sure you've got cobra py 0.2.0 installed:
    import cobra
    print cobra.__file__
    print cobra.__version__

    to see what's in the io package:
    from cobra import io
    dir(io)
    from cobra.io import sbml

    good luck!

    one thing to note about the cobra toolbox for matlab is that you might have problems writing sbml files because the ids used in the toolbox are not necessarily sbml-compliant.

     
  • MarcoFondi
    MarcoFondi
    2012-09-15

    Thanks a million!
    I didn't have the libsbml python module in my python path. Now I can read the read the file with cobra py and correctly  import it in cobra toolbox.
    best.
    m.