carrascomj on devel
docs: point binder badge to mas… (compare)
fraction_of_optimumcan be the problem. I’ll test it myself, but you are setting the model objective to be a number below the solver precision and that’s usually recipe for disaster. I’ll be back in the office tomorrow and I will try to assess that myself.
MinimalCutSetsEnumeratorstill needs a lot work and testing. @KristianJensen probably knows more but he is also writing his thesis right now. As far as I can see from the code it can be a constraint (which you could construct with
model.solver.interface.Constraintetc.) to describe the desired behavior. If you want to calculate EFMs, wouldn't you want to use
solution.x_dictattributes in cobrapy
model = models.bigg.iJO1366
model.solver = 'gurobi'
wt_solution = model.optimize()
growth = wt_solution.fluxes["BIOMASS_Ec_iJO1366_core_53p95M"]
acetate_production = wt_solution.fluxes["EX_ac_e"]
p = phenotypic_phase_plane(model, variables=['BIOMASS_Ec_iJO1366_core_53p95M'], objective='EX_ac_e')
result = p.data_frame
g_range = result['BIOMASS_Ec_iJO1366_core_53p95M']
p_range = result['objective_upper_bound']
plt.plot(g_range, p_range, 'k', color='blue')
optgene = OptGene(model)
result = optgene.run(target=model.reactions.EX_ac_e,
0 ('ATPS4rpp', 'PSP_L') (('b4388', 'b3735'),) 2 0 14.97629611 12.80217508 0.388364968 1.280217508 0.497191669
reactions genes size fva_min fva_max target_flux biomass_flux yield fitness
ameo.strain_design.deterministic.flux_variability_based. The last step of the
FESOF.run()is to filter the results (line 977). This is used obviously to remove the reactions from the
excludeparameter, but there are two other criteria to keep the reaction:
min(fluxes) * max(fluxes) >= 0
max(abs(max(fluxes)), abs(min(fluxes))) > abs(reference[reaction_id])
I'm using cobrapy as well as cameo library. I'm trying to use OptKnock over a model I downloaded from bigg database (model iAF1260.json). I added some reactions and metabolites to the model so I can have a pathway to EX_btd_RR (the compound i want to optimize) and everything working so far. When I try to do the following:
from cameo.strain_design.deterministic.linear_programming import OptKnock optknock = OptKnock(grbModel, fraction_of_optimum=0.1) result = optknock.run(target="EX_btd_RR_e", biomass="BIOMASS_Ec_iAF1260_core_59p81M")
(I'm using gurobi solver with student license)
the code never stops running on result. I understand that its a big model (1688 metabolites and 2382 reactions), because doing the same with e coli core model returns the output inmidiatly, but it's running over 2 hours with no outputs not even erros.
Any idea of what could be the problem or how long does it usually takes?
I added some print() to the cobra and cameo library to see where it might be stopping but I'm not really sure where the problem is.
can anybody please help me :)