Base functions

COBREXA._constantsConstant

A named tuple that contains the magic values that are used globally for whatever purposes.

source
COBREXA.flux_dictMethod
flux_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, ...))
source
COBREXA.flux_dictMethod
flux_dict(model::MetabolicModel) -> COBREXA.var"#184#185"

A pipeable variant of flux_dict.

Example

flux_balance_analysis(model, ...) |> flux_dict(model)
source
COBREXA.flux_vectorMethod
flux_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, ...))
source
COBREXA.is_solvedMethod
is_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.

source
COBREXA.make_optimization_modelMethod
make_optimization_model(model::MetabolicModel, optimizer; sense) -> JuMP.Model

Convert MetabolicModels to a JuMP model, place objectives and the equality constraint.

Here coupling means inequality constraints coupling multiple variables together.

source
COBREXA.optimize_objectiveMethod
optimize_objective(opt_model) -> Union{Nothing, Float64}

Shortcut for running JuMP optimize! on a model and returning the objective value, if solved.

source
COBREXA.set_optmodel_bound!Method
set_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.

source
COBREXA.solved_objective_valueMethod
solved_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, ...))
source