Installing and compiling examples

From BITS wiki
Jump to: navigation, search
Go back to parent page Introduction to Linux for bioinformatics

tsne, a dimensionality reduction tool

The home page of tsne provides a binary to be downloaded to run the program.

mcl, simple compiling of a clustering tool

MCL is a command line tool for clustering data. Download it from http://micans.org/mcl/ and try to install it.

Quip, a tool to compress fastq files

Download the compressed tar ball at this link. Copy to /opt and extract the tar ball.

 
 $ pwd
/home/joachim/Downloads
 $ wget http://homes.cs.washington.edu/~dcjones/quip/quip-1.1.8.tar.gz
--2013-10-28 11:22:40--  http://homes.cs.washington.edu/~dcjones/quip/quip-1.1.8.tar.gz
Resolving homes.cs.washington.edu (homes.cs.washington.edu)... 128.208.3.226
Connecting to homes.cs.washington.edu (homes.cs.washington.edu)|128.208.3.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 271626 (265K) [application/x-gzip]
Saving to: `quip-1.1.8.tar.gz'
 
100%[======================================>] 271,626      290K/s   in 0.9s    
 
2013-10-28 11:22:42 (290 KB/s) - `quip-1.1.8.tar.gz' saved [271626/271626]
 
 $ sudo cp quip-1.1.8.tar.gz /opt
[sudo] password for joachim: 
 $ cd /opt
 $ ls
fastQValidator_0.1.1a                firefox              quip-1.1.8.tar.gz
FastQValidatorLibStatGen.0.1.1a.tgz  mint-flashplugin-11
 $ sudo tar xvfz quip-1.1.8.tar.gz 
quip-1.1.8/
quip-1.1.8/aclocal.m4
quip-1.1.8/._ar-lib
quip-1.1.8/ar-lib
quip-1.1.8/._compile
quip-1.1.8/compile
quip-1.1.8/config.guess
quip-1.1.8/config.sub
quip-1.1.8/configure
quip-1.1.8/configure.ac
quip-1.1.8/COPYING
quip-1.1.8/._depcomp
quip-1.1.8/depcomp
quip-1.1.8/._install-sh
quip-1.1.8/install-sh
quip-1.1.8/m4/
quip-1.1.8/Makefile.am
quip-1.1.8/Makefile.in
quip-1.1.8/._missing
quip-1.1.8/missing
quip-1.1.8/quip-format.md
quip-1.1.8/quip.1
quip-1.1.8/README.md
quip-1.1.8/src/
quip-1.1.8/test-driver
quip-1.1.8/tests/
quip-1.1.8/tests/bammd5.c
quip-1.1.8/tests/fastqmd5.c
quip-1.1.8/tests/Makefile.am
quip-1.1.8/tests/Makefile.in
quip-1.1.8/tests/md5.c
quip-1.1.8/tests/md5.h
quip-1.1.8/tests/random_fastq.c
quip-1.1.8/src/ac.c
quip-1.1.8/src/ac.h
quip-1.1.8/src/assembler.c
quip-1.1.8/src/assembler.h
quip-1.1.8/src/bloom.c
quip-1.1.8/src/bloom.h
quip-1.1.8/src/config.h.in
quip-1.1.8/src/crc64.c
quip-1.1.8/src/crc64.h
quip-1.1.8/src/crc64_table_be.h
quip-1.1.8/src/crc64_table_le.h
quip-1.1.8/src/dist.c
quip-1.1.8/src/dist.h
quip-1.1.8/src/dist_impl.c
quip-1.1.8/src/dist_impl.h
quip-1.1.8/src/dist_template_off.h
quip-1.1.8/src/dist_template_on.h
quip-1.1.8/src/fastqfmt.c
quip-1.1.8/src/fastqfmt.h
quip-1.1.8/src/idenc.c
quip-1.1.8/src/idenc.h
quip-1.1.8/src/kmer.c
quip-1.1.8/src/kmer.h
quip-1.1.8/src/kmerhash.c
quip-1.1.8/src/kmerhash.h
quip-1.1.8/src/Makefile.am
quip-1.1.8/src/Makefile.in
quip-1.1.8/src/misc.c
quip-1.1.8/src/misc.h
quip-1.1.8/src/qualenc.c
quip-1.1.8/src/qualenc.h
quip-1.1.8/src/quip.c
quip-1.1.8/src/quip.h
quip-1.1.8/src/quipfmt.c
quip-1.1.8/src/quipfmt.h
quip-1.1.8/src/quiplib.c
quip-1.1.8/src/sam/
quip-1.1.8/src/samfmt.c
quip-1.1.8/src/samfmt.h
quip-1.1.8/src/samopt.c
quip-1.1.8/src/samopt.h
quip-1.1.8/src/samoptenc.h
quip-1.1.8/src/seqenc.c
quip-1.1.8/src/seqenc.h
quip-1.1.8/src/seqmap.c
quip-1.1.8/src/seqmap.h
quip-1.1.8/src/strmap.c
quip-1.1.8/src/strmap.h
quip-1.1.8/src/twobit.c
quip-1.1.8/src/twobit.h
quip-1.1.8/src/version.h
quip-1.1.8/src/version.h.in
quip-1.1.8/src/sam/bam.c
quip-1.1.8/src/sam/bam.h
quip-1.1.8/src/sam/bam_aux.c
quip-1.1.8/src/sam/bam_endian.h
quip-1.1.8/src/sam/bam_import.c
quip-1.1.8/src/sam/bgzf.c
quip-1.1.8/src/sam/bgzf.h
quip-1.1.8/src/sam/khash.h
quip-1.1.8/src/sam/kseq.h
quip-1.1.8/src/sam/kstring.c
quip-1.1.8/src/sam/kstring.h
quip-1.1.8/src/sam/sam.c
quip-1.1.8/src/sam/sam.h
quip-1.1.8/src/sam/sam_header.c
quip-1.1.8/src/sam/sam_header.h
quip-1.1.8/m4/acx_pthread.m4
 $ ls
fastQValidator_0.1.1a                firefox              quip-1.1.8
FastQValidatorLibStatGen.0.1.1a.tgz  mint-flashplugin-11  quip-1.1.8.tar.gz

Compile the program by following the instructions on their website.

 
 $ cd /opt/quip-1.1.8
 $ ./configure
...
 $ sudo make
...
 $ cd src
 $ ./quip
 $ ./quip 
 
quip: stdin: assuming input in FASTQ.
 
quip: stdin: refusing to write compressed data to your terminal screen.
 
Use -f is you really want to do this. (Hint: you don't.)
 $ quip
No command 'quip' found, did you mean:
 Command 'quiz' from package 'bsdgames' (universe)
quip: command not found
 $ sudo ln -s /opt/quip-1.1.8/src/quip /usr/local/bin
 $ quip
 
quip: stdin: assuming input in FASTQ.
 
quip: stdin: refusing to write compressed data to your terminal screen.
 
Use -f is you really want to do this. (Hint: you don't.)
$ ls -l /usr/local/bin/quip
lrwxrwxrwx 1 root root 24 Oct 28 11:57 /usr/local/bin/quip -> /opt/quip-1.1.8/src/quip

If you get errors, read them: the important line here is zlib.h: No such file or directory. This usually means some software package on which the tool is dependent is not installed. Some searching on the internet (include your distro name, and the error message) reveals:

sudo apt-get install libssl-dev cmake g++

fastQValidator

A useful package is fastQValidator, a small tool to validate your fastq sequences. [You can't believe how many mistakes can be made in the .fastq format]. Install this similarly as Quip above.

Download the compressed tar ball at this link. Extract the tar ball to /opt.

 
 $ pwd
/home/joachim/Downloads
 $  wget http://genome.sph.umich.edu/w/images/2/20/FastQValidatorLibStatGen.0.1.1a.tgz
--2013-10-28 10:51:28--  http://genome.sph.umich.edu/w/images/2/20/FastQValidatorLibStatGen.0.1.1a.tgz
Resolving genome.sph.umich.edu (genome.sph.umich.edu)... 141.211.8.98
Connecting to genome.sph.umich.edu (genome.sph.umich.edu)|141.211.8.98|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 548190 (535K) [application/x-gzip]
Saving to: `FastQValidatorLibStatGen.0.1.1a.tgz'
 
100%[=========================================================>] 548,190      129K/s   in 4.3s    
 
2013-10-28 10:51:32 (124 KB/s) - `FastQValidatorLibStatGen.0.1.1a.tgz' saved [548190/548190]
 
 $ sudo cp FastQValidatorLibStatGen.0.1.1a.tgz /opt
 $ cd /opt
 $ ls
FastQValidatorLibStatGen.0.1.1a.tgz  firefox  mint-flashplugin-11
 $ sudo tar xvfz FastQValidatorLibStatGen.0.1.1a.tgz 
fastQValidator_0.1.1a/fastQValidator/
fastQValidator_0.1.1a/fastQValidator/Makefile.inc
fastQValidator_0.1.1a/fastQValidator/Makefile
...
fastQValidator_0.1.1a/libStatGen/general/MathMatrix.cpp
fastQValidator_0.1.1a/libStatGen/general/MemoryMap.cpp
fastQValidator_0.1.1a/libStatGen/general/FortranFormat.h
fastQValidator_0.1.1a/libStatGen/general/Sort.h
 $ ls -lh
total 548K
drwxr-xr-x 4 root root 4.0K Oct 28 10:53 fastQValidator_0.1.1a
-rw-r--r-- 1 root root 536K Oct 28 10:52 FastQValidatorLibStatGen.0.1.1a.tgz
drwxr-xr-x 4 root root 4.0K May  3  2012 firefox
drwxr-xr-x 2 root root 4.0K Oct  8 10:25 mint-flashplugin-11

Compile the program by following the instructions on their website.

 
 $ cd fastQValidator_0.1.1a/
 $ sudo make all
make[1]: Entering directory `/opt/fastQValidator_0.1.1a/libStatGen'
make[2]: Entering directory `/opt/fastQValidator_0.1.1a/libStatGen/samtools'
ln  -s ../samtools/bgzf.h ../include/bgzf.h
ln  -s ../samtools/knetfile.h ../include/knetfile.h
ln  -s ../samtools/khash.h ../include/khash.h
ln  -s ../samtools/bam.h ../include/bam.h
mkdir -p obj
gcc -O4  -pipe -Wall -I../include -I.  -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS  -o obj/bgzf.o -c bgzf.c 
In file included from bgzf.c:37:0:
bgzf.h:30:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make[2]: *** [obj/bgzf.o] Error 1
make[2]: Leaving directory `/opt/fastQValidator_0.1.1a/libStatGen/samtools'
make[1]: *** [samtools] Error 2
make[1]: Leaving directory `/opt/fastQValidator_0.1.1a/libStatGen'
make: *** [libStatGen/] Error 2

If you get errors, read them: the important line here is zlib.h: No such file or directory. This usually means some software package on which the tool is dependent is not installed. Some searching on the internet (include your distro name, and the error message) reveals: [ this link

sudo apt-get install libssl-dev cmake g++



Go back to parent page Introduction to Linux for bioinformatics