-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cobra.io.write_sbml_model does not write reaction.subsystem to xml file #473
Comments
Can confirm. Currently we only write annotations and ignore notes and the somewhat special "subsystem". Since there is no DB in identifiers.org that takes a pathway name directly it would have to go into notes. For instance the SBML 3 AGORA models use the following <notes>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>SUBSYSTEM: Lysine metabolism</p>
<p>Confidence Level: </p>
</body>
</notes> |
Ok. Sounds good. |
Just as a note, we had a discussion about saving subsystems some time ago in: #229 |
@JuBra thanks for the cross-link. That is indeed a much more qualified discussion about he topic. Seems complicated. I agree with @aebrahim that the best solution would be using the annotations, however that would require mapping the legacy subsystem to some database. I will look around if I find a suitable ID system for that. The problem with the notes field is that it is not parsed by the SBML3 parser since it is supposed to be consumed by humans as is (thus the HTML formatting). So if I remember previous discussions with Ali correctly cobrapy is not supposed to parse the notes field and the fact that this is done in the SBML 2 parser is more of a hack to enable something annotation-like in the annotation-less SBML 2. Edit: Upon review there is no good way to map the subsystem to existing MIRIAM resources. Most are simply to incomplete and there are also subsystems such as "sink reactions" which you will never find in those databases. I think the major problem is that SBML has no format for human-specified information that should be machine-readable (it only support machine-machine and machine/human - human)... |
After some discussion it seems that the SBML maintainers recommend using groups for that feature, so this issue will be superseded by #543. |
OS: Windows 10
cobra version: 0.5.11
python version: 3.5.2
Ass the title says, all reactions have a subsystem attribute, however this attribute is not stored when using write_sbml_model(). It is the same with the notes attribute. If set the flag use_fbc_package = False, the subsystem is stored as a note
`import cobra
model = cobra.Model("test model")
reaction = cobra.Reaction("test_reaction")
reaction.subsystem = "TCA cycle"
model.add_reaction(reaction)
cobra.io.write_sbml_model(model, "subsystem_test.xml")
`
subsystem issue.zip
The text was updated successfully, but these errors were encountered: