opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
246 stars 308 forks source link

Error using FVAOptForce #1606

Closed zhangzn19 closed 3 years ago

zhangzn19 commented 4 years ago

Please include a short description of problem here

I used FVAOptForce function by following codes

initCobraToolbox
changeCobraSolver('gurobi', 'ALL')
model = readCbModel('/Users/zhangzhongnan/Desktop/OptForce/iAF1260b.xml')
model = changeObjective(model, 'BIOMASS_Ec_iAF1260_core_59p81M');
growthRate = optimizeCbModel(model);
fprintf('The maximum growth rate is %1.2f', growthRate.f);
model = changeObjective(model, 'EX_succ_e');
maxsucc = optimizeCbModel(model);
fprintf('The maximum production rate of succinate is %1.2f', maxsucc.f);
constrWT = struct('rxnList', {{'BIOMASS_Ec_iAF1260_core_59p81M'}}, 'rxnValues', 0.7367, 'rxnBoundType', 'b')
constrMT = struct('rxnList', {{'BIOMASS_Ec_iAF1260_core_59p81M', 'EX_succ_e'}}, 'rxnValues', [0, 13.2579], 'rxnBoundType', 'bb')
[minFluxesW, maxFluxesW, minFluxesM, maxFluxesM, boundsW, boundsM] = FVAOptForce(model, constrWT, constrMT);

Error appeared as follows:

Error using fluxVariability (line 235)
The FVA could not be run because the model is infeasible or unbounded

Error FVAOptForce (line 156)
[minFluxesM,maxFluxesM] = fluxVariability(modelM,0,'max',modelM.rxns);

I hereby confirm that I have:

(Note: You may replace [ ] with [X] to check the box)

rmtfleming commented 4 years ago

This may be an issue with the model, rather than the code as it says "The FVA could not be run because the model is infeasible or unbounded"

zhangzn19 commented 4 years ago

thanks, but I used the iAF1260 model from Bigg database suggested by article , or the constrained reactions flux in above codes is not suitable?