Commit 14389dc0 authored by St. Elmo's avatar St. Elmo
Browse files

updated readme slight. Still need to work on badges

parent bfca340e
......@@ -5,7 +5,6 @@
# Constraint-Based Reconstruction and EXascale Analysis
......@@ -20,89 +19,36 @@
[![][license-img]][license-url] [![contributions welcome][contrib]](
[![][license-img]][license-url] [![contributions welcome][contrib]](
| **Documentation** | **Tests** | **Coverage** |
| [![docs-img]][docs-url] | [![CI][ci-img]][ci-url] | [![codecov][cov-img]][cov-url] |
This is package aims to provide constraint based reconstruction and analysis (COBRA) tools in the Julia environment, similar to Cobrapy in Python and the Cobra Toolbox in Matlab.
This package provides basic convenience functions, e.g. model IO, construction, modification, and FBA, pFBA, sampling, etc. It can also be used to interface with [Equilibrator]( and [BRENDA](
More importantly, it also exposes the user to the core structures used in COBRA, e.g. the stoichiometric matrix, etc., so that custom optimization routines can be written as painlessly as possible (due in large part to [JuMP]( An alternative Julia package hosted by openCOBRA, [COBRA.jl](, also exists, but its scope is more restricted than `CobraTools.jl`.
This is package aims to provide constraint based reconstruction and analysis tools at the exa-scale in Julia.
## Installation
To install this package: `] add`. See the documentation for more information.
To install this package: `] add ???`. See the documentation for more information.
## Quick Example
Let's use `CobraTools.jl` to perform classic flux balance analysis on an *E. coli* genome-scale metabolic model.
Let's use `COBREXA.jl` to perform classic flux balance analysis on an *E. coli* community.
using CobraTools
using JuMP
using Tulip # pick any solver supported by JuMP
# Import E. coli model (models have pretty printing)
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")
# Import E. coli models (models have pretty printing)
model_1 = read_model("iJO1366.json")
model_2 = read_model("iJO1366.json")
model_3 = read_model("iJO1366.json")
# FBA - use convenience function
sol = fba(model, biomass, Tulip.Optimizer)
If you are feeling more adventurous you can perform the optimization yourself using `JuMP`.
# Get the constraint based model (cbm) in JuMP format
# 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)
# Use index notation to get biomass equation index
@objective(cbm, Max, v[model[biomass]])
# Map fluxes to reaction ids
sol = map_fluxes(v, model)
If you are feeling even more adventurous you can do everything yourself!
# Get S*v = b with lbvec <= v <= ubvec from model
S, b, ubvec, lbvec = get_core_model(model)
# Manually define the model in JuMP
cbm = JuMP.Model(Tulip.Optimizer)
nvars = size(S, 2)
v = @variable(cbmodel, v[1:nvars])
mb = @constraint(cbmodel, mb, S*v .== b)
lbs = @constraint(cbmodel, lbs, lbs .<= v)
ubs = @constraint(cbmodel, ubs, v .<= ubs)
@objective(cbm, Max, v[model[biomass]])
sol = map_fluxes(v, model)
# Build an exascale model
exascale_model = join(model_1, model_2, model_3,...)
More funcionality is described in the documention, e.g. model construction and analysis in pure Julia.
## Progress
- [ ] Read SBML models
- [ ] Write SBML models
- [ ] Single gene knockouts
- [ ] Thermodynamic FBA (and related functions)
- [x] Read JSON "Cobrapy" models
- [x] Read Matlab models
- [x] Write JSON models
- [x] Write Matlab models
- [x] FBA
- [x] pFBA
- [x] FVA
- [x] Implement sampling (hit and run)
- [x] Implement sampling (achr - kind of, fix constraint issue...)
- [x] Equilibrator integration
- [x] Brenda integration (basic)
- [x] Reaction construction
- [x] Model construction
- [x] Model modifications
### 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).
2) Heirendt, L., Arreckx, S., Pfau, T. et al. (2019). Creation and analysis of biochemical constraint-based models using the COBRA Toolbox v.3.0. Nat Protoc 14, 639–702.
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