Skip to content

Instantly share code, notes, and snippets.

View laurentheirendt's full-sized avatar
✈️

Laurent Heirendt laurentheirendt

✈️
View GitHub Profile
@laurentheirendt
laurentheirendt / printFuxVector_iJO1366.m
Created December 29, 2017 22:01
printFuxVector - iJO1366
initCobraToolbox
model = readCbModel('iJO1366.mat');
changeCobraSolver('gurobi'); % this example uses Gurobi, but you may use any other solver
FBAsolution = optimizeCbModel(model,'max',0,0);
printFluxVector(model,FBAsolution.x, true, true);
@laurentheirendt
laurentheirendt / exampleFVAR2017a.m
Created November 25, 2017 19:26
Example for FVA in R2017a
initCobraToolbox
% Input the E.coli core model
model = readCbModel('ecoli_core_model.mat');
model = changeRxnBounds(model,'EX_glc(e)',0,'l');
model = changeRxnBounds(model,'EX_succ(e)',-20,'l');
% Set objective function
model = changeObjective(model,'EX_etoh(e)');
% model = changeObjective(model,'Biomass_Ecoli_core_N(w/GAM)_Nmet2');
@laurentheirendt
laurentheirendt / createCbModel.jl
Last active September 27, 2017 12:43
create a COBRA model in Julia
using COBRA
# define the stoichiometric matrix
S = [
1 0 0 0 0 0 0
1 -1 0 0 0 0 0
0 -1 0 -1 0 0 0
0 1 0 1 0 0 0
0 1 0 1 0 0 0
0 1 -1 0 0 0 0
@laurentheirendt
laurentheirendt / gource.sh
Last active February 11, 2019 09:11 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# https://github.com/acaudwell/Gource
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install