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
cc06a28a
Commit
cc06a28a
authored
Jan 10, 2022
by
Miroslav Kratochvil
Committed by
Miroslav Kratochvil
Jan 10, 2022
Browse files
clean up some leftover unions with Nothing
parent
17c91878
Pipeline
#51194
passed with stages
in 12 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/analysis/flux_balance_analysis.jl
View file @
cc06a28a
"""
flux_balance_analysis_vec(args...)::
Union
{Vector{Float64}
,Nothing
}
flux_balance_analysis_vec(args...)::
Maybe
{Vector{Float64}}
A variant of FBA that returns a vector of fluxes in the same order as reactions
of the model, if the solution is found.
...
...
@@ -13,7 +13,7 @@ flux_balance_analysis_vec(args...; kwargs...)::Maybe{Vector{Float64}} =
flux_vector
(
flux_balance_analysis
(
args
...
;
kwargs
...
))
"""
flux_balance_analysis_dict(model::MetabolicModel, args...)::
Union
{Dict{String, Float64}
,Nothing
}
flux_balance_analysis_dict(model::MetabolicModel, args...)::
Maybe
{Dict{String, Float64}}
A variant of FBA that returns a dictionary assigning fluxes to reactions, if
the solution is found. Arguments are passed to [`flux_balance_analysis`](@ref).
...
...
src/analysis/screening.jl
View file @
cc06a28a
...
...
@@ -175,7 +175,7 @@ screen_variants(model, variants, analysis; workers = [myid()]) =
screen
(
model
;
variants
=
variants
,
analysis
=
analysis
,
workers
=
workers
)
"""
screen_optimize_objective(_, optmodel)::
Union
{Float64
,Nothing
}
screen_optimize_objective(_, optmodel)::
Maybe
{Float64}
A variant of [`optimize_objective`](@ref) directly usable in
[`screen_optmodel_modifications`](@ref).
...
...
src/base/types/FluxVariabilitySummary.jl
View file @
cc06a28a
...
...
@@ -4,8 +4,8 @@
Stores summary information about the result of a flux variability analysis.
"""
struct
FluxVariabilitySummary
biomass_fluxes
::
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}
exchange_fluxes
::
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}
biomass_fluxes
::
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}
exchange_fluxes
::
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}
end
"""
...
...
@@ -15,8 +15,8 @@ A default empty constructor for [`FluxVariabilitySummary`](@ref).
"""
function
FluxVariabilitySummary
()
FluxVariabilitySummary
(
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}(),
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}(),
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}(),
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}(),
)
end
...
...
@@ -84,14 +84,14 @@ function flux_variability_summary(
rxn_ids
,
)
biomass_fluxes
=
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}()
biomass_fluxes
=
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}()
for
rxn_id
in
bmasses
lb
=
isnothing
(
flux_result
[
1
][
rxn_id
])
?
nothing
:
flux_result
[
1
][
rxn_id
][
rxn_id
]
ub
=
isnothing
(
flux_result
[
2
][
rxn_id
])
?
nothing
:
flux_result
[
2
][
rxn_id
][
rxn_id
]
biomass_fluxes
[
rxn_id
]
=
[
lb
,
ub
]
end
ex_rxn_fluxes
=
Dict
{
String
,
Vector
{
Union
{
Float64
,
Nothing
}}}()
ex_rxn_fluxes
=
Dict
{
String
,
Vector
{
Maybe
{
Float64
}}}()
for
rxn_id
in
ex_rxns
lb
=
isnothing
(
flux_result
[
1
][
rxn_id
])
?
nothing
:
flux_result
[
1
][
rxn_id
][
rxn_id
]
ub
=
isnothing
(
flux_result
[
2
][
rxn_id
])
?
nothing
:
flux_result
[
2
][
rxn_id
][
rxn_id
]
...
...
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