-
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
[BUG] Gene.functional attribute not saved in SBML model #1422
Comments
Agreed it would be cool to have this, but this is currently not supported by SBML AFAICT. The only allowed attributes for genes are the id and name essentially and nothing else. You can save functionality in the notes, but we would probably not do this here because the SBML standard is pretty strict about not storing parseable information in the notes. There were some discussions of new key-value annotations but I don't think this is available yet. |
OK thanks Christian! I'll stick with my workaround solution for now, and will keep an eye out for any SBML updates. |
You might look at OMEX files which are essentially archives that include models and data files (like constraints or expression values). |
Key values are in SBML FBC level 3, I think. |
Thanks for the suggestions Midnighter! |
The current FBC version implemented is still version 2 I think. Version 3 has not been released AFAICT and there seem to be no reference implementations. |
Is there an existing issue for this?
Problem description
When I knockout a gene, the
gene.functional
attribute is set toFalse
. But when the model is saved/reloaded usingwrite_sbml_model
/read_sbml_model
, thegene.functional
attribute is reset to the default ofTrue
. I want thegene.functional
attribute to be saved with each model.A jerry-rigged solution is to save the attribute using
_sbase_notes_dict
incobrapy/src/cobra/io/sbml.py
:_sbase_notes_dict(gp, {"functional": cobra_gene.functional})
--> after line 1344 indef _model_to_sbml
--> after line 746 in
def _sbml_to_model
I'm sure there's a better way to do this that aligns with SBML standards, so wondering if anyone who is familiar with SBML can fix this in a more elegant way.
Code sample
Code run:
Environment
Dependency Information
Build Tools Information
Platform Information
Anything else?
No response
The text was updated successfully, but these errors were encountered: