-
Hi! Recently, I used MEWpy to run the GIMME algorithm, which returned me a condition-specific solution object with a shortened flux vector (comprised of just 3120 reactions as opposed to the 20677 contained in my GEM). To account for these changes, I created a copy of the original model, made a list of all model reactions NOT included in the GIMME model, and attempted to use remove_reactions() with remove_orphans = True to generate an updated, GIMME-specific model. This updated version successfully includes all the desired reactions, but when I go to run model.optimize(), I see the same objective as the original model, even though the GIMME output (and solution) specified a different one. I'm a bit stumped as to why this is; I tried looking at the constraints of the GIMME solution and applied those to the model update process, but that yielded no change. Is there a method or inbuilt cobra functionality I'm missing that, given a solution object and dataframe/series of reaction fluxes, builds a specialized model? If not, how can I ensure that the change in the objective is reflected in my new model? Thanks in advance, looking forward to hearing from you! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Can you share your code? Most likely, either you are missing a constraint in the new model or the objective is not the same as specified in GIMME. It may also be helpful to know what your goal is. The GIMME solution is often used to create a pruned model like this to take an inventory on active reactions from a specific context and compare them with another, but what you're asking seems to be generating a pruned model and then re-applying the GIMME constraints/objective and optimizing (in which case the solution should be identical to that in the first model). What is your purpose in doing this? |
Beta Was this translation helpful? Give feedback.
-
Hi @gregmedlock, Thanks for your response! To clarify, my goal in doing this is simply to convert the GIMME solution to a tissue-specific model. Currently, the GIMME output does return the pruned solution I'm looking for, but this output is not rendered in the form of a cobra model suitable for downstream pipelines (e.g. gMCS, fast-SL, gene KO simulations). The goal of my project is to screen for robust synthetic lethal pairs in dengue virus, so having a complete model would aid tremendously in the later analysis I plan to conduct. Does that make sense? Below, I've included my code:
At the end of this sequence, both models retain the same objective value of 187.354. The objective function is also uniform across both models: Hope this provides some clarity, please let me know what you think. Best, |
Beta Was this translation helpful? Give feedback.
-
Hi, sorry for the confusion. Right now |
Beta Was this translation helpful? Give feedback.
-
Hello, just to follow-up: is it possible to update the objective in accordance to the reaction removal? Are there any inbuilt methods in place and if not, what steps could I take to move forward? I find that when I do model.summary() and pass in the solution values (fluxes, objective value, etc.), everything works properly. Could I potentially rehash this summary into a model of its own? Please let me know what you think, thanks! |
Beta Was this translation helpful? Give feedback.
-
A mismatched objective turned out to be the issue! Thanks so much for letting me know, Greg -- I've fixed the objective issue internally and everything works great now. Thanks to the both of you (@cdiener, @gregmedlock) for your help, I really appreciate it! |
Beta Was this translation helpful? Give feedback.
A mismatched objective turned out to be the issue! Thanks so much for letting me know, Greg -- I've fixed the objective issue internally and everything works great now. Thanks to the both of you (@cdiener, @gregmedlock) for your help, I really appreciate it!