Closed tamascogustavo closed 5 months ago
Hi, this is because the model contains in valid GPRs. It's really old so they are contained in the notes which are usually not parsed by other tools at all, but cobrapy recognizes the legacy format and at least tries to read them. This is why other validators report no errors. But things like 2*Gene
are not allowed in SBML GPRs so it will fail parsing them here.
Those GPRs would also have led to errors with cobraoy 0.22 just not on reading them but later when you use the GPRs in gene deletions for instance where you would see a similar error message.
There is not much we can do here because the model itself contains those broken GPRs. You could remove the notes fields by hand or simply rename the GENE_ASSOCIATION
entry to something else so it does not get picked up by the legacy parser.
Hi @cdiener !
Thanks so much for the explanation, and for the feedback on how to deal with de GPRs.
Since it's not a BUG, I am closing it.
Best,
Tamasco
Is there an existing issue for this?
Problem description
what I was trying to load a SBML mode found on this paper: https://academic.oup.com/plphys/article/165/3/1380/6113226?login=false. The data is on the Supp.2
how I first tried to load the model, since i was getting the error, i decided to use the validate.
This is the captured error:
Uppercase AND/OR found in rule '2*(ATCG00020 AND ATCG00680 AND ATCG00280 AND ATCG00270 AND ATCG00580 AND ATCG00570 AND ATCG00710 AND ATCG00080 AND ATCG00550 AND ATCG00070 AND ATCG00560 AND ATCG00220 AND ATCG00700 AND (AT5G66570 OR AT3G50820) AND AT1G06680 AND (AT4G21280 OR AT4G05180) AND AT1G79040 AND AT1G44575 AND ATCG00690 AND AT3G21055 AND AT2G30570 AND AT2G06520 AND AT1G67740 AND ATCG00300)'.
I also tried to validate the sbml, and nothing was detected.
Solution I downgraded to version 0.22.1 of cobrapy and it was possible to load the model, without any issues.
Code sample
Arnold2014.xml.zip
Environment
Anything else?
No response