Closed taylo5jm closed 7 years ago
Parsimonious FBA changes the objective to the minimum total flux objective (minimize sum_i abs(v_i)) and that is the one reported by the solution. The biomass reaction should have the same flux in both solutions, e.g. fba_soln["H2Ot"] ~ pfba_soln["H2Ot"]
. I agree that this is not very obvious and it might make sense for pFBA to rather assign the previous objective value to solution.objective_value
...
Ah, thank you. I see that is indeed the case. It makes sense to me now why pFBA assigns the objective function value that it does. If the user wants to recover the previous objective function value, running model.optimize() may be the easiest route. Alternatively, the previous objective function value could just be calculated manually from the pFBA solution for more complex objective functions.
Happy to read you find the current behaviour acceptable, saving solutions and fetching fluxes or indeed the actual objective value appears to the most explicit way to go in my opinion. Please re-open the issue if you think there is more to be done / discussed here.
@cdiener How can I compute the total flux objective using FBA?
@BhushanDhamale as mentioned in gitter with sol.fluxes.abs().sum()
.
Hi all,
It seems that pFBA (cobra.flux_analysis.pfba(model)) does not return a similar objective function value to the one calculated with FBA (model.optimize()).
I am running cobrapy version 0.6.1 with Python version 3.5.2 inside of IPython version 5.3.0. My operating system is Fedora 25.
I briefly mentioned this issue in a different question on the Google group, but I figured it would be better to create a separate issue for it here. In the case I have shown below, I attempt to maximize the H2O transport reaction in RECON1 using the glpk solver. With FBA, I observe an objective function value of 999999. With pFBA, I observe an objective value of 2999997.
Thanks, Justin