-
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
[Feature request] Provide compartments as objects like all other model components #652
Comments
I fully support the idea but don't really see us implementing it until a cobrapy 1.0 or so. |
The other question would be the degree of compatibility with the various SBML specs... I.e., I don't think they have an annotation field. Could be nice to have |
Just for clarification:
So completely compatible with Species and Reactions, you can even use the same parser code to read the information for annotations from all the different objects. Yes, please add compartments as first class cobra citizens. These are very important. |
I have no objections. The proposed API looks good to me. So basically |
Can somebody implement this? This should not be a too big change, but just changing how the compartments are stored (dict of compartment objects instead of dict of compartment strings). Providing all the annotations on the compartments is then just one line of code in the sbml parser. I just need to be able to set
on a compartment object. |
I can have a look at this issue. |
Problem description
To future-proof cobrapy it migh make sense to offer compartments not just as a dictionary but as objects like all the other model components. While adding little overhead in terms of performance (the larges model I've seen had 14 compartments), I think this would have a lot of benefits such as allowing users to store information on compartment size (pH, molecular size potentially relevant for ME-model-esque calculations) and compartment-specific annotation (type of compartment, SBO terms, literature reference and whatnot).
Code Sample in Jupyter Notebook
The text was updated successfully, but these errors were encountered: