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(
linkcheck = !("skiplinks" in ARGS),
pages = [
"Home" => "index.md",
"Functions" => "functions.md",
"Tutorials" => "tutorials.md",
"Function reference" => "functions.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
## Types
## Base Types
```@autodocs
Modules = [COBREXA]
Pages = map(file -> joinpath("types", "abstract", file), readdir("../src/types/abstract"))
Pages = map(file -> joinpath("types", file), readdir("../src/types"))
Pages = map(file -> joinpath("base","types", "abstract", file), readdir("../src/base/types/abstract"))
```
## Model types and contents
```@autodocs
Modules = [COBREXA]
Pages = map(file -> joinpath("base","types", file), readdir("../src/base/types"))
```
## Base functions
......@@ -43,16 +49,16 @@ Modules = [COBREXA]
Pages = map(file -> joinpath("analysis", file), readdir("../src/analysis"))
```
### Model modifiers
### Flux sampling
```@autodocs
Modules = [COBREXA]
Pages = map(file -> joinpath("mods", file), readdir("../src/mods"))
Pages = map(file -> joinpath("analysis", "sampling", file), readdir("../src/analysis/sampling"))
```
## Miscellaneous utilities
```@autodocs
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:
## Tutorials
```@contents
Pages = [
"model_structure.md",
"io.md",
"model_construction.md",
"basic_analysis.md",
"sampling_tools.md",
]
Depth = 2
Pages = readdir("tutorials")
Depth = 1
```
## Functions reference
......
# COBREXA Tutorials
```@contents
Pages = readdir("tutorials")
Depth = 2
```
......@@ -3,8 +3,8 @@
# Example
```jldoctest
julia> vec = @flux_balance_analysis_vec model Tulip.Optimizer
```
julia> flux_balance_analysis_vec(model, GLPK.Optimizer)
3-element Vector{Float64}:
1.0
1.0
......@@ -23,7 +23,7 @@ end
# Example
```
@flux_balance_analysis_vec model Tulip.Optimizer begin
modify_objective(biomass)
change_objective(biomass)
modify_constraint(glucose, -8.0, -8.0)
end
```
......@@ -60,7 +60,7 @@ end
# Example
```
@flux_balance_analysis_dict model Tulip.Optimizer begin
modify_objective(biomass)
change_objective(biomass)
modify_constraint(glucose, -8.0, -8.0)
end
```
......@@ -125,10 +125,9 @@ s.t. S x = b
xₗ ≤ x ≤ xᵤ
```
Optionally, you may specify one or more `modifications` to be applied to the models.
See [`modify_constraint`](@ref),
[`modify_solver_attribute`](@ref),[`modify_objective`](@ref), or
[`modify_sense`](@ref) for examples of modifications.
Optionally, you may specify one or more "modifications" to be applied to the models.
[`change_solver_attribute`](@ref),[`change_objective`](@ref), or
[`change_sense`](@ref) for examples of modifications.
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).
optimizer = GLPK.Optimizer
model = load_model(StandardModel, "e_coli_core.json")
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")
glucose = findfirst(model.reactions, "EX_glc__D_e")
opt_model = flux_balance_analysis(model, Tulip.Optimizer;
modifications=[modify_objective(biomass),
modifications=[change_objective(biomass),
modify_constraint(glucose, -12, -12),
modify_solver_attribute("IPM_IterationsLimit", 500)])
change_solver_attribute("IPM_IterationsLimit", 500)])
biomass_index = model[biomass]
λ = 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
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 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)
violations = Int[]
......
"""
Metabolite struct.
Metabolite structure.
# Fields
````
......@@ -19,7 +19,7 @@ mutable struct Metabolite
charge::Maybe{Int}
compartment::Maybe{String}
notes::Notes
annotations::Annotations # everything is a String[]
annotations::Annotations
Metabolite(
id = "";
......
......@@ -4,8 +4,6 @@
Check if a metabolite `met` has overlapping annotations with metabolites in `mets`.
The annotations checked are listed in `COBREXA._constants.metabolite_annotation_checks`.
Return id of the first hit, otherwise `nothing`.
See also: [`check_same_formula`](@ref), [`get_atoms`](@ref)
"""
function check_duplicate_annotations(
cmet::Metabolite,
......@@ -33,8 +31,6 @@ end
get_atoms(met::Metabolite)
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)
atoms = Dict{String,Int}()
......
......@@ -206,10 +206,10 @@ end
get_bound_vectors(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_problem` or
`flux_balance_analysis`.
`opt_model` is a JuMP model constructed by e.g.
[`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)
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