draeger-lab / refinegems

refineGEMs is a python package inteded to help with the curation of genome-scale metabolic models (GEMS).
https://refinegems.readthedocs.io/en/latest/
MIT License
10 stars 1 forks source link

Add function to check biomass reaction consistency #81

Closed GwennyGit closed 1 year ago

GwennyGit commented 1 year ago

Reasoning The biomass function added by CarveMe has a score of 1.03 in the MEMOTE report. However, the score should be 1.0 or according to MEMOTE between 0.999 (1 - 1E-03) and 1.000001 (1 + 1E-06). Thus, a function to only check the biomass consistency would be a good addition to the refineGEMs tools. Additionally, I would suggest adding a function that directly normalises the stoichiometric values if the score is not between 1 - 1E-03 and 1 + 1E-06.

Implementation

GwennyGit commented 1 year ago

The biomass checks and coefficient normalisation were not added to the polish module as the functions from MEMOTE that could be used and adjusted require the model to be loaded with COBRApy and polish needs a model loaded with libSBML. Another reason to create an extra module for the biomass checks and coefficient normalisation is that the functions from MEMOTE could not be directly called/ imported with MEMOTE but needed to be copied. The functions were not only copied but also adjusted to fit the intention of the module better.

The new module is called biomass.

GwennyGit commented 1 year ago

With the next commit the tasks of this issue are fulfilled. However, due to the conversion from COBRApy to libSBML after the coefficients are changed in the biomass function, some information is changed in the model. This includes fewer SBO annotations in cases where two were present and missing notes. Thus, it might be better to rewrite the functions to work with a model loaded with libSBML or maybe there is a way to only change the coefficients without changing anything else. 🤔