Unverified Commit d66d4a90 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

function list compiles with no warnings

parent df43b561
...@@ -14,12 +14,8 @@ makedocs( ...@@ -14,12 +14,8 @@ makedocs(
linkcheck = !("skiplinks" in ARGS), linkcheck = !("skiplinks" in ARGS),
pages = [ pages = [
"Home" => "index.md", "Home" => "index.md",
"Functions" => "functions.md", "Tutorials" => "tutorials.md",
"Function reference" => "functions.md",
"How to contribute" => "howToContribute.md", "How to contribute" => "howToContribute.md",
"Model Structure" => "model_structure.md",
"Model IO" => "io.md",
"Model Construction" => "model_construction.md",
"Optimization Based Analysis Tools" => "basic_analysis.md",
"Sampling Tools" => "sampling_tools.md",
], ],
) )
# Functions # Functions
## Types ## Base Types
```@autodocs ```@autodocs
Modules = [COBREXA] Modules = [COBREXA]
Pages = map(file -> joinpath("types", "abstract", file), readdir("../src/types/abstract")) Pages = map(file -> joinpath("base","types", "abstract", file), readdir("../src/base/types/abstract"))
Pages = map(file -> joinpath("types", file), readdir("../src/types")) ```
## Model types and contents
```@autodocs
Modules = [COBREXA]
Pages = map(file -> joinpath("base","types", file), readdir("../src/base/types"))
``` ```
## Base functions ## Base functions
...@@ -43,16 +49,16 @@ Modules = [COBREXA] ...@@ -43,16 +49,16 @@ Modules = [COBREXA]
Pages = map(file -> joinpath("analysis", file), readdir("../src/analysis")) Pages = map(file -> joinpath("analysis", file), readdir("../src/analysis"))
``` ```
### Model modifiers ### Flux sampling
```@autodocs ```@autodocs
Modules = [COBREXA] Modules = [COBREXA]
Pages = map(file -> joinpath("mods", file), readdir("../src/mods")) Pages = map(file -> joinpath("analysis", "sampling", file), readdir("../src/analysis/sampling"))
``` ```
## Miscellaneous utilities ## Miscellaneous utilities
```@autodocs ```@autodocs
Modules = [COBREXA] Modules = [COBREXA]
Pages = map(file -> joinpath("utils", file), readdir("../src/utils")) Pages = map(file -> joinpath("base", "utils", file), readdir("../src/base/utils"))
``` ```
...@@ -69,14 +69,8 @@ Dict{String,Float64} with 95 entries: ...@@ -69,14 +69,8 @@ Dict{String,Float64} with 95 entries:
## Tutorials ## Tutorials
```@contents ```@contents
Pages = [ Pages = readdir("tutorials")
"model_structure.md", Depth = 1
"io.md",
"model_construction.md",
"basic_analysis.md",
"sampling_tools.md",
]
Depth = 2
``` ```
## Functions reference ## Functions reference
......
# COBREXA Tutorials
```@contents
Pages = readdir("tutorials")
Depth = 2
```
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# Example # Example
```jldoctest ```
julia> vec = @flux_balance_analysis_vec model Tulip.Optimizer julia> flux_balance_analysis_vec(model, GLPK.Optimizer)
3-element Vector{Float64}: 3-element Vector{Float64}:
1.0 1.0
1.0 1.0
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
# Example # Example
``` ```
@flux_balance_analysis_vec model Tulip.Optimizer begin @flux_balance_analysis_vec model Tulip.Optimizer begin
modify_objective(biomass) change_objective(biomass)
modify_constraint(glucose, -8.0, -8.0) modify_constraint(glucose, -8.0, -8.0)
end end
``` ```
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
# Example # Example
``` ```
@flux_balance_analysis_dict model Tulip.Optimizer begin @flux_balance_analysis_dict model Tulip.Optimizer begin
modify_objective(biomass) change_objective(biomass)
modify_constraint(glucose, -8.0, -8.0) modify_constraint(glucose, -8.0, -8.0)
end end
``` ```
...@@ -125,10 +125,9 @@ s.t. S x = b ...@@ -125,10 +125,9 @@ s.t. S x = b
xₗ ≤ x ≤ xᵤ xₗ ≤ x ≤ xᵤ
``` ```
Optionally, you may specify one or more `modifications` to be applied to the models. Optionally, you may specify one or more "modifications" to be applied to the models.
See [`modify_constraint`](@ref), [`change_solver_attribute`](@ref),[`change_objective`](@ref), or
[`modify_solver_attribute`](@ref),[`modify_objective`](@ref), or [`change_sense`](@ref) for examples of modifications.
[`modify_sense`](@ref) for examples of modifications.
The `optimizer` must be set to perform the analysis, any JuMP solver will work. The `optimizer` must be set to perform the analysis, any JuMP solver will work.
...@@ -139,7 +138,7 @@ Returns a solved JuMP model from [`optimize_model`](@ref). ...@@ -139,7 +138,7 @@ Returns a solved JuMP model from [`optimize_model`](@ref).
optimizer = GLPK.Optimizer optimizer = GLPK.Optimizer
model = load_model(StandardModel, "e_coli_core.json") model = load_model(StandardModel, "e_coli_core.json")
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
solved_model = fba(model, optimizer; modifications=[modify_objective(biomass)]) solved_model = fba(model, optimizer; modifications=[change_objective(biomass)])
``` ```
""" """
......
...@@ -23,9 +23,9 @@ biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") ...@@ -23,9 +23,9 @@ biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
glucose = findfirst(model.reactions, "EX_glc__D_e") glucose = findfirst(model.reactions, "EX_glc__D_e")
opt_model = flux_balance_analysis(model, Tulip.Optimizer; opt_model = flux_balance_analysis(model, Tulip.Optimizer;
modifications=[modify_objective(biomass), modifications=[change_objective(biomass),
modify_constraint(glucose, -12, -12), modify_constraint(glucose, -12, -12),
modify_solver_attribute("IPM_IterationsLimit", 500)]) change_solver_attribute("IPM_IterationsLimit", 500)])
biomass_index = model[biomass] biomass_index = model[biomass]
λ = JuMP.value(opt_model[:x][biomass_index]) λ = JuMP.value(opt_model[:x][biomass_index])
......
...@@ -6,8 +6,6 @@ Test if `samples` generated by some sampling algorithm, e.g. `hit_and_run`, are ...@@ -6,8 +6,6 @@ Test if `samples` generated by some sampling algorithm, e.g. `hit_and_run`, are
consitent with the model's constraints. That is, if the `mass balances` and flux bound consitent with the model's constraints. That is, if the `mass balances` and flux bound
constraints (`ubs`, `lbs`) are satisfied. Returns a vector of indices where the constraints (`ubs`, `lbs`) are satisfied. Returns a vector of indices where the
constraints are violated. constraints are violated.
See also [`hit_and_run`](@ref), [`artificially_centered_hit_and_run`](@ref)
""" """
function test_samples(samples::Matrix{Float64}, mass_balance, balance, lbs, ubs) function test_samples(samples::Matrix{Float64}, mass_balance, balance, lbs, ubs)
violations = Int[] violations = Int[]
......
""" """
Metabolite struct. Metabolite structure.
# Fields # Fields
```` ````
...@@ -19,7 +19,7 @@ mutable struct Metabolite ...@@ -19,7 +19,7 @@ mutable struct Metabolite
charge::Maybe{Int} charge::Maybe{Int}
compartment::Maybe{String} compartment::Maybe{String}
notes::Notes notes::Notes
annotations::Annotations # everything is a String[] annotations::Annotations
Metabolite( Metabolite(
id = ""; id = "";
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
Check if a metabolite `met` has overlapping annotations with metabolites in `mets`. Check if a metabolite `met` has overlapping annotations with metabolites in `mets`.
The annotations checked are listed in `COBREXA._constants.metabolite_annotation_checks`. The annotations checked are listed in `COBREXA._constants.metabolite_annotation_checks`.
Return id of the first hit, otherwise `nothing`. Return id of the first hit, otherwise `nothing`.
See also: [`check_same_formula`](@ref), [`get_atoms`](@ref)
""" """
function check_duplicate_annotations( function check_duplicate_annotations(
cmet::Metabolite, cmet::Metabolite,
...@@ -33,8 +31,6 @@ end ...@@ -33,8 +31,6 @@ end
get_atoms(met::Metabolite) get_atoms(met::Metabolite)
Return a dictionary mapping the elements in a metabolite `met` to their stoichiometric coefficients. Return a dictionary mapping the elements in a metabolite `met` to their stoichiometric coefficients.
See also: [`check_duplicate_annotations`](@ref), [`check_same_formula`](@ref)
""" """
function get_atoms(met::Metabolite) function get_atoms(met::Metabolite)
atoms = Dict{String,Int}() atoms = Dict{String,Int}()
......
...@@ -205,11 +205,11 @@ end ...@@ -205,11 +205,11 @@ end
""" """
get_bound_vectors(opt_model) get_bound_vectors(opt_model)
Returns vectors of the lower and upper bounds of `opt_model` constraints, where 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_problem` or `opt_model` is a JuMP model constructed by e.g.
`flux_balance_analysis`. [`make_optimization_model`](@ref) or [`flux_balance_analysis`](@ref).
See also: [`make_optimization_problem`](@ref), [`flux_balance_analysis`](`ref`)
""" """
function get_bound_vectors(opt_model) function get_bound_vectors(opt_model)
lbconref = opt_model[:lbs] lbconref = opt_model[:lbs]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment