opencobra/cobrapy

[BUG] Error when validating AGORA2 Ecoli model with memote

Closed this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

I've tried to run Memote version 0.16.1 to validate a AGORA2 Ecoli model and got the following error:

critical: The model could not be loaded due to the following SBML errors.
error: Something went wrong reading the SBML model. Most likely the SBML model is not valid. Please check that your model is valid using the cobra.io.sbml.validate_sbml_model function or via the online validator at http://sbml.org/validator .
error: (model, errors) = validate_sbml_model(filename)
error: If the model is valid and cannot be read please open an issue at https://github.com/opencobra/cobrapy/issues .
error: Line 69642, Column 123 - #1006: XML content is not well-formed.
error: - Category: XML content, Severity: 2

I've checked the online SBML model validator and it says the document is a valid SBML Level 3 Version 1 file that uses the SBML Flux Balance Constraints (FBC) package, Version 2. They suggested using the BiGG validator that moved to Memote which said to open an issue in the cobrapy github.

Please, does anyone have any idea how I could validate this model? Thanks in advance!

Code sample

Code run:

memote report snapshot --solver cplex --filename Escherichia_coli_str_K_12_substr_MG1655.memote.xml Escherichia_coli_str_K_12_substr_MG1655.xml

The AGORA2 models can be found here: https://vmh.life/files/reconstructions/AGORA2/version2.01/sbml_files/individual_reconstructions/Escherichia_coli_str_K_12_substr_MG1655.xml

Hi. Some of the AGORA2 SBML models have some issues. Could you check whether any of the cases described in #1326 apply here?

Hi! Thanks for the reply! You're right. I think it's something with the xml encoder. First I tried to validade the xml file, but got an error. So, I've used cobrapy read_sbml to read the file and to write a cobrapy xml version of it. Memote could read this file without any problems! thanks again!