FBA generates results but pFBA does not.

70 views
Skip to first unread message

Sanu Shameer

unread,
May 23, 2018, 12:25:37 PM5/23/18
to COBRA Toolbox
Hi All

I've been stuck on this for a while now....

I am a working with a C3 leaf model model (attached). optimizeCbModel works on my model and constraint used.

-----------------------------------CODE----------------------------------
source_model = initializeDielLeafModel('/home/sanu/diel_leaf_model.xml');

PPFD = 500;
net_rate = 11.1895;

%set PPFD
indx_light_Day = find(source_model.rxns=="Photon_tx1");
[source_model.lb(indx_light_Day), source_model.ub(indx_light_Day)] = deal(PPFD);
disp(strcat('photon uptake = ',num2str(PPFD)))

%set maintenance
indx_ATPase_Day = find(source_model.rxns=="ATPase_tx1");
[source_model.lb(indx_ATPase_Day), source_model.ub(indx_ATPase_Day)] = deal(0);
disp(strcat('ATPase flux = ',num2str(0)))

%set Vc flux
indx_Vc_Day = find(source_model.rxns=="RIBULOSE_BISPHOSPHATE_CARBOXYLASE_RXN_p1");
[source_model.lb(indx_Vc_Day), source_model.ub(indx_Vc_Day)] = deal(net_rate);
disp(strcat('Vc = ',num2str(net_rate)))

FBAsoln = optimizeCbModel(source_model,"max");

-----------------------------------OUTPUT--------------------------------

The resulting FBAsoln struct fields and values are as follows:
full = 1563x1 double
obj = 0.2298
rcost = 1563x1 double
dual = 1419x1 double
solver = 'glpk'
algorithm = 'default'
stat = 1
origStat = 5
time = 0.2228
basis = []
x = 1563x1 double
f = 0.2298
y = 1419x1 double
w = 1563x1 double
v = 1563x1 double

--------------------------------------------------------------------------------

But pFBA(source_model,'GeneOption',0,'skipclass',1) doesn't seem to work (upperbounds of the irreversible model still remains the default value, which is a 1000 in my case).
I decided to write my own simple pFBA function to figure out what was happening.

-----------------------------------CODE----------------------------------
FBAsoln = optimizeCbModel(source_model,"max");

[irr_model,matchRev,rev2irrev,irrev2rev] = convertToIrreversible(source_model);

indx_obj = find(irr_model.c == 1);
[irr_model.lb(indx_obj), irr_model.ub(indx_obj)] = deal(FBAsoln.x(indx_obj));

irr_model.c = irr_model.c * 0;
irr_model.c = irr_model.c + 1;

FBAsoln2 = optimizeCbModel(irr_model,'min');
-------------------------------OUTPUT-----------------------------------

The final FBAsoln2 struct fields and values are as follows:
full = 2065x1 double
obj = 0
rcost = 2065x1 double
dual = 1419x1 double
solver = 'glpk'
algorithm = 'default'
stat = 0
origStat = 110
time = 0.2434
basis = []
f = 0
x = []

--------------------------------------------------------------------------------

I can't seem to figure out why the minimization of sum of fluxes does not seem to work.

Please let me know if you can figure out what I am doing wrong,
Thanks in advance,
Sanu




diel_leaf_model.xml

Anne Richelle

unread,
May 23, 2018, 1:59:50 PM5/23/18
to COBRA Toolbox
Hi Sanu,

seems that this is a solver issue: if you use gurobi instead of glpk it works fine.

Let me know if it works for you
Message has been deleted

Sanu Shameer

unread,
May 24, 2018, 8:58:30 AM5/24/18
to COBRA Toolbox
Hi Anne

Changing the solver worked. I did not have 'gurobi' installed so I used the 'matlab' solver instead and it worked. Thanks a lot :-)

Best Regards
Sanu
Reply all
Reply to author
Forward
0 new messages