Commit e957ee8b authored by St. Elmo's avatar St. Elmo
Browse files

can't download a file in Documenter.jl

parent 9c9b6bc3
using Documenter, COBREXA using Documenter, COBREXA
# download core model # download core model
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json") # download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
makedocs(modules = [COBREXA], makedocs(modules = [COBREXA],
clean = false, clean = false,
...@@ -27,4 +27,4 @@ makedocs(modules = [COBREXA], ...@@ -27,4 +27,4 @@ makedocs(modules = [COBREXA],
) )
# delete core model # delete core model
rm("e_coli_core.json") rm("e_coli_core.json")
\ No newline at end of file
...@@ -24,6 +24,7 @@ using COBREXA ...@@ -24,6 +24,7 @@ using COBREXA
using JuMP using JuMP
using Tulip using Tulip
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
model = read_model("e_coli_core.json") model = read_model("e_coli_core.json")
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
...@@ -121,5 +122,6 @@ set_optimizer(cbm, Tulip.Optimizer) ...@@ -121,5 +122,6 @@ set_optimizer(cbm, Tulip.Optimizer)
@objective(cbm, Max, v[model[biomass]]) @objective(cbm, Max, v[model[biomass]])
optimize!(cbm) optimize!(cbm)
sol = map_fluxes(v, model) sol = map_fluxes(v, model)
rm("e_coli_core.json") # hide
``` ```
...@@ -51,12 +51,11 @@ using COBREXA ...@@ -51,12 +51,11 @@ using COBREXA
using JuMP using JuMP
using Tulip using Tulip
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
model = read_model("e_coli_core.json") model = read_model("e_coli_core.json")
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
optimizer = Tulip.Optimizer optimizer = Tulip.Optimizer
sol = fba(model, biomass, optimizer) sol = fba(model, biomass, optimizer)
rm("e_coli_core.json") # hide
``` ```
...@@ -9,8 +9,10 @@ read_model(file_location::String) ...@@ -9,8 +9,10 @@ read_model(file_location::String)
```@example ioexample ```@example ioexample
using COBREXA using COBREXA
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
model = read_model("e_coli_core.json") model = read_model("e_coli_core.json")
rm("e_coli_core.json") # hide
model # pretty printing model # pretty printing
``` ```
...@@ -27,4 +29,4 @@ rm("e_coli_core2.json") # hide ...@@ -27,4 +29,4 @@ rm("e_coli_core2.json") # hide
``` ```
## IO Problems? ## 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,7 +12,9 @@ using COBREXA ...@@ -12,7 +12,9 @@ using COBREXA
using JuMP using JuMP
using Tulip using Tulip
download("http://bigg.ucsd.edu/static/models/e_coli_core.json", "e_coli_core.json")
model = read_model("e_coli_core.json") model = read_model("e_coli_core.json")
rm("e_coli_core.json") # hide
optimizer = Tulip.Optimizer optimizer = Tulip.Optimizer
biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM")
cons = Dict("EX_glc__D_e" => (-12.0, -12.0)) 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 ...@@ -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) 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) samples = hit_and_run(100_000, model, optimizer; keepevery=10, samplesize=5000, constraints=cons)
``` ```
\ No newline at end of file
Markdown is supported
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