Followers

Sunday, June 23, 2013

Installation of Samtools and BEDTools in my new RH 6 64 bit server

Troubles come as a package when you start your new lab. In my effort to resurrect our old database Eumicrobedb.org, I am facing many issues such as installing myriad of packages that are open source. What I did over a period of a decade now needs to be done right away...

I never recall having any issues with installation of easy-to-install packages such as samtools and BEDTools. One of the reasons may be because the system admin was taking care of several system level library installations that were a pre-requisite. While compiling BEDTools, it complained about "undefined reference to `gzopen64'". Searching the forums, I figured out that it is complaining about not finding zlib. I checked installation several times and zlib was right there and was there on path. Checking the stdout of make commands I found that it searches zlib at the right place yet comes back in the end complaining about it. However, finally changing the LIBS path in makefile solved the problem.


Look for the line in Makefile
 'export LIBS'          
Change it to:
  export LIBS = YOUR_PATH/libz.so.1.2.7 -lz

$make clean
$make
It should compile fine.

Samtools:

With Samtools, the problem lasted for a very long time. It always exited with error
"samtools error bam_import.c:76: undefined reference to gzopen64"

I tried re-installing zlib, added zlib path to LD_LIBRARY_PATH, installed latest version zlib, nothing worked.
Finally changing CFLAGS in makefile did the trick :

Change
CFLAGS=         -g -Wall -O2
to
CFLAGS=         -g -Wall -O2 -L /usr/local/lib (This is where my zlib libraries are located)

.... It finally worked.

NOTE: Install as regular user. May be later you can copy the binary files to the system  
directories.

No comments:

Post a Comment