Installation instructions for SAMtools 0.1.8
Additional libraries
You need to install the following libraries:
libncurses-dev
% sudo apt-get install -y libncurses-dev
Procedure
To install SAMtools from source code, you need to follow this recipe:
- The archive with the source code was downloaded from the web site and decompressed in
/home/bioubuntu
:
% tar -jxvf samtools-0.1.8.tar.bz2
- Warning!! If you are compiling SAMtools on a 64-bit platform and you want to use it in building the Staden package, you will need to modify the
Makefile
file. You will need to edit the following line:
# Before CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
# After CFLAGS= -g -Wall -O2 -m64 -fPIC #-arch ppc
- The newly created folder is moved under
/opt/bio/sources
. We need to make sure that it belongs toroot
and its permissions are set to755
:
% sudo mv samtools-0.1.8 /opt/bio/sources % sudo chown -R root:root /opt/bio/sources/samtools-0.1.8 % sudo chmod 755 /opt/bio/sources/samtools-0.1.8
- Once you are in the folder, compilation is easily performed:
% cd /opt/bio/sources/samtools-0.1.8 % sudo make
- To make
samtools
available to all, you have to do this:
% sudo ln -s /opt/bio/sources/samtools-0.1.8/samtools /usr/local/bin/samtools