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