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

update docs

parent 83d15d3b
......@@ -50,7 +50,7 @@ sol = fba(model, biomass, Tulip.Optimizer)
If you are feeling more adventurous you can perform the optimization yourself using `JuMP`.
```julia
# Get the constraint based model (cbm) in JuMP format
# S*v=b (mb: mass balance constraints) with lbs <= v <= ubs
# cbm: S*v=b (mb: mass balance constraints) with lbs <= v <= ubs
cbm, v, mb, ubs, lbs = build_cbm(model)
# Use JuMP functions to optimize the constraint based model
set_optimizer(cbm, Tulip.Optimizer)
......@@ -76,31 +76,32 @@ ubs = @constraint(cbmodel, ubs, v .<= ubs)
optimize!(cbm)
sol = map_fluxes(v, model)
```
More funcionality is described in the documention.
More funcionality is described in the documention, e.g. model construction and analysis in pure Julia.
## Progress
- [x] Read JSON "Cobrapy" models
- [x] Read Matlab models
- [ ] Read SBML models
- [ ] Read YAML models
- [x] Write JSON models
- [x] Write Matlab models
- [ ] Write SBML models
- [ ] Write YAML
- [x] FBA
- [X] pFBA
- [ ] MOMA
- [ ] FVA
- [x] Implement sampling (hit and run)
- [x] Implement sampling (achr - kind of?)
- [x] Implement sampling (achr - kind of, fix constraint issue...)
- [ ] Single gene knockouts
- [ ] Double gene knockout
- [x] Equilibrator integration
- [x] Brenda integration (basic)
- [x] Reaction construction
- [x] Model construction
- [x] Model modifications
- [ ] Distributed analysis (COBRA.jl integration?)
- [ ] Thermodynamic FBA (and related functions)
### Citations
1) Ebrahim, A., Lerman, J.A., Palsson, B.O. & Hyduke, D. R. (2013). COBRApy: COnstraints-Based Reconstruction and Analysis for Python. BMC Systems Biology, 7(74). https://doi.org/10.1186/1752-0509-7-74
......
......@@ -11,7 +11,8 @@ makedocs(
"Optimization Based Analysis" => "basic_analysis.md",
"Sampling Tools" => "sampling_tools.md",
"Equilibrator Interface" => "thermo_tools.md",
"Brenda Interface" => "brenda_tools.md"
"Brenda Interface" => "brenda_tools.md",
"Thermodynamic Analysis" => "thermodynamics.md"
]
)
......
......@@ -189,35 +189,46 @@ add!(model::CobraTools.Model, rxns::Array{Reaction, 1})
add!(model::CobraTools.Model, mets::Array{Metabolite, 1})
add!(model::CobraTools.Model, genes::Array{Gene, 1})
```
Checking for duplicates can also be done.
Checking for duplicates of genes, metabolites or reactions can also be done.
Note that duplicate checking is NOT performed when models are imported.
If you suspect the model quality you should check each reaction, metabolite and gene yourself.
```@docs
is_duplicate(model::CobraTools.Model, rxn::Reaction)
is_duplicate(model::CobraTools.Model, cmet::Metabolite)
is_duplicate(model::CobraTools.Model, cgene::Gene)
check_duplicate_annotations(genes::Array{Gene, 1}, gene::Gene)
check_duplicate_annotations(mets::Array{Metabolite, 1}, cmet::Metabolite)
check_duplicate_annotations(rxns::Array{Reaction, 1}, crxn::Reaction)
check_same_formula(mets::Array{Metabolite, 1}, met::Metabolite)
check_duplicate_reaction(rxns::Array{Reaction, 1}, crxn::Reaction)
```
```@example
using CobraTools # hide
atp = Metabolite("atp")
adp = Metabolite("adp")
anabolism = 10.0 * atp + 10.0*h2o ⟶ 10.0*adp + 10.0*pp
anabolism.id = "anabolism"
anabolism = 10.0 * atp + 10.0*h2o ⟶ 10.0*adp + 10.0*pp
anabolism.id = "anabolism2"
mets = [atp, adp]
rxns = [anabolism]
model = Model()
model.id = "Test model"
add!(model, mets)
add!(model, rxns)
is_duplicate(model, anabolism2)
using CobraTools
met1 = Metabolite()
met1.id = "met1"
met1.name = "Metabolite 1"
met1.formula = "C6H12O6N"
met1.charge = 1
met1.compartment = "c"
met1.notes = Dict("notes"=>["This is a made up metabolite", "Another note"])
met1.annotation = Dict("sboterm" => "sbo000001", "kegg.compound" => ["C0001", "C0010"])
met2 = Metabolite("met2")
met2.formula = "C6H12O6N"
met3 = Metabolite("met3")
met3.formula = "X"
met3.annotation = Dict("sboterm" => "sbo00001", "kegg.compound" => ["C02222", "C0001"])
mets = [met1, met2, met3]
dup, ind = check_duplicate_annotations(mets, met3)
if dup
println("Duplicate found at index: ", ind)
end
mms = check_same_formula([met3, met1], met2)
println("Metabolites with the same formula as \"met2\":")
mms[1]
```
Similar functionality exists for genes and reactions.
Duplicate reactions, metabolites or genes can be removed using `rm!`.
```@docs
rm!(model::CobraTools.Model, rxns::Union{Array{Reaction, 1}, Reaction})
......
# Thermodynamic Analysis
\ 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