Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
f5c7abc7
Unverified
Commit
f5c7abc7
authored
Jul 10, 2021
by
Miroslav Kratochvil
Committed by
GitHub
Jul 10, 2021
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
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
docs/src/advanced/2_custom_model.md
View file @
f5c7abc7
...
@@ -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
...
...
docs/src/functions.md
View file @
f5c7abc7
...
@@ -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
...
...
src/base/macros/change_bounds.jl
View file @
f5c7abc7
...
@@ -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,
)
)
...
...
src/base/types/Reaction.jl
View file @
f5c7abc7
"""
"""
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,7 +28,7 @@ mutable struct Reaction
...
@@ -29,7 +28,7 @@ mutable struct Reaction
end
end
"""
"""
Reaction(
Reaction(
id = "";
id = "";
name = nothing,
name = nothing,
metabolites = Dict{String,Float64}(),
metabolites = Dict{String,Float64}(),
...
@@ -40,7 +39,7 @@ Reaction(
...
@@ -40,7 +39,7 @@ Reaction(
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
...
...
cylon-x
🤖
@cylon-x
mentioned in commit
6e3abc4c
·
Jul 10, 2021
mentioned in commit
6e3abc4c
mentioned in commit 6e3abc4cbe69ffd6a47fe4d032666867ec8be515
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment