2011-10-01

Must have: PLINK and GenABEL

Recently some toolsets for genome-wide association studies popped out and made everybody's life easier. In the spotlights of this category are PLINK - a software written in C/C++, and GenABEL - a R package. Both programs run on Linux/PC/Mac. This first 'Must have' post is dedicated to present you these powerful tools and help you installing them.

I won't really do a PLINK x GenABEL pros/cons comment because although they were designed with the same objective - to provide comprehensible functions and routines for GWAS - they have interesting features of their own that when properly combined can offer high quality analyses. I strongly recommend going through their documentations > http://pngu.mgh.harvard.edu/~purcell/plink and http://www.genabel.org/tutorials/ABEL-tutorial. It is interesting to make a novel of it, seeking information as you need them.

GenABEL installation
First open R. Installing GenABEL is easy:

>install.packages("GenABEL",dependencies=TRUE)

You will be prompted to select a CRAN mirror - just pick the nearest to your location. That's it.

PLINK installation
This one is a little bit trickier. Go to http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml and download the file that best represents your platform. After downloading, If you are running XP or W7 you should copy the executable file to C:\windows\. All you must to do now is opening a Command Prompt and have fun! PLINK is called by simply typing plink. You will see this:


@----------------------------------------------------------@
|        PLINK!       |     v1.07      |   10/Aug/2009     |
|----------------------------------------------------------|
|  (C) 2009 Shaun Purcell, GNU General Public License, v2  |
|----------------------------------------------------------|
|  For documentation, citation & bug-report instructions:  |
|        http://pngu.mgh.harvard.edu/purcell/plink/        |
@----------------------------------------------------------@

Web-based version check ( --noweb to skip )
Connecting to web...  OK, v1.07 is current

Writing this text to log file [ plink.log ]
Analysis started: Sat Oct  1 21:30:15 2011

Options in effect:

Before frequency and genotyping pruning, there are 0 SNPs
0 founders and 0 non-founders found
0 SNPs failed missingness test ( GENO > 1 )
0 SNPs failed frequency test ( MAF < 0 )
After frequency and genotyping pruning, there are 0 SNPs

ERROR: Stopping as there are no SNPs left for analysis

If you are not a fan of CLI you can try out gPLINK - a GUI for PLINK. But honestly you will have to deal with the CLI sooner or later.

If you work on a Linux/UNIX system you must pass the pathway to PLINK to your shell through the $PATH variable. Unfortunately the way to do that depends on the shell you are using. I will give support for two shells in this post: bash and zsh. If you are not sure which one is yours just open a terminal and type:

% echo $SHELL

You should get something like:

/bin/zsh
or
/bin/bash

Next step is to define where PLINK will be stored. I like to have all my softwares in a directory called programs on my Desktop - you can unzip the files pretty much wherever you find convenient. Let's say you have a folder like mine. Unzip the files there and open a terminal. Type:

% nano ~/.zshrc - for zsh
% nano ~/.bashrc - for bash

this will open the resources file for your shell with the text processor nano. This is where custom initializations and settings are definied. Type this anywhere:

PATH=$PATH:/home/yourusername/Desktop/programs/PLINK/plink-1.07-x86_64
export PATH

or if you downloaded the i686

PATH=$PATH:/home/yourusername/Desktop/programs/PLINK/plink-1.07-i686
export PATH

After this close nano with cntrl+X and save modifications. Type:

% source ~/.zshrc
or
% source ~/.bashrc

and then try:

% plink

If it works you will see the same standard out as shown before.

That's all for now folks. This post is not helpful in a practical way but before hammering we should make clear where the hammer is. Comments or suggestions please go ahead!

*Not native speaker - sorry any typos!

No comments:

Post a Comment