I am generating a script that tests many different gene knockout scenarios for a model. Every time I add a new gene to the list of knockouts, I check for lethality of the knockout by executing deletemodelgenes with my updated list of knockouts followed by optimizeCBmodel. If the result has zero biomass flux, I consider the knockout to be lethal, I discard it and move to the next. Many gene knockouts are successfully identified as lethal using this method with no problem.
One run of my script performs this test hundreds of times, but one out of a thousand deletions (or about one in five times I run the script) causes matlab to hang during the optimizeCBmodel step. The hang is repeatable for a given model and a given set of upper and lower flux bounds. When Matlab hangs in this way, not even ctrl+c will abort the script and I need to force Matlab to close. I am using the GLPK solver in Matlab r2017b. I am uncertain of the COBRA version but I have attached a configReport.
I ultimately want to make this script available to the public, and having it fail completely and freeze up matlab in one out of five scenarios does not make for a very attractive script.
--
---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/1eaac366-7ce3-493a-8732-9793ac583023%40googlegroups.com.
Diana Charles Jordan-El Assal, PhD
Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math
Hi Herbert,Have you tried using singleGeneDeletion?
https://github.com/opencobra/cobratoolbox/blob/efb2c06be702aaed38349581ba73ed420251992b/src/analysis/deletion/singleGeneDeletion.m
On Monday, 26 August 2019, Herbert Huttanus <bert...@vt.edu> wrote:
--I am generating a script that tests many different gene knockout scenarios for a model. Every time I add a new gene to the list of knockouts, I check for lethality of the knockout by executing deletemodelgenes with my updated list of knockouts followed by optimizeCBmodel. If the result has zero biomass flux, I consider the knockout to be lethal, I discard it and move to the next. Many gene knockouts are successfully identified as lethal using this method with no problem.
One run of my script performs this test hundreds of times, but one out of a thousand deletions (or about one in five times I run the script) causes matlab to hang during the optimizeCBmodel step. The hang is repeatable for a given model and a given set of upper and lower flux bounds. When Matlab hangs in this way, not even ctrl+c will abort the script and I need to force Matlab to close. I am using the GLPK solver in Matlab r2017b. I am uncertain of the COBRA version but I have attached a configReport.
I ultimately want to make this script available to the public, and having it fail completely and freeze up matlab in one out of five scenarios does not make for a very attractive script.
I wish to know how to prevent such hangs entirely, or at least, anticipate which knockout models might freeze up matlab in this way and skip past such knockout scenarios. I have also heard it suggested that adding a timer to the optimizeCBmodel could be used to abort cases in which it takes too long, but others have suggested that this will not work, because once Matlab calls the GLPK solver, it becomes unresponsive to Matlab commands that might cancel the process until after GLPK is finished.
Thank you in advance for any insight you might provide.
---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/1eaac366-7ce3-493a-8732-9793ac583023%40googlegroups.com.
--
Diana Charles Jordan-El Assal, PhD
Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math
Center for Genomics and Systems Biology
New York University Abu Dhabi
P.O. Box 129188, Abu Dhabi, UAE
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/d51a0ef4-744f-4600-9f17-2bca7b97f551%40googlegroups.com.
Diana Charles Jordan-El Assal, PhD
Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math
How about doubleGeneDeletion?
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/d51a0ef4-744f-4600-9f17-2bca7b97f551%40googlegroups.com.
--
Diana Charles Jordan-El Assal, PhD
Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math
Center for Genomics and Systems Biology
New York University Abu Dhabi
P.O. Box 129188, Abu Dhabi, UAE
Hi Herbert,
I guess my real question is, how do I prevent optimizeCbModel from freezing matlab? What sort of conditions cause optimizeCbModel to do this?
As bad as it sounds:
I don't think you can.
The most likely place, where Matlab freezes during
optimizeCbModel is while calling the solver (i.e. the external mex
file for gurobi). This is kind of an atomic operation in Matlab
and thus cannot be interrupted before it returns, and if it
doesn't, well, than Matlab freezes.
Does it regularily freeze on the same problem? I.e. the same
combination of knockouts? If so, than you could have found a very
difficult problem, that the solver cannot quickly tackle (after
all, LP is NP-hard, so it can potentially take ages, it just
luckily doesn't most of the times). In that instance you will
either have to wait, or avoid that particular problem.
What you could try is to play around a bit with the solver settings for gurobi, but even that is no guarantee to solve our issue.
Best
Thomas
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/6de7a919-5653-449c-99f0-6ace650fa711%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/6de7a919-5653-449c-99f0-6ace650fa711%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/8341cb22-ffa4-497c-86c0-a5427d3f91ef%40googlegroups.com.