Commit 9c9b6bc3 authored by St. Elmo's avatar St. Elmo
Browse files

Revert "fixed formatting"

This reverts commit 0f01c343.
parent 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",
......@@ -23,5 +26,5 @@ makedocs(modules = [COBREXA],
],
)
# delete core model that was downloaded as part of the documentation generation process
rm("e_coli_core.json")
# delete core model
rm("e_coli_core.json")
\ No newline at end of file
......@@ -24,8 +24,7 @@ using COBREXA
using JuMP
using Tulip
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
model = read_model("e_coli_core.json")
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
optimizer = Tulip.Optimizer
......@@ -39,7 +38,6 @@ using JSON
open("fluxes.json", "w") do io
JSON.print(io, sol)
end
rm("fluxes.json") # hide
```
## Solution inspection
......@@ -114,9 +112,7 @@ using COBREXA
using JuMP
using Tulip
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
model = read_model("e_coli_core.json")
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)
......
......@@ -46,18 +46,17 @@ 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
```@example intro
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)
```
......@@ -7,13 +7,9 @@ Currently, JSON and Matlab formatted models can be imported.
read_model(file_location::String)
```
```@example io
```@example ioexample
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
```
......@@ -25,10 +21,10 @@ Currently, JSON and Matlab models can be exported.
save_model(model::CobraModel, file_location::String)
```
```@example io
save_model(model, "e_coli_core_saved.json")
```@example ioexample
save_model(model, "e_coli_core2.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.
Please let me know when you run into model import/export problems by filing an issue.
\ No newline at end of file
......@@ -12,9 +12,7 @@ using COBREXA
using JuMP
using Tulip
model_location = "e_coli_core.json" # hide
model = read_model(model_location)
model = read_model("e_coli_core.json")
optimizer = Tulip.Optimizer
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
cons = Dict("EX_glc__D_e" => (-12.0, -12.0))
......@@ -22,4 +20,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
Supports Markdown
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