SysBioChalmers / RAVEN

The RAVEN Toolbox for genome scale model reconstruction, curation and analysis.
http://sysbiochalmers.github.io/RAVEN/
Other
100 stars 52 forks source link

RAVEN >= v2.7.7 getModelFromHomology generates invalid GPRs from Recon3D #481

Closed pranasag closed 1 year ago

pranasag commented 1 year ago

Description of the issue:

I've previously used RAVEN v2.7.6 to extract GEMs using latest Recon3D version as the single template model. Usually, my next steps are to then export the .mat object with the new model, load it into COBRApy (cobra.io.load_matlab_model()) and export as a SBML file for further use. This all would go fine.

With the Recon3D as my template, I would get this warning about GPRs:

This kind of relationships should only be present in reactions catalysed by complexes of isoenzymes e.g.

  • (G1 or G2) and (G3 or G4) For these cases modify the grRules manually, writing all the possible combinations e.g.
  • (G1 and G3) or (G1 and G4) or (G2 and G3) or (G2 and G4)

For other cases modify the correspondent grRules avoiding: 1) Overall container brackets, e.g. "(G1 and G2)" should be "G1 and G2" 2) Single unit enzymes enclosed into brackets, e.g. "(G1)" should be "G1" 3) The use of uppercases for logical operators, e.g. "G1 OR G2" should be "G1 or G2" 4) Unbalanced brackets, e.g. "((G1 and G2) or G3" should be "(G1 and G2) or G3"

Now I have moved to v2.8.0, and have tried to run the model generation pipeline again. I get the same warning about GPRs, and then COBRApy fails to parse some of the GPRs, reporting an unexpected EOF:

SyntaxError: unexpected EOF while parsing
GPR will be empty

(times 300 or so)

Reading the changelog, I thought this has to do with the removal of OLD_ genes from the GPRs in getModelFromHomology (3rd fix in the log). So I have tested the same script again on v2.7.6 and v2.7.7. Indeed, v2.7.6 works fine, and v2.7.7-generated models have invalid GPRs. RAVEN exportModel() call with an SBML-format file as output also gets stuck on v2.7.7-generated models.

System information

THE RAVEN TOOLBOX

Checking RAVEN release 2.7.7 Latest RAVEN release available 2.8.0 Run git pull in your favourite git client to get the latest RAVEN release Checking MATLAB release 2019a Checking system architecture maci64 Make binaries executable Pass Set RAVEN in MATLAB path Pass

=== Model import and export ===

Add Java paths for Excel format Pass Checking libSBML version 5.19.0 Checking model import and export Import Excel format Pass Export Excel format Pass Import SBML format Pass Export SBML format Pass

=== Model solvers ===

Checking for LP solvers glpk Pass gurobi Pass cobra Fail Checking for MILP solvers glpk Pass While passing here, we do not recommended glpk for MILPs due to occasional inconsistent results gurobi Pass cobra Pass Set RAVEN solver gurobi

=== Essential binary executables ===

Checking BLAST+ Pass Checking DIAMOND Pass Checking HMMER Pass

=== Compatibility ===

Checking function uniqueness Pass

checkInstallation complete

I hereby confirm that I have:

edkerk commented 1 year ago

Would you be able to share the two mat-files, from 2.7.6 and 2.7.7?

edkerk commented 1 year ago

Could you please report if #482 solves your issue?

pranasag commented 1 year ago

Could you please report if #482 solves your issue?

Yes indeed, getModelFromHomology now works fine! Although the soplex fix did not work...