I followed the instructions from the README file below Bio-SamTools-1.43 to edit the Makefile in samtools 0.1.17. Then, to install, I used
perl -MCPAN -e shell install Bio :: DB :: Sam
Readme
This is the Perl interface for sequencing the SAMtools interface. It ONLY works on versions of Samtools prior to 0.1.17. It does not work with version 1.0 or higher due to major changes to the library structure.
See http://samtools.sourceforge.net/ for documentation on samtools.
In the root directory of this distribution you will find the script INSTALL.pl. By running this, you download the latest versions of this module and SamTools into a temporary directory, compile them, test and install them. Just run:
perl INSTALL.pl
A more traditional installation requires you to separately download, unzip and compile SAMtools from 0.1.10 to 0.1.17 in some available directories. Entering "make" in the samtools directory will usually work. SAMtools version 0.1.18 and higher do not work with this library.
Then set the SAMTOOLS environment variable to specify this directory.
You will also need to install Bio :: Perl from CPAN.
Now run:
perl Build.PL. / build ./Build test (sudo) ./ Build install
MALFUNCTIONS:
If problems arise during compilation, you may need to modify Build.PL so that extra_compiler_flags matches CFLAGS and DFLAGS settings in the SamTools Makefile. Here are some common problems:
- When creating this module, you will receive the following error: moving R_X86_64_32 in relation to the "local character" cannot be used when creating a shared object; recompile with -fPIC
To fix this, edit the Makefile in the Samtools distribution by adding "-fPIC" to the CFLAGS line. While you're on it, you might also want to get rid of a bunch of unused alert variables that appear under the latest versions of gcc. Modified CFLAGS will look like this:
CFLAGS = -g -Wall -Wno-unused -Wno-unused-result -O2 -fPIC # -m64 # -arch ppc
Then do "make clean, make" in the Samtools directory to recompile the library. After that, you can build this module without error.
- When you create this module, you get a library error message.
To fix this, follow the recipe in (1), with the exception of adding -m64 to CFLAGS so it looks like this:
CFLAGS = -g -Wall -O2 -fPIC # -m64 # -arch ppc
TESTS AND CONFIRMATION:
You can get the latest version of this module using its GitHub site at https://github.com/GMOD/GBrowse-Adaptors . please feel free to send bug reports, corrections, etc. via github.
AUTHOR:
Lincoln D. Stein
Copyright (c) 2009-2015 Ontario Cancer Research Institute
This package and its accompanying libraries are free software; you can redistribute it and / or modify it in accordance with the terms of the artistic License 2.0, the Apache 2.0 license, or the GNU General Public License (version 1 or higher). Contact LICENSE for the full text of the license.