readCbmodel error-sbml file

424 views
Skip to first unread message

Tony

unread,
Mar 26, 2012, 4:14:18 AM3/26/12
to COBRA Toolbox
Hi everyone,

When I tred to read sbml file, I got the following error.
Please let met know to solve it out



Error encountered during read.
No model returned.
??? Reference to non-existent field 'species'.

Error in ==> convertSBMLToCobra at 35
nMetsTmp = length(modelSBML.species);

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

Error in ==> readCbModel at 132
model = readSBMLCbModel([fileName
'.xml'],defaultBound,compSymbolList,compNameList);



Tony

Sarah Keating

unread,
Mar 26, 2012, 6:18:06 AM3/26/12
to cobra-...@googlegroups.com, Tony
Hi Tony

The code that reads an SBML file (which comes form libSBML) will fail to
read in a model if the sbml file itself is invalid.

Unfortunately in the Cobra code this sometimes means it tries to access
fields on an empty structure; which causes an error report.

The best thing to do is to use the SBML On-line validator at
http://sbml.org/Facilities/Validator/ to find out where your file is
invalid; fix it and then it will hopefully read into Cobra with no problems.

Sarah Keating
SBML Team

Shyam Bagaria

unread,
Jul 22, 2016, 5:38:03 AM7/22/16
to COBRA Toolbox, sgle...@gmail.com
Hi Sarah,

I am getting the similiar problem. The problem is 
??? Reference to non-existent field 'lb'.

Error in ==> readCbModel>checkReversibility at 165
selRev = (model.lb < 0 & model.ub > 0);

Error in ==> readCbModel at 151
model = checkReversibility(model); 

I did the same as explained by you here. The file, am using is an invalid SBML file which I checked at http://sbml.org/Facilities/Validator/index.jsp
The error is ErrorXML declaration not permitted in this location.
  1. Line 2 Column 6:

     

    <sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
How to overcome. Please help.
Thanks

Sarah Keating

unread,
Jul 22, 2016, 6:18:12 AM7/22/16
to cobra-...@googlegroups.com, sgle...@gmail.com
Hi Shyam

Unfortunately there is not enough information for me to tell you how to
fix the model. Could you send me the file directly and I will look at it.

If you really cannot send me the whole file, you could perhaps take out
some of the data. It does look like your error is related to the
structure of the document; not something sbml specific but I cannot be sure.

Sarah

On 22/07/2016 10:38, Shyam Bagaria wrote:
> Hi Sarah,
>
> I am getting the similiar problem. The problem is
> ??? Reference to non-existent field 'lb'.
>
> Error in ==> readCbModel>checkReversibility at 165
> selRev = (model.lb < 0 & model.ub > 0);
>
> Error in ==> readCbModel at 151
> model = checkReversibility(model);
>
> I did the same as explained by you here. The file, am using is an
> invalid SBML file which I checked
> at http://sbml.org/Facilities/Validator/index.jsp.
> The error is ErrorXML declaration not permitted in this location.
>
> 1. /Line 2 Column 6:/
>
>
>
> |<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2"
> version="4">|
>
> How to overcome. Please help.
> Thanks
>
>
> On Monday, March 26, 2012 at 3:48:06 PM UTC+5:30, Sarah Keating wrote:
>
> Hi Tony
>
> The code that reads an SBML file (which comes form libSBML) will
> fail to
> read in a model if the sbml file itself is invalid.
>
> Unfortunately in the Cobra code this sometimes means it tries to access
> fields on an empty structure; which causes an error report.
>
> The best thing to do is to use the SBML On-line validator at
> http://sbml.org/Facilities/Validator/
> <http://sbml.org/Facilities/Validator/> to find out where your file is
> invalid; fix it and then it will hopefully read into Cobra with no
> problems.
>
> Sarah Keating
> SBML Team
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "COBRA Toolbox" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cobra-toolbo...@googlegroups.com
> <mailto:cobra-toolbo...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages