Commit 83d15d3b authored by St. Elmo's avatar St. Elmo
Browse files

updated docs/readme

parent 1799b794
......@@ -43,13 +43,14 @@ model = read_model("iJO1366.json")
# Choose objective to maximize (biomass is a reaction struct, which also has pretty printing)
biomass = findfirst(model.reactions, "BIOMASS_Ec_iJO1366_WT_53p95M")
# FBA - use convenience functions
sol = fba(model, biomass, Tulip.Optimizer))
# FBA - use convenience function
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
# Get the constraint based model (cbm) in JuMP format
# 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)
......
......@@ -5,13 +5,13 @@ Each model is a struct of the type `CobraTools.Model`, which is composed of a mo
Model
```
The fields of `Reaction`, `Metabolite`, `Gene` types are shown below.
When reading, writing, building or analysing models, these fields are what is used by `CobraTools.jl`.
When reading, writing, building or analysing models, these fields are what is used by `CobraTools`.
```@docs
Reaction
```
Note, the format of `grr` in `Reaction` should be a nested array, like `[[g1, g2], [g3, g4], ...]`.
Note, the format of `grr` (gene reaction rule) in `Reaction` should be a nested array, like `[[g1, g2], [g3, g4], ...]`.
Each sub-array, e.g. `[g1, g2]`, is composed of essential genes (`g1::CobraTools.Gene`, etc.) for the reaction to function.
Thus, if the reaction requires (`g1` and `g2`) or (`g3` and `g4`) to function, then this would be represented by `[[g1, g2], [g3, g4]]` in `grr`. Also note, the metabolites dictionary field of `Reaction` maps a `Metabolite` to its stoichiometrix coefficient.
Thus, if the reaction requires (`g1` and `g2`) or (`g3` and `g4`) to function, then this would be represented by `[[g1, g2], [g3, g4]]` in `grr`. Also note, the metabolites dictionary field of `Reaction` maps a `Metabolite` to its stoichiometrix coefficient, i.e. it represents the reaction equation.
```@docs
Metabolite
```
......
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