Skip to content

Hello I am new to python and Cobra, i would be grateful if you can provide me with steps to open an XML file from the computer and/or from online database, i tried the commands on Cobra documentation but i can't apply it. #1357

Answered by cdiener
Rahmaabubakr asked this question in Q&A

You must be logged in to vote

Perfect, thanks for providing that information. The documentation is a bit confusing there, apologies for that. The first part of the code uses the GitHub repo structure to show all the included test files but this won't work on a normal installation, so those files won't be in the expected location and causes the errors you are seeing.

For a minimal example, the following will be enough:

from cobra.io import load_model

textbook_model = load_model("textbook")
ecoli_model = load_model("iJO1366")

This will load two of the models you can play around with. load_model can also be used to directly open models from reference databases such as BIGG or Biomodels.

The other read_* and load_ functi…

Replies: 1 comment 5 replies

You must be logged in to vote
5 replies
@Rahmaabubakr

@Rahmaabubakr

@Rahmaabubakr

@cdiener

Answer selected by Rahmaabubakr
@Rahmaabubakr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1356 on September 17, 2023 19:19.