opencobra / cobrapy

COBRApy is a package for constraint-based modeling of metabolic networks.
http://opencobra.github.io/cobrapy/
GNU General Public License v2.0
467 stars 218 forks source link

reading sbml models based on MetaCyc/KEGG data bases #1309

Closed Rotembartuv closed 1 year ago

Rotembartuv commented 1 year ago

Hi,

I'm currently working in cobrapy with CarvMe models based on the BIGG database and also community simulations with the MICOM package(based on cobrapy). I want to start working with fungal and yeast models. My models were constructed with the RAVEN toolbox and Kbase (CarveMe does not support the construction of eukaryotic genomes).

it seems like the cobrapy envairemnet is working only with BIGG database models. the models from other databases (Kbase/RAVEN) do not seem to work in the cobrapy environment (for example, when I read my model based on metacyc I get just 8 exchanges). I have some questions:

  1. is it a specific problem with my model, or the cobrapy is working only with BIGG ids?
  2. is there a conversion process you recommend?
Midnighter commented 1 year ago

In principle, cobrapy should be able to read any valid SBML model. Did you ensure that your other models are valid SBML?

matthiaskoenig commented 1 year ago

Yes, cobrapy works with all models in SBML. The issue that some databases/tools create invalid models or do not encode the information correctly. If the database/tool does not encode any exchange reactions/boundary species in SBML they cannot be read. Please check that your models are valid using the SBML validator: https://sbml.org/validator_servlet/

There were some issues with KBase formulas (which will not affect model simulation), https://groups.google.com/g/cobra-pie/c/nGS2bdedBMQ?pli=1

is it a specific problem with my model, or the cobrapy is working only with BIGG ids?

Specific problem with your model.

is there a conversion process you recommend?

Figure out the issues with your model(s). Some things are easy to fix, other issues such as non-unique identifiers (i.e. multiple objects have the same id are much harder). Often the underlying cause are bugs in the tools (RAVEN/Kbase) which should be addressed by the developers.