Tuesday, March 25, 2014

ClipCrop Installation on Linux Mint 16 nvm, Node, npm Included

ClipCrop is a tool for detecting structural variations from SAM files. And it's built with Node.js.

ClipCrop uses two softwares internally so they should be installed first.

Install SHRiMP2

SHRiMP is a software package for aligning genomic reads against a target genome.

$ mkdir ~/software
$ cd ~/software
$ wget http://compbio.cs.toronto.edu/shrimp/releases/SHRiMP_2_2_3.lx26.x86_64.tar.gz
$ tar xzvf SHRiMP_2_2_3.lx26.x86_64.tar.gz
$ cd SHRiMP_2_2_3
$ file bin/gmapper

Install BWA

BWA is a software package for mapping low-divergent sequences against a large reference genome.

BWA requires zlib so install it first

$ sudo apt-get install zlib1g-dev

Download latest BWA software from SourceForge

$ cd ~/Downloads
$ tar xjvf bwa-0.7.7.tar.bz2
$ cd bwa-0.7.7
$ make
$ sudo mv ~/Downloads/bwa-0.7.7 /usr/local/bin
$ sudo ln -s /usr/local/bin/bwa-0.7.7 /usr/local/bin/bwa
$ sudo nano /etc/profile

Copy-paste this at the end the document


Save it pressing CTRL + X, then Y and hit ENTER

Now, NVM and Node should be installed but before there are some dependencies.

$ sudo apt-get install build-essential
$ sudo apt-get install libssl-dev curl

Install NVM

NVM is Node Version Manager and allows you to use different versions of Node.js

$ git clone git://github.com/creationix/nvm.git ~/.nvm
$ source ~/.nvm/nvm.sh
$ nvm install v0.6.1
$ nvm use v0.6.1
Now using node v0.6.1

This installation also sets up Node.js v0.6.1, check:

$ node -v

To install ClipCrop we need one last thing which is NPM - Node Package Manager.

Install NPM

$ sudo apt-get install -y python-software-properties python g++ make
$ sudo add-apt-repository ppa:richarvey/nodejs
$ sudo apt-get update
$ sudo apt-get install nodejs npm

$ node -v

This last step will also install a Node.js version but before using ClipCrop, using NVM, Node.js version will be set to v0.6.1 like this:

$ nvm use v0.6.1
Now using node v0.6.1

If it says "No command 'nvm' found":

$ source ~/.nvm/nvm.sh

Install ClipCrop

$ cd ~
$ npm install clipcrop
$ cd ~/node_modules/clipcrop
$ npm link


$ clipcrop

This will tell you how to use the package and what options it has. More is available here.

Some pages to refer

Installation notes for BWA version 0.7.5a-r405, http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bwa.htm

Installing Node.js using NVM on Ubuntu, http://achinth.com/post/58263924087/installing-node-js-using-nvm-on-ubuntu

How to install node.js and npm in ubuntu or mint, http://developwithguru.com/how-to-install-node-js-and-npm-in-ubuntu-or-mint/

Installing Node.js via package manager, https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

npm documentation, https://www.npmjs.org/doc/

No comments: