Commit da3def7b authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

fix Reaction docs

closes #381
parent f14566e6
Pipeline #43944 passed with stages
in 10 minutes and 49 seconds
"""
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