[−][src]Crate kair
Constraint-Based Reconstruction and Analysis. It uses the rust_sbml to read a SBML document and translates it into a LP formulation using lp_modeler
COBRA methods available
Examples
Read and optimize e_coli_core model
use kair::ModelLP; use std::str::FromStr; let file_str = std::fs::read_to_string("examples/EcoliCore.xml").unwrap(); let model = ModelLP::from_str(&file_str).unwrap(); println!( "Model has {:?} constraints and {:?} variables", &model.constraints.len(), &model.variables.len() ); for (name, val) in model.optimize().unwrap().iter() { println!("{} = {}", name, val) }
Additional links
- Github repository, open to PRs!
- rust_sbml: SBML parser in rust.
- cobrapy: fully featured COBRA package written in Python.
Structs
ModelLP | LP problem as a Flux Balance Analysis formulation. |
Traits
Fbc | Indicate that the struct can be translated to a flux balance variable (generally, reactions) |
Functions
fba | Optimize the model according to Flux Balance Analysis (FBA). FBA: https://pubmed.ncbi.nlm.nih.gov/20212490/ |