cobratoolbox icon indicating copy to clipboard operation
cobratoolbox copied to clipboard

Error in Microbiome Modelling Toolbox related to Gurobi solver

Open Selimvrl opened this issue 2 years ago • 8 comments

*Hi everyone, I am trying to create a community model witj Microbiome Modelling Toolbox under COBRA, but I am getting this error all the time I run initMgPipe command. Could you please help me to understand what is the issue and how can I solve this?

Error using gurobi Incorrect size(model.sense)

Error in solveCobraLP (line 954) resultgurobi = gurobi(gurobiLP,param);

Error in microbiotaModelSimulator (line 261) solution_allOpen = solveCobraLP(buildLPproblemFromModel(model));

Error in mgPipe (line 291) [exchanges, netProduction, netUptake, presol, inFesMat] = microbiotaModelSimulator(resPath, activeExMets, sampNames, dietFilePath, hostPath, hostBiomassRxn, hostBiomassRxnFlux, numWorkers, rDiet, pDiet, saveConstrModels, computeProfiles, includeHumanMets, lowerBMBound, repeatSim, adaptMedium);

Error in initMgPipe (line 191) [netSecretionFluxes, netUptakeFluxes, Y, modelStats, summary, statistics, modelsOK] = mgPipe(modPath, abunFilePath, computeProfiles, resPath, dietFilePath, infoFilePath, hostPath, hostBiomassRxn, hostBiomassRxnFlux, objre, saveConstrModels, figForm, numWorkers, rDiet, pDiet, includeHumanMets, lowerBMBound, repeatSim, adaptMedium, removeBlockedRxns);*

I hereby confirm that I have:

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

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

Selimvrl avatar Nov 03 '21 23:11 Selimvrl

Hello, may you load microbiota_model_samp_D6 and post a screenshot of the model structure (showing length of mets, rxns, etc.)? Best regards, Almut

almut-heinken avatar Nov 04 '21 09:11 almut-heinken

Hi Almut,

Please find D5 and D6 model structures below. Let me know if you need anything else.

Best regards, Selim Model_Samp_D5 Model_Samp_D6

Selimvrl avatar Nov 04 '21 11:11 Selimvrl

Hi Selim, I do not see anything unusual about this model so I am unsure what is happening. Would you be willing to upload the second model (D6) so I can test it directly? Best regards, Almut

almut-heinken avatar Nov 04 '21 15:11 almut-heinken

Hi Almut, I am not able to send matlab file from github, unfortunately it does not accept that file type. Do you know how can I share the model (D6) with you? Additionally, I think there might be a problem when implementing diet constraints. When I checked diet folders under results, they are missing after N4. And although I am having an error, I get this heat map all the time for some reason.

Thanks a lot for your support :)

Best regards, Selim

image first result heat table

Selimvrl avatar Nov 08 '21 10:11 Selimvrl

Results.zip

Hi Almut,

I think I managed to upload the results folder as a zip. It would be great if you can help.

Many Thanks, Selim

Selimvrl avatar Nov 10 '21 19:11 Selimvrl

Hi @Selimvrl I think I fixed the issue. Could you update the COBRA Toolbox, then run everything again from scratch (so delete all results including the created microbiome models)? Hopefully, it will work now.

almut-heinken avatar Nov 18 '21 16:11 almut-heinken

Hi @almut-heinken

Thanks a lot for your help, now its running and giving solutions so working properly. Only problem I realized is that after computing initMgPipe function, resulting net secretion fluxes are not different from each other for different diet types(AverageEuropean, Vegan etc. only show so small changes) and subsystem abundances are not affected by diet changes. Is this normal in your opinion?

Many thanks, Selim

Selimvrl avatar Nov 24 '21 19:11 Selimvrl

Hi Selim, the subsystem abundance is derived from the presence of reactions in the models so it is not affected by constraints. Regarding the fluxes, generally, the microbial composition has a larger impact on fluxes than the diet. I am guessing the diet also has a low impact for you since the models are comparatively small, so they take up less nutrients. Best regards, Almut

On Wed, Nov 24, 2021 at 7:03 PM Selimvrl @.***> wrote:

Hi @almut-heinken https://github.com/almut-heinken

Thanks a lot for your help, now its running and giving solutions so working properly. Only problem I realized is that after computing initMgPipe function, resulting net secretion fluxes are not different from each other for different diet types(AverageEuropean, Vegan etc. only show so small changes) and subsystem abundances are not affected by diet changes. Is this normal in your opinion?

Many thanks, Selim

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opencobra/cobratoolbox/issues/1863#issuecomment-978147045, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSOYHLZFR6OXVLP56BN5H3UNUZJRANCNFSM5HKEPXGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

almut-heinken avatar Nov 25 '21 13:11 almut-heinken