Skip to content
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

How to used the ID of metabolites correctly in COBRApy? #280

Closed
LGJee opened this issue Dec 4, 2021 · 2 comments
Closed

How to used the ID of metabolites correctly in COBRApy? #280

LGJee opened this issue Dec 4, 2021 · 2 comments

Comments

@LGJee
Copy link

LGJee commented Dec 4, 2021

Hi, I am the beginner of GEMs, I learn the usage of COBRApy through the tutorials in https://cobrapy.readthedocs.io/en/latest/, I encountered a problem when using the model of yeast8.

After executing the following code

import code.io as io
model = io.read_yeast_model()

The following three codes will raise AttributeError

print(model.metabolites.nadh_c.summary())
print(model.metabolites.s_1203_c.summary())
print(model.metabolites.s_1203.summary())

Last but not least, I would be very grateful if you can provide some basic tutorials on Yeast8 or related application cases, thanks!

@edkerk
Copy link
Member

edkerk commented Dec 6, 2021

You can load the model in cobrapy with BiGG-style identifiers:

model = io.read_yeast_model(True)
print(model.metabolites.nadh_c.summary())

The original identifiers (in the style of s_1203[c]) indeed raises an AttributeError, probably related to the presence of the square brackets. This is also raised in #281.

@edkerk
Copy link
Member

edkerk commented Dec 10, 2021

Also note that the BiGG-style IDs might not be actual BiGG IDs: #282.
There are no tutorials for Yeast8, but this is a great suggestion that we will work on in 2022: #286

@edkerk edkerk closed this as completed Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants