Base functions
COBREXA._constants
— ConstantA named tuple that contains the magic values that are used globally for whatever purposes.
COBREXA.flux_dict
— Methodflux_dict(model::MetabolicModel, opt_model)::Maybe{Dict{String, Float64}, Nothing}
Returns the fluxes of the model as a reaction-keyed dictionary, if solved.
Example
flux_dict(model, flux_balance_analysis(model, ...))
COBREXA.flux_vector
— Methodflux_vector(opt_model)::Maybe{Vector{Float64}}
Returns a vector of fluxes of the model, if solved.
Example
flux_vector(flux_balance_analysis(model, ...))
COBREXA.get_optmodel_bounds
— Methodget_optmodel_bounds(opt_model)
Returns vectors of the lower and upper bounds of opt_model
constraints, where opt_model
is a JuMP model constructed by e.g. make_optimization_model
or flux_balance_analysis
.
COBREXA.is_solved
— Methodis_solved(opt_model)
Return true
if opt_model
solved successfully (solution is optimal or locally optimal). Return false
if any other termination status is reached. Termination status is defined in the documentation of JuMP
.
COBREXA.make_optimization_model
— Methodmake_optimization_model(
model::MetabolicModel,
optimizer;
sense = MOI.MAX_SENSE,
)
Convert MetabolicModel
s to a JuMP model, place objectives and the equality constraint.
COBREXA.optimize_objective
— Methodoptimize_objective(opt_model)::Maybe{Float64}
Shortcut for running JuMP optimize!
on a model and returning the objective value, if solved.
COBREXA.set_optmodel_bound!
— Methodset_optmodel_bound!(vidx, opt_model;
ub::Maybe{Real} = nothing,
lb::Maybe{Real} = nothing,
)
Helper function to set the bounds of a variable in the model. Internally calls set_normalized_rhs
from JuMP. If the bounds are set to nothing
, they will not be changed.
COBREXA.solved_objective_value
— Methodsolved_objective_value(opt_model)::Maybe{Float64}
Returns the current objective value of a model, if solved.
Example
solved_objective_value(flux_balance_analysis(model, ...))