SBML importer drops reversibility information for reactions not FBC format
Hello
I am trying to create a cobra model using sample SBML files downloaded from KEGG converter. The io method read_sbml_model is able to generate models from these files, but does not retain the reversibility attribute of reactions, instead setting all reactions as reversible because (I assume) upper and lower flux bounds are missing from the reaction declaration (SBML files not in FBC format). Is there an easy way to get around this? I could perhaps use the exporter to write back to SBML then edit reversibility and bounds information using the original SBMLs as reference, but would like to keep this rather messy solution as a last resort.
As an example, the XML header of an SBML from KEGG converter looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1">
and a reaction is defined as follows:
<reaction id="R00754" name="R00754" reversible="true">
<listOfReactants>
<speciesReference species="s62"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s67"/>
</listOfProducts>
<listOfModifiers>
<modifierSpeciesReference species="s9"/>
</listOfModifiers>
</reaction>
Also not sure whether this is a general problem for SBML files not in FBC format, but can not find any mention within the issues list. I am by no means an SBML wizard, so please forgive me if I have missed something obvious! Thanks
@davidtourigny This is indeed an issue. Yes, we are only relying on bound information for now. I wanted to do a round of SBML bugfixes in the next days and will fix this issue in the process.
Basically, there should be minimal information loss in a round trip. Losing reversibility information is not an option. Thanks for the report.
OK thanks @matthiaskoenig . I will keep on eye out for your updates!
Could you share an example model so I can debug the issue?
On Tue, Jul 28, 2020, 01:36 davidtourigny [email protected] wrote:
OK thanks @matthiaskoenig https://github.com/matthiaskoenig . I will keep on eye out for your updates!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opencobra/cobrapy/issues/976#issuecomment-664691984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG33OTKXXT66OAVVXNIRY3R5YFQXANCNFSM4PJKAMLQ .
Sure, here you go sbml_hsa00010.xml.zip. Others can be downloaded here
Hi @matthiaskoenig by no means an effort to push you, but I was wondering whether it has been possible to make any progress on this issue or if it appears more complicated than anticipated? Please let me know if I can do anything to help out. Thanks!