cobratoolbox icon indicating copy to clipboard operation
cobratoolbox copied to clipboard

fastGapFill error

Open zhxiaokang opened this issue 5 years ago • 1 comments

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:

  • [x] Retried to run my code with the latest version of The COBRA Toolbox
  • [x] Tried to solve the issue on my own
  • [x] Checked that a similar issue has not already been opened

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

zhxiaokang avatar Jun 20 '19 13:06 zhxiaokang

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.

tpfau avatar Aug 15 '19 10:08 tpfau