-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ftINIT - failed to find good enough solution within time frame #483
Comments
The same error occurs when I use the gtexSampForTutorialTPM.txt file from the Zenodo repository. |
Hi Jason, |
Thanks for the reply @FaribaRoshanzamir! I just requested a Gurobi license and will try it when it arrives in a 1-2 business days. Previously I have used GLPK and Mosek for LP. Hopefully Gurobi works in this case; however, the Stackoverflow post says they received the same error using Gurobi following the same guide. Is there anything else I could try while waiting for the license? |
I checked it today, and I'm not getting any error when RAVEN 2.8.0 and setting the solver to Gurobi. So, it should work smoothly if you have a functional Gurobi. I am currently not sure how you can solve this issue with GLPK. |
Hi guys, I'd like to jump in with a similar issue. I'm using the latest RAVEN release, and Gurobi as the preferred solver, but ftINIT works only on some of the models I use. I could run the Human-GEM guide successfully, but running ftINIT on other models seems to be a challenge - algorithm fails at the same step as described here. |
@pranasag Can you please give us more details so we can help you out? Are you using Human-GEM as your reference model? |
Hi @FaribaRoshanzamir, my set-up is as follows: MATLAB 2019a on Mac OS X, with Gurobi 9.5.2 (downgraded from Gurobi 10 after reading this issue thread). I'm currently using the development branch of RAVEN (because of #479). |
@johan-gson, any idea? |
I would have to debug this, I have only tested ftInit with Human-GEM and Mouse-GEM. Any chance you could send me the model and omics + your code? Johan.gson@gmail.com |
Hi @FaribaRoshanzamir, switching to Gurobi fixed the issue for me. Thank you! I tested Gurobi v9.5.2 and v10.0.1. Both ran successfully, but they returned slightly different results - v10.0.1 produced a model with fewer |
Hi @jasonsherfey, I used 9.5.0 throughout the development, so it is much more tested. The problem formulation is the same, which solver that does best is difficult to say. In general, I think they reduced the accuracy a little bit and gained a bit of speed in 10.0, but I could be wrong - but I had to change one of the precision parameters to a larger value to make it work with 10.0. Also, you get different results depending on random seed and so forth, so some differences are expected - the solver normally doesn't find the optimal solution, but a good enough solution. Are the differences between the solvers large? |
Hi @johan-gson, thanks for your reply. The difference I saw between versions of Gurobi was small: eg, moving from Gurobi 9.5.2 to 10.0.1 reduced # elements in |
Ok, thanks for the info, I think you could get the same differences from changing the random seed in the solver for example, so I think that is fine. |
@pranasag I have finally found time to debug this, and figured out what is happening, sorry for the delay. The problem lies in the scaling step, which is a risky thing. In short, ftINIT has problems dealing with reactions that have large differences in the stoichiometric coefficients, you have a few of those in your model. They typically take like 1000 ATP and 1 of some amino acid, or 0.001 ROS or something like that. I have tried to solve the problem by scaling, where I did something really rough that messes up the stoichiometry, mass balance etc., is that the tolerances in the solver are not small enough to handle such large differences. In short, ftINIT says that the flux should be lower than B*1000, where B is 0 or 1 and represents if the reaction should be included or not. The problem is that 0 is not really zero, so if we increase the number 1000, small but large enough fluxes can slip through. We have problems when some fluxes need to be > 1000 for other fluxes to reach >0.1. Note that the scaling is used in the MILP only, it is not there in the final model. Human-GEM is pretty tolerant to messing up the stoichiometry a bit, so there this works. To solve this for you and others, I added the possibility to turn off scaling in prepINITData - I can run ftINIT on your model with this flag - it is currently in the fix/ftINITScaling branch. If you use that branch and use the line |
Description of the issue:
Hello everyone.
I use RAVEN 2.8.0 on MATLAB 2020b, Ubuntu 20.04
I am trying to extract a GEM model from GTEx liver transcriptomics data using ftINIT following the GEM Extraction guide here:
https://sysbiochalmers.github.io/Human-GEM-guide/gem_extraction/
I got an error when executing:
model1 = ftINIT(prepData, arrayData.tissues{1}, [], [], arrayData, {}, getHumanGEMINITSteps('1+0'), false, true);
test.mat.zip contains a MAT file with the
prepData
(based on the guide) andarrayData
(containing TPM counts for two GTEx liver samples).Reproducing this issue:
System information
=== Model solvers ===
=== Essential binary executables ===
A similar issue has been reported on Stackoverflow:
https://stackoverflow.com/questions/75822973/error-using-gurobi-solver-to-create-model-in-matlab-milp-detected-failed-to-find
Any advice on how to approach troubleshooting this would be greatly appreciated!
Best wishes
I hereby confirm that I have:
The text was updated successfully, but these errors were encountered: