Open broke-why opened 1 month ago
To my understanding, this should not depend on metabolite naming rules, and as long as your task file is appropriately defined (and it appears as it is, based on checkTasks
), then prepINITmodel
should also work.
@johan-gson, you're more aware of ftINIT
functions, shouldn't tasks succeed both in checkTasks
and prepINITmodel
?
I recommend debugging this - it should be possible to figure this out. Set a breakpoint where checktasks is called and see if the parameters to checktasks are different from what you send in when running it on the outside. If the parameters are not the same, test to run it outside the function with those parameters. If they are the same or if it works with those, test to modify the code: remove any step that modifies the model, like simplifyModel, and see if it helps. If you find the step where this happens, it should be possible to find the problem. You may also want to set skipScaling to true.
YeastGEM could probably also be run in "full" mode since it is much smaller
Let us know how it went!
Thanks for your suggestion! By setting a breakpoint in the prepINITModel function, I made two modifications to pass the growth task:
% [~,deletedDeadEndRxns] = simplifyModel(origRefModel,true,false,true,true,true); % original for human-GEM
[~,deletedDeadEndRxns] = simplifyModel(origRefModel,true,false,true,true,false); % for yeast-GEM
bModel = closeModel(cModel);
% [taskReport, essentialRxnMat, ~, essentialFluxes] = checkTasks(bModel,[],true,false,true,taskStruct); % original for human-GEM
[taskReport, essentialRxnMat, ~, essentialFluxes] = checkTasks(cModel,[],true,false,true,taskStruct); % for yeast-GEM
After these changes, I got a seemingly normal prepData for running the ftINIT process.However, I'm unsure if these modifications are correct because I encountered an error when running the ftINIT function:
model1 = ftINIT(prepData, data_struct.tissues{1}, [], [], data_struct, {}, getINITSteps([],'1+0'), false, true);
ftINIT: Running step 1
WARNING: Exchange metabolites are still present in the model. Use simplifyModel if this is not intended
MipGap too high, trying with a different run. MipGap = Inf New MipGap Limit = 0.003
WARNING: Exchange metabolites are still present in the model. Use simplifyModel if this is not intended
错误使用 dispEM
Failed to find good enough solution within the time frame. MIPGap: Inf
出错 ftINIT (第 282 行)
dispEM(['Failed to find good enough solution within the time frame. MIPGap: ' num2str(mipGap)]);And I find the preoblem is the MILP problem is infeasible in line 267
[deletedRxnsInINIT1, metProduction,fullMipRes,rxnsTurnedOn1,fluxes1] = ftINITInternalAlg(mm,rxnScores,metData,essentialRxns,5,stp.AllowMetSecr,stp.PosRevOff,params, startVals, fluxes, verbose);
Hi again,
You need to run closeModel on the model, otherwise if I remember correctly the model will be able to take up all metabolites, and hence the tasks will probably work even though they are not functional. A good test would be to run closeModel followed by checkTasks outside of ftINIT and see if the tasks still work. If not, investigate the ones that fail. Or does this work differently for the Yeast-GEM @edkerk ?
Description of the issue:
I followed the tutorial at https://sysbiochalmers.github.io/Human-GEM-guide/gem_extraction/#retrieve-the-data and successfully ran the human-GEM example.However, when using yeast-GEM, I can't obtain the correct prepData from prepINITModel(), which results in an unsolvable model when I try to do FBA to optmize the growth. Specifically, during prepINITModel(model, taskData), I encounter a failure in Step 3: "FAIL: [GR] Growth on SCmedia (biomass production)." Interestingly, when I run checkTasks(), the same metabolic task passes. I wonder if this error could be due to structural differences between yeast-GEM and human-GEM, such as metabolites naming rules or constraints?
Reproducing this issue:
System information
I hereby confirm that I have: