draeger-lab / ModelPolisher

ModelPolisher accesses the BiGG Models knowledgebase to annotate SBML models.
23 stars 7 forks source link

COBRAparser partially fails to parse model #76

Closed mephenor closed 2 years ago

mephenor commented 5 years ago

Processing RECON3D.mat from https://github.com/SBRG/bigg_models_data:

We need to verify, if every field from https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md is present. Additionally, we need to check again, if functions from https://github.com/HebiRobotics/MFL are wrapped correctly, as this might also be an issue.

mephenor commented 4 years ago

Fixed ParseException for SMILES field. IllegalArgumentExceptions will always be thrown for enum variants missing in the model. however they are logged and don't cause a crash, so this should be fine for now. Getting rid of the would require to change the whole underlying parsing process and ModelField enum to something different. As annotation model fields have a format of e.g. metCHEBIID, is there a way to try to parse those dynamically and don't need to have them be present in the ModelField enum? I fear changes to the underlying parsing of fields based on enum variants would require a rewrite of some essential parts of COBRAparser and should probably be done (if at all) at a later time.

draeger commented 4 years ago

One would then probably have to use String identifiers instead. Maybe some could be predefined? This change could be a bigger one.

mephenor commented 4 years ago

Closing issue for now and opening another issue for the enhancement of COBRAparser when I start working on it.

Schmoho commented 2 years ago

I just added a unit test that confirms that the model can be parsed without throwing an exception. For the purposes of this release I consider this issue closed.