Closed RRohani closed 5 years ago
Welcome to cobrapy :slightly_smiling_face: It seems that the SBML exported is rather outdated. Gene associations should no longer be encoded in the <notes>
and also the parameters are encoded in a <kineticLaw>
. Both should be encoded using the SBML fbc
package these days.
So it's not your fault but the SBML is not up to par. There are two alternatives:
@Midnighter Great thanks so much! Will take a look at both :)
This issue looks resolved from my perspective. Please feel free to re-open if this continues to be a problem for you.
Apologies if this is actually a trivial error on my part - it's my first time playing around with COBRA / metabolic models.
I am using ModelSEED to generate a SBML model of Vibrio natriegens and then importing it using COBRApy. According to the ModelSEED website the model has 923 genes. However, the imported model has 0 genes. I think perhaps it is an issue with the model encoding or (less likely) the parsing of the file. I have tried looking through the source code but haven't been able to figure out the problem.
My code
Returns 0.
Example reaction encoding gene
Many thanks - and again sorry if it's my mistake
:-)