How can I load the BIGG universal model with COBRApy? #1296
Replies: 11 comments 1 reply
-
Might be related to #736 but would need a bit more diving into... |
Beta Was this translation helpful? Give feedback.
-
It's due to a more recent change #930 where we moved to more consistent formats but once again didn't account for file format backward compatibility. 😞 I guess an annoying workaround would be to load the JSON with an older version of cobrapy, write it to SBML, and then load it again in the latest version if you need the latest version of cobrapy at all. |
Beta Was this translation helpful? Give feedback.
-
The workaround (loading the JSON model with cobrapy v.0.17, but saving as SBML) isn't quite working for me.
Example script here |
Beta Was this translation helpful? Give feedback.
-
In your notebook, you load the model successfully. Did you try to write it to SBML it without modifying the reactions' annotation attribute? |
Beta Was this translation helpful? Give feedback.
-
No, after loading the model & before saving as SBML, I removed the annotation attributes as follows (lines 9-10 in the error message above):
|
Beta Was this translation helpful? Give feedback.
-
Okay, I think we need to implement a better solution here. Probably, a wrapper that can upgrade old JSON versions to the newer format. |
Beta Was this translation helpful? Give feedback.
-
Is BIGG still alive? It looks like it has been abandoned at this point... The easiest solution would still be for them to update the universal model... |
Beta Was this translation helpful? Give feedback.
-
No idea, if it's still alive tbh. It's probably not worth the effort but I feel personally responsible for the current JSON reading mess. |
Beta Was this translation helpful? Give feedback.
-
I mean we could just convert the annotations in the JSON to the new standard and provide a repaired one then. |
Beta Was this translation helpful? Give feedback.
-
As a workaround, I added a fixed version to our wiki. |
Beta Was this translation helpful? Give feedback.
-
I also encountered this problem, so I wrote some code to modify the JSON file provided by BIGG. After testing, the output file can be loaded with Cobrapy.
|
Beta Was this translation helpful? Give feedback.
-
Trying to load the latest
universal_model.json
file from BiGG returns the following error:Beta Was this translation helpful? Give feedback.
All reactions