Skip to main content

Setting up R packages for CBM of genome-scale metabolic models on Ubuntu 13.10

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.

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

Gopal said…
I recently tried to install glpkmex for MATLAB (to call GLPK functions from MATLAB) on this same machine which has R setup for metabolic modelling. The glpk version that came from the ubuntu repositories was not good for glpkmex apparently. I noticed from the release notes that glpkmex likes glpk 4.36 the best. But it turned out that glpkAPI in R did not like this 4.36 version. According to glpkAPI release notes, it needs version >=4.42. I however wanted to have both MATLAB/glpkmex and R/glpkAPI work. By trial and error I found that glpk version 4.45 is good for both. The installation was of glpk 4.45 was pretty straightforward:

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.

Popular posts from this blog

Set up for analysing genome-scale metabolic models on ubuntu

I wanted to start analysing genome-scale metabolic models. I am interested in metabolic modelling to study human diseases. At least as of now, my idea is to use R for the analysis. This post describes all the technical set-up that I am doing on my ubuntu 10.04 LTS machine in order to eventually start working with these models. As I am interested in human metabolic network, my model of interest is the reconstructed human metabolic model, recon 2. I googled to see where I can download it from. It has a web site http://humanmetabolism.org/. But the model is available for download from the supplementary material of this paper . There was a zip file that contained many files which I interpret as the generic human model and cell specific models for a variety of cell types. I first wanted to see the contents of these files with my eyes. I know that I could open these files with any text editor, but I also knew that there is something called SBML editor which is specifically designed fo...

A-link pad 10 review

I ordered this a-link pad 10 on 16.5 (from: (http://www.a-link.com/fi/PAD10/product.php) . It is a totally whimsical decision because there are no reviews about it in the internet. I picked up my tablet from a-link "store" in Tuomarila on 18.5. After I picked up, I went to VTT and charged it there while I was working. After that I got it home and have been testing. Test results (cons) in no specific order: 1. As of now, the touch doesn't work. Luckily I enabled under developer settings an option to show the visual feedback on touch. Because of that I know the reason why the tablet doesn't respond to touch. Apparently, there is a huge error the tablet makes as to where I touch. So, when I want to touch an OK button which is in the middle of the screen and put I finger right on the button, the tablet interprets my finger to be somewhere on the bottom left corner! For this reason, I am not able to use the tablet for the last 30 minutes. Since I am able to se...

Chetta idea - 1

Alternative title: proposal for a health care project. Diseases such as hypertension (high blood pressure), diabetes, obesity are becoming so common nowadays. It is hard to find people with no diseases. The lifestyle is certainly to be blamed. But what is the use if we just shut our mouth after finding the right thing to blame? Or how would I be different if I leave it there. So, here is a proposal for an automatic health-care system. Well, I know there maybe some treatments, but the idea here is to prevent the diseases. But, prevention really demands prediction of the disease occurrance much before the disease symptoms show off. But, since I am not a palmist or an astrologist, my proposal is to develop a method to stop the disease as soon as its onset or the symptoms appear. OK... it will become more clear as I go with the concrete examples. I would like to concentrate on hypertension and diabetes, because they appear to be the most common diseases. As most of you know, the best cure...