Unverified Commit f5c7abc7 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil Committed by GitHub
Browse files

Merge pull request #383 from LCSB-BioCore/mk-final-doc-fixes

final doc fixes for 1.0.3
parents fa0f82f2 da3def7b
Pipeline #43945 passed with stages
in 29 minutes and 14 seconds
......@@ -21,12 +21,13 @@ and overload the required accessors. The accessors are functions that extract
some relevant information, such as [`stoichiometry`](@ref) and
[`bounds`](@ref), returning a fixed simple data type that can be further used
by COBREXA. You may see a complete list of accessors
[here](../functions#Base-Types).
[here](../functions.md#Base-Types).
A good solution to the second concern is a slightly more involved, as writing
generic data modifiers is notoriously hard. Still, there is support for easily
making small changes to the model using the modifications system, with
functions such as [`with_added_reactions`](@ref) and [`with_set_bound`](@ref).
functions such as [`with_added_reactions`](@ref) and
[`with_changed_bound`](@ref).
!!! tip "Notebook available"
A better example of using a custom model structure is available
......
......@@ -77,6 +77,11 @@ Modules = [COBREXA]
Pages = map(file -> joinpath("base", "utils", file), readdir("../src/base/utils"))
```
```@autodocs
Modules = [COBREXA]
Pages = map(file -> joinpath("base", "macros", file), readdir("../src/base/macros"))
```
### Logging and debugging helpers
```@autodocs
......
......@@ -27,7 +27,7 @@ macro _change_bounds_fn(model_type, idx_type, args...)
docstring = """
$fname(
model::$model_type,
$idx_var::$idx_type,
$idx_var::$idx_type;
lower = $missing_default,
upper = $missing_default,
)
......
"""
Reaction struct.
mutable struct Reaction
id::String
name::Maybe{String}
metabolites::Dict{String,Float64}
lb::Float64
ub::Float64
grr::Maybe{GeneAssociation}
subsystem::Maybe{String}
notes::Notes
annotations::Annotations
objective_coefficient::Float64
end
# Fields
````
id :: String
name :: String
metabolites :: Dict{Metabolite, Float64}
lb :: Float64
ub :: Float64
grr :: Vector{Vector{Gene}}
subsystem :: String
notes :: Dict{String, Vector{String}}
annotation :: Dict{String, Union{Vector{String}, String}}
objective_coefficient :: Float64
````
A structure for representing a single reaction in a [`StandardModel`](@ref).
"""
mutable struct Reaction
id::String
......@@ -29,18 +28,18 @@ mutable struct Reaction
end
"""
Reaction(
id = "";
name = nothing,
metabolites = Dict{String,Float64}(),
lb = -_constants.default_reaction_bound,
ub = _constants.default_reaction_bound,
grr = nothing,
subsystem = nothing,
notes = Notes(),
annotations = Annotations(),
objective_coefficient = 0.0,
)
Reaction(
id = "";
name = nothing,
metabolites = Dict{String,Float64}(),
lb = -_constants.default_reaction_bound,
ub = _constants.default_reaction_bound,
grr = nothing,
subsystem = nothing,
notes = Notes(),
annotations = Annotations(),
objective_coefficient = 0.0,
)
A constructor for Reaction that only takes a reaction `id` and
assigns default/uninformative values to all the fields that are not
......@@ -74,12 +73,12 @@ function Reaction(
end
"""
Reaction(
id::String,
metabolites::Dict{String,Union{Int, Float64}},
dir = :bidirectional;
default_bound = _constants.default_reaction_bound,
)
Reaction(
id::String,
metabolites::Dict{String,Union{Int, Float64}},
dir = :bidirectional;
default_bound = _constants.default_reaction_bound,
)
Convenience constructor for `Reaction`. The reaction equation is specified using
`metabolites`, which is a dictionary mapping metabolite ids to stoichiometric
......
Markdown is supported
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