SysBioChalmers / Human-GEM

The generic genome-scale metabolic model of Homo sapiens
https://sysbiochalmers.github.io/Human-GEM-guide/
Creative Commons Attribution 4.0 International
99 stars 42 forks source link

prepHumanModelForftINIT runs too long without Gurobi as solver #826

Closed wt12318 closed 5 months ago

wt12318 commented 5 months ago

Hi, I download Human-GEM from zenodo and run the prepHumanModelForftINIT, in the message, it says that would take 10 min, but I have run about 10 hours, it has not been completed:

>> load('Human-GEM.mat');  
>> prepData = prepHumanModelForftINIT(ihuman, false, '/home/data/sdb/wt/model_data/SysBioChalmers-Human-GEM-8ba6b21/data/metabolicTasks/metabolicTasks_Essential.txt', '/home/data/sdb/wt/model_data/SysBioChalmers-Human-GEM-8ba6b21/model/reactions.tsv'); 
Step 1: Gene rules
Step 2: First simplification
Step 3: Check tasks (~10 min)
PASS: [ER] Aerobic rephosphorylation of ATP from glucose
PASS: [ER] Aerobic rephosphorylation of GTP
PASS: [ER] Aerobic rephosphorylation of CTP
PASS: [ER] Aerobic rephosphorylation of UTP
PASS: [BS] ATP de novo synthesis
PASS: [BS] CTP de novo synthesis
PASS: [BS] GTP de novo synthesis
PASS: [BS] UTP de novo synthesis
PASS: [BS] dATP de novo synthesis
PASS: [BS] dCTP de novo synthesis
PASS: [BS] dGTP de novo synthesis
PASS: [BS] dTTP de novo synthesis
PASS: [SU] Histidine uptake
PASS: [SU] Isoleucine uptake
PASS: [SU] Leucine uptake
PASS: [SU] Lysine uptake
PASS: [SU] Methionine uptake
PASS: [SU] Phenylalanine uptake
PASS: [SU] Threonine uptake
PASS: [SU] Tryptophan uptake
PASS: [SU] Valine uptake
PASS: [IC] Glycerate 3-phosphate  de novo synthesis
PASS: [IC] Mitochondrial acetyl-CoA de novo synthesis
PASS: [IC] Mitochondrial AKG de novo synthesis
PASS: [IC] Erythrose 4-phosphate de novo synthesis
PASS: [IC] Fructose 6-phosphate de novo synthesis
PASS: [IC] Glyceraldehyde 3-phosphate de novo synthesis
PASS: [IC] Glucose 6-phosphate de novo synthesis
PASS: [IC] Mitochondrial oxaloacetate de novo synthesis
PASS: [IC] Phosphoenolpyruvate de novo synthesis
PASS: [IC] Pyruvate de novo synthesis
PASS: [IC] Ribose 5-phosphate de novo synthesis
PASS: [IC] Mitochondrial succinyl-CoA de novo synthesis
PASS: [BS] Cholesterol de novo synthesis
PASS: [BS] Protein synthesis from AAs
PASS: [ER] Oxidative phosphorylation
PASS: [ER] Oxidative decarboxylation
PASS: [ER] Krebs cycle NADH
PASS: [ER] Ubiquinol-to-proton
PASS: [ER] Ubiquinol-to-ATP
PASS: [SU] Beta oxidation of saturated FA
PASS: [SU] Beta oxidation of long-chain FA
PASS: [SU] Beta oxidation of odd-chain FA
PASS: [SU] Beta oxidation of unsaturated fatty acid (n-9) 
PASS: [SU] Beta oxidation of unsaturated fatty acid (n-6) 
PASS: [SU] Uptake and beta oxidation of all NEFAs
PASS: [SU] Choline uptake
PASS: [SU] Inositol uptake
PASS: [BS] Phosphatidylcholine de novo synthesis
PASS: [BS] Phosphatidylethanolamine de novo synthesis
PASS: [BS] Phosphatidylserine de novo synthesis
PASS: [BS] Phosphatidylinositol de novo synthesis

How could I fix this problem? Thanks

feiranl commented 5 months ago

@johan-gson Could you answer this?

johan-gson commented 5 months ago

Hi, then something is really wrong. Could you by any chance debug it a bit and see where in the code it gets stuck?

wt12318 commented 5 months ago

Hi, I try to run this function step by step (prepHumanModelForftINIT in Human-GEM and prepINITModel.m in RAVEN), and found the slow step is :

[taskReport, essentialRxnMat, ~, essentialFluxes] = checkTasks(bModel,[],true,false,true,taskStruct);
johan-gson commented 5 months ago

Hmm, I wonder which version of Human-GEM you are using? Could you by any chance try to download the latest Human-GEM from Github (main branch) and use it together with the latest version of RAVEN(main branch)? I know that there were some changes in Human-GEM a while ago where the names of the metabolites in the tasks were changed in the model, and later in the tasks file. I wonder if this could come from a mismatch there, I know I had some trouble in the past with this? Could you test if it works with the latest versions of both? Note that both some code for ftINIT, the model itself, and the task file is in the Human-GEM repo.

JonathanRob commented 5 months ago

Just to add: the 5th argument in the checkTasks function (getEssential), when set to true, will make that function take much longer to run than a simple task check. Not 10 hours, but I have seen it exceed an hour in the past.

edkerk commented 5 months ago

This might also depend on which solver is installed for RAVEN. You can check this with getpref('RAVEN','solver')

johan-gson commented 5 months ago

The recommended solver is Gurobi 9.5 - Gurobi 10 should also work. I have not tested any versions above that.

edkerk commented 5 months ago

11 and higher should also work, glpk or scip might be problematic

wt12318 commented 5 months ago

Thanks. I have tried Gurobi 11.0.2, and now it works normally (takes about 1 hour).

johan-gson commented 5 months ago

Great, good that you could make it work!

Den ons 19 juni 2024 07:44Tao Wu @.***> skrev:

Thanks. I have tried Gurobi 11.0.2, and now it works normally (takes about 1 hour).

— Reply to this email directly, view it on GitHub https://github.com/SysBioChalmers/Human-GEM/issues/826#issuecomment-2178888530, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHX2AK2TFDR26HPGI6IRCALZIGKNHAVCNFSM6AAAAABJO7AGA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZYHA4DQNJTGA . You are receiving this because you were mentioned.Message ID: @.***>