VVFVA returns a vector of all 0s in solving MMT microbiome models when called from the MATLAB wrapper function. Instead fastFVA returns a different solution vector. If I were to speculate, I think that the discrepancy is caused by the handling of coupling constraints.
Find below the code to reproduce the error on a microbiome model:
parpool(4)initCobraToolboxchangeCobraSolver('ibm_cplex')intRxn=FecalRxn(1:6) %Reactions of interest on which to conduct FVA
for i=1:length(intRxn)intRxnInd(i)=strmatch(intRxn(i),model.rxns,"exact"); %Index of these reactionsend
#Solving with fastFVAcpxControl.PARALLELMODE = 1;cpxControl.THREADS = 1;cpxControl.AUXROOTTHREADS = 2;cpxControl.SCAIND =-1;
[minFlux,maxFlux] = fastFVA(model_sd,99.99,'max',{},intRxn,'A',cpxControl) %Perform FVA on the coupled model with diet (model_sd)
[minFluxVFFVA,maxFluxVFFVA]=VFFVA(1, 2, model_sd,-1,'none','dynamic',50,99.999,intRxnInd)
VVFVA returns a vector of all 0s in solving MMT microbiome models when called from the MATLAB wrapper function. Instead fastFVA returns a different solution vector. If I were to speculate, I think that the discrepancy is caused by the handling of coupling constraints. Find below the code to reproduce the error on a microbiome model:
parpool(4)
initCobraToolbox
changeCobraSolver('ibm_cplex')
intRxn=FecalRxn(1:6) %Reactions of interest on which to conduct FVA
for i=1:length(intRxn)
intRxnInd(i)=strmatch(intRxn(i),model.rxns,"exact"); %Index of these reactions
end
#Solving with fastFVA
cpxControl.PARALLELMODE = 1;
cpxControl.THREADS = 1;
cpxControl.AUXROOTTHREADS = 2;
cpxControl.SCAIND =-1;
[minFlux,maxFlux] = fastFVA(model_sd,99.99,'max',{},intRxn,'A',cpxControl) %Perform FVA on the coupled model with diet (model_sd)
[minFluxVFFVA,maxFluxVFFVA]=VFFVA(1, 2, model_sd,-1,'none','dynamic',50,99.999,intRxnInd)