opencobra/cobrapy

from cobra.io import load_model model = load_model("textbook") model.medium

ChenCongZ opened this issue · 4 comments

Checklist

Question

Hi,
from cobra.io import load_model
model = load_model("textbook")
model.medium

Is it the output file of the model? What is "textbook" in the code file format? for example sbml or json format.

Hi, load_model is used to load models directly from repositories. For loading an SBML model you can use:

from cobra.io import read_sbml_model

model = read_sbml_model("YOUR_MODEL_PATH")

Also see https://cobrapy.readthedocs.io/en/latest/io.html .

Hi, @cdiener
Thank you for help. I solved the problem I encountered.