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
7585e9e8
Unverified
Commit
7585e9e8
authored
Aug 09, 2021
by
St. Elmo
Browse files
remove Gurobi
parent
fe477a48
Pipeline
#45204
passed with stages
in 11 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/src/notebooks/2_finding_balance.jl
View file @
7585e9e8
...
...
@@ -121,17 +121,18 @@ flux_variability_summary((fva_mins, fva_maxs))
# value of the minimized flux and the associated biomass growth rate is returned instead
# of every flux.
biomass_idx
=
first
(
indexin
([
"BIOMASS_Ecoli_core_w_GAM"
],
reactions
(
model
)))
# index of biomass function
biomass_idx
=
first
(
indexin
([
"
R_
BIOMASS_Ecoli_core_w_GAM"
],
reactions
(
model
)))
# index of biomass function
vs
=
flux_variability_analysis
(
model
,
Gurobi
.
Optimizer
;
Tulip
.
Optimizer
;
bounds
=
objective_bounds
(
0.50
),
# biomass can vary up to 50% less than optimum
modifications
=
[
change_optimizer_attribute
(
"IPM_IterationsLimit"
,
500
),
change_constraint
(
"EX_glc__D_e"
,
-
10
,
-
10
),
change_constraint
(
"EX_o2_e"
,
0.0
,
0.0
),
change_constraint
(
"
R_
EX_glc__D_e"
,
-
10
,
-
10
),
change_constraint
(
"
R_
EX_o2_e"
,
0.0
,
0.0
),
],
ret
=
m
->
(
COBREXA
.
JuMP
.
objective_value
(
m
),
COBREXA
.
JuMP
.
value
(
m
[
:
x
][
25
])),
# m is the model and m[:x] extracts the fluxes from the model
ret
=
m
->
(
COBREXA
.
JuMP
.
objective_value
(
m
),
COBREXA
.
JuMP
.
value
(
m
[
:
x
][
biomass_idx
])),
# m is the model and m[:x] extracts the fluxes from the model
)
#
fva_mins
=
Dict
(
rxn
=>
flux
for
(
rxn
,
flux
)
in
zip
(
reactions
(
model
),
vs
[
:
,
1
]))
...
...
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