This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in running 'optimizeCbModel' function of Cobra ToolBox

The 'optimizeCbModel' function in the CobraToolBox is giving the following error:

>> solution=optimizeCbModel('model');
Attempt to reference field of non-structure array.
Error in optimizeCbModel (line 116)
[nMets,nRxns] = size(model.S);

The error is in the line 116 which says nMets and nRxns should be equal to model.S. I have checked these values and they are exaclty what they should be:

>> size(model.S)
ans = 761 * 1075
>> size (model.rxns)
ans = 1075 * 1
>> size (model.mets)
ans = 761 * 1

The article at Nature protocols suggests that its an error in the installation of LP solver, however, after initializing Cobra ToolBox with the command initCobraToolbox it displays following message:

LP solver set to gurobi5 successful
MILP solver set to gurobi5 successful
QP solver set to gurobi5 successful
MIQP solver set to gurobi5 successful
CB map output set to svg successful

This probably suggests that LP solver is installed correctly.

Please suggest me how should I proceed further.

solver metabolic-modeling cobratoolbox lp

0 answers

No answers yet.

Log in to answer this question.