Crate kair[][src]

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


Read and optimize e_coli_core model

use kair::{ModelLp, flux_analysis::fba};
use std::{str::FromStr, fs::File, io::{BufReader, prelude::*}};
use good_lp::default_solver;

let file = std::fs::File::open("examples/EcoliCore.xml").unwrap();
let mut buf_reader = BufReader::new(file);
let mut contents = String::new();
buf_reader.read_to_string(&mut contents).unwrap();
let mut model = ModelLp::from_str(&contents).unwrap();
for (name, val) in fba(&mut model, default_solver).unwrap().iter() {
    println!("{} = {}", name, val)

Additional links


pub use flux_analysis::fba;
pub use model::ModelLp;



COBRA methods that take an LpProblem and a Solver


Structs for the formulation of the LP problem from the SBML model