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) -> Union{Nothing, Dict{String, Float64}}
Returns the fluxes of the model as a reaction-keyed dictionary, if solved.
Example
flux_dict(model, flux_balance_analysis(model, ...))
COBREXA.flux_dict
— Methodflux_dict(model::MetabolicModel) -> COBREXA.var"#184#185"
A pipeable variant of flux_dict
.
Example
flux_balance_analysis(model, ...) |> flux_dict(model)
COBREXA.flux_vector
— Methodflux_vector(model::MetabolicModel, opt_model) -> Union{Nothing, 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) -> Tuple{Any, Any}
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) -> Bool
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) -> JuMP.Model
Convert MetabolicModel
s to a JuMP model, place objectives and the equality constraint.
Here coupling means inequality constraints coupling multiple variables together.
COBREXA.optimize_objective
— Methodoptimize_objective(opt_model) -> Union{Nothing, 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; lb, ub) -> Bool
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) -> Union{Nothing, Float64}
Returns the current objective value of a model, if solved.
Example
solved_objective_value(flux_balance_analysis(model, ...))