opencobra / cobratoolbox

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

fastGapFill error #1486

Open zhxiaokang opened 5 years ago

zhxiaokang commented 5 years ago

Hi, I tried to run fastGapFill with the command "runGapFill_example", and got the following errors:

The following problems have been encountered in the model structure
inconsistentFields:
csense: mets: Size of csense does not match elements in mets
Error using buildLPproblemFromModel (line 62)
The input model does have inconsistent fields! Use verifyModel(model) for further information.

Error in fastcc (line 53)
LPproblem = buildLPproblemFromModel(model);

Error in prepareFastGapFill (line 151)
A = fastcc(MatricesSUX, epsilon);

Error in runGapFill_example (line 76)
    tic; [consistModel,consistMatricesSUX,BlockedRxns] = prepareFastGapFill(model);

We also tried to run fastGapFill on our own model and got the same errors while running this command: [AddedRxns] = fastGapFill(consistMatricesSUX,epsilon, weights); We checked the "consistMatricesSUX" and found that the dimensions of csense and metsFormula... don't match with mets, the same for rxns and its corresponding variables.

Could you please help to fix it?

(We found that there are people having the same problem on Google Group: https://groups.google.com/forum/#!searchin/cobra-toolbox/Size$20of$20csense$20does$20not$20match$20elements$20in$20mets|sort:date/cobra-toolbox/egHp9BmQQhc/N1h3V7MZAgAJ )

Please include a short description of problem here

I hereby confirm that I have:

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

tpfau commented 5 years ago

This is likely due to the runGapFill_example.m file using load instead of readCbModel, and the models having inconsistent fields in the .mat file. if you replace the line: model = content.(F{1}) by model = readCbModel(Filename{i}), that error should not happen.