prepINITModel not ignoring custom reactions in model pruning #507
-
Hi! I am trying to apply ftINIT to only a subset of the Human1 model, by adding the reactions I want to ignore to the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @wshao1! Just judging by the documentation, I too find it unclear. I'm wondering if the explanation could be more simple, e.g. the reaction identifier is not in the right format. Could you share a bit of the sample code? |
Beta Was this translation helpful? Give feedback.
-
Hi @wshao1 , customRxnsToIgnore does not do this, these are the reactions that are not included in the first step in the algorithm, so something different. I have not thought of this case, there is no direct support for it, it would eventually be a good thing to add as it would be a very simple fix. I'm very short on time right now, so I cannot engage in any development right now. If you want, you could modify the code to take care of this. A suggestion is to test the following: In prepINITModel, add two parameters: you send in these extra reaction ids when you call the prepINITModel function. You need to decide on a direction in which these reactions are essential (you cannot easily do both). If irrev, then it is easy, always forward (1), otherwise it can also be backwards (-1) Then, on line 155 or somewhere around there, add these lines: i.e., insert afterthese lines:
I think this should work, definitely worth a try! Let me know how it went if you try it! Note that the code does not mess up the model that you get out (making irreversible etc.), we are just changing the specialized model used in the MILP, so it is just internal for the algorithm! Best of luck! |
Beta Was this translation helpful? Give feedback.
-
Hi! I was interested in doing the same thing. In my case, I wanted to have ftINIT prune away at all subsystems in Human-GEM except the central carbon metabolism (Glycolysis, PPP, TCA, OXPHOS, and Pyruvate metabolism). I also want to make sure all amino acid exchanges stay put. The result is a cell array of 174 reaction IDs. I selected the forward direction for all of them. I have managed to edit prepINITModel according to your suggestion:
The function now also accepts these as inputs: prepData is generated without a problem. However, then I pass this to the ftINIT function, as follows:
I get the following error:
I manage to run the ftINIT fine with prepData if I make is using prepHumanModelForftINIT. So gurobi seems to be working fine. Can you think of any reasons why this would still not be working? |
Beta Was this translation helpful? Give feedback.
Hi @wshao1 , customRxnsToIgnore does not do this, these are the reactions that are not included in the first step in the algorithm, so something different. I have not thought of this case, there is no direct support for it, it would eventually be a good thing to add as it would be a very simple fix. I'm very short on time right now, so I cannot engage in any development right now. If you want, you could modify the code to take care of this. A suggestion is to test the following: In prepINITModel, add two parameters:
function prepData = prepINITModel(origRefModel, taskStruct, spontRxnNames, convertGenes, customRxnsToIgnore, extComp, skipScaling, extraEssentialRxns, extraEssentialDirs)
you …