Long ago, I posted here the steps involved in setting up R packages for performing constraint based modelling (CBM) of genome scale metabolic models. It was Ubuntu 10.04 LTS back then. Now, I am trying to reproduce the same set-up on Ubuntu 13.10.
As a quick summary, we need the following R packages: "sybil", "sybilSBML", and "glpkAPI". The "sybilSBML" R package requires the Bioconductor package "rsbml" which requires "libsbml" library, which in turn depends on "swig". The "glpkAPI" is an R wrapper for glpk library which is the optimization engine.
I have been able to install all these packages by executing the following steps.
1. Install swig from ubuntu repositories.
sudo apt-get install swig
2. Install python-dev from ubuntu repositories.
sudo apt-get install python-dev
3. Install openjdk from ubuntu repositories.
sudo apt-get install openjdk-7-jdk
4. Install libxml2 and libxml2-dev from ubuntu repositories.
sudo apt-get install libxml2 libxml2-dev
5. Install libsbml 5.9.0 from sources. I downloaded the source file libsbml-5.9.0-core-plus-packages-src.tar.gz, extracted the contents and ran the following
sudo su
./configure --with-libxml=/usr --with-java --with-python --with-matlab=/usr/local/MATLAB/R2013a/
make
make install
ldconfig
6. Install the Bioconductor package "rsbml". I ran the following commands in R.
source("http://bioconductor.org/biocLite.R")
biocLite("rsbml")
7. Install the R packages "sybil" and "sybilSBML". I ran the following commands in R.
install.packages(c("sybil", "sybilSBML"))
8. Install glpk from ubuntu repositories.
sudo apt-get install glpk
9. Install R package glpkAPI. I downloaded the source of the R package, namely gplkAPI_1.2.9.tar.gz and ran the following command at the linux console.
As a quick summary, we need the following R packages: "sybil", "sybilSBML", and "glpkAPI". The "sybilSBML" R package requires the Bioconductor package "rsbml" which requires "libsbml" library, which in turn depends on "swig". The "glpkAPI" is an R wrapper for glpk library which is the optimization engine.
I have been able to install all these packages by executing the following steps.
1. Install swig from ubuntu repositories.
sudo apt-get install swig
2. Install python-dev from ubuntu repositories.
sudo apt-get install python-dev
3. Install openjdk from ubuntu repositories.
sudo apt-get install openjdk-7-jdk
4. Install libxml2 and libxml2-dev from ubuntu repositories.
sudo apt-get install libxml2 libxml2-dev
5. Install libsbml 5.9.0 from sources. I downloaded the source file libsbml-5.9.0-core-plus-packages-src.tar.gz, extracted the contents and ran the following
sudo su
./configure --with-libxml=/usr --with-java --with-python --with-matlab=/usr/local/MATLAB/R2013a/
make
make install
ldconfig
6. Install the Bioconductor package "rsbml". I ran the following commands in R.
source("http://bioconductor.org/biocLite.R")
biocLite("rsbml")
7. Install the R packages "sybil" and "sybilSBML". I ran the following commands in R.
install.packages(c("sybil", "sybilSBML"))
8. Install glpk from ubuntu repositories.
sudo apt-get install glpk
9. Install R package glpkAPI. I downloaded the source of the R package, namely gplkAPI_1.2.9.tar.gz and ran the following command at the linux console.
sudo
R CMD INSTALL glpkAPI_1.2.9.tar.gz
--configure-args="--with-glpk-lib=/usr/local/lib
--with-glpk-include=/usr/local/include --enable-gmp=no"
Comments
wget ftp://ftp.gnu.org/gnu/glpk/glpk-4.45.tar.gz
tar -xvzf glpk-4.45.tar.gz
cd glpk-4.45
./configure
make
make install
So, please use this as step 8 if you are interested in using both MATLAB (e.g. openCOBRA) and R (e.g. sybil) for metabolic modelling on the same machine.
Finally, I believe that many other GLPK versions might work with glpkmex as well as glpkAPI. But I just tried a couple of versions and as soon as I hit upon 4.45 which worked, I didn't try other versions.