Porthmeus / MeMoMe

Metabolic Model Merging - a semiautomated way to merge genome scale metabolic models
Apache License 2.0
0 stars 0 forks source link

Is there way of checking in Python if an SBML file is valid #33

Closed Unaimend closed 1 year ago

Unaimend commented 1 year ago

Currently, we get weird errors somewhere in the parseMEtaboliteInfo function if we supply an invalid SBML file. This is not very user-friendly.

Porthmeus commented 1 year ago

Yes several:

  1. cobra.io.validate_sbml_model() is the simplest
  2. libsbml implements a validator as well, but it is less simple to use - check the documentation here
  3. You might check out Memote which is also python based and has an elaborate system to test metabolic models.
Porthmeus commented 1 year ago

Closes with #41 There is a function using the libsbml validator in the parseMetaboliteInfoFromSBML.py