Closed Devlin-Moyer closed 1 year ago
Oh on further investigation, it looks like Cobrapy always makes reaction.subsystem
a list when reading in a YAML file, even if all reactions only have one subsystem, so the issue with being able to write the model as a .mat file is strictly a Cobrapy issue, but the discrepancy between the different Human-GEM file formats is still a problem independently of that.
As you correctly note @Devlin-Moyer, MAR01044
is a special case. Before implementing a fix, it would be good to revisit #356 where the idea of associating a reaction to multiple subsystems has been discussed.
fixed in #703
MAR01044
has two subsystems ("Heme synthesis" and "Porphyrin metabolism") inmodel/Human-GEM.yml
(on both the main and develop branches), but only one subsystem ("Porphyrin metabolism") inmodel/Human-GEM.xml
. It appears to be the only reaction that currently has two subsystems, and that it has had both subsystems since July 2021. I only just noticed it now because I got the latestmodel/Human-GEM.yml
from the develop branch and tried saving it as a .mat file using Cobrapy and got an error about reaction subsystems being lists.It is very easy for me to work around this, but since
MAR01044
appears to be the only reaction with two subsystems, and Cobrapy seems to assume (at least sometimes) that all reactions have exactly one subsystem, I figured y'all might want to change it.Code to reproduce aforementioned error: