Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
0f01c343
Commit
0f01c343
authored
Mar 18, 2021
by
St. Elmo
Browse files
fixed formatting
parent
e97a3182
Changes
5
Hide whitespace changes
Inline
Side-by-side
docs/make.jl
View file @
0f01c343
using
Documenter
,
COBREXA
# download core model
download
(
"http://bigg.ucsd.edu/static/models/e_coli_core.json"
,
"e_coli_core.json"
)
makedocs
(
modules
=
[
COBREXA
],
clean
=
false
,
sitename
=
"COBREXA.jl"
,
...
...
@@ -26,5 +23,5 @@ makedocs(modules = [COBREXA],
],
)
# delete core model
rm
(
"e_coli_core.json"
)
\ No newline at end of file
# delete core model that was downloaded as part of the documentation generation process
rm
(
"e_coli_core.json"
)
docs/src/basic_analysis.md
View file @
0f01c343
...
...
@@ -24,7 +24,8 @@ using COBREXA
using JuMP
using Tulip
model = read_model("e_coli_core.json")
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
optimizer = Tulip.Optimizer
...
...
@@ -38,6 +39,7 @@ using JSON
open("fluxes.json", "w") do io
JSON.print(io, sol)
end
rm("fluxes.json") # hide
```
## Solution inspection
...
...
@@ -112,7 +114,9 @@ using COBREXA
using JuMP
using Tulip
model = read_model("e_coli_core.json")
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
cbm, v, mb, ubs, lbs = build_cbm(model)
glucose_index = model[findfirst(model.reactions, "EX_glc__D_e")]
set_bound(glucose_index, ubs, lbs; ub=-12.0, lb=-12.0)
...
...
docs/src/index.md
View file @
0f01c343
...
...
@@ -46,17 +46,18 @@ The optimization solvers are implemented through `JuMP` and thus this package sh
## Quick Example
Let's perform flux balance analysis on a constraint based model.
```
@example
intro
```
@example
using COBREXA
using JuMP
using Tulip
# Download a model from the BIGG database
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
# Read that model into Julia
model = read_model("e_coli_core.json")
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
optimizer = Tulip.Optimizer
sol = fba(model, biomass, optimizer)
```
docs/src/io.md
View file @
0f01c343
...
...
@@ -7,9 +7,13 @@ Currently, JSON and Matlab formatted models can be imported.
read_model(file_location::String)
```
```
@example io
example
```
@example io
using COBREXA
# Download a model from the BIGG database
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
# Read that model into Julia
model = read_model("e_coli_core.json")
model # pretty printing
```
...
...
@@ -21,10 +25,10 @@ Currently, JSON and Matlab models can be exported.
save_model(model::CobraModel, file_location::String)
```
```
@example io
example
save_model(model, "e_coli_core
2
.json")
```
@example io
save_model(model, "e_coli_core
_saved
.json")
rm("e_coli_core2.json") # hide
```
## IO Problems?
Please let me know when you run into model import/export problems by filing an issue.
\ No newline at end of file
Please let me know when you run into model import/export problems by filing an issue.
docs/src/sampling_tools.md
View file @
0f01c343
...
...
@@ -12,7 +12,9 @@ using COBREXA
using JuMP
using Tulip
model = read_model("e_coli_core.json")
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
optimizer = Tulip.Optimizer
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
cons = Dict("EX_glc__D_e" => (-12.0, -12.0))
...
...
@@ -20,4 +22,4 @@ sol = fba(model, biomass, optimizer, constraints=cons) # classic flux balance an
cons["BIOMASS_Ecoli_core_w_GAM"] = (sol["BIOMASS_Ecoli_core_w_GAM"], sol["BIOMASS_Ecoli_core_w_GAM"]*0.99)
samples = hit_and_run(100_000, model, optimizer; keepevery=10, samplesize=5000, constraints=cons)
```
\ No newline at end of file
```
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