Install bioperl module Bio::DB::Sam on Ubuntu 17.10
1
0
Entering edit mode
6.0 years ago

Dear all,

I am trying to install Bio::DB::Sam in order to have CREST running. I installed samtools with apt and the solutions in this post did not work because I got an error in compiling samtools (and anyway, it is already installed). Since he first problem was the root access, I replicated with 'sudo'; although there was more processing, the outcome was the same. I also tried with 'force' but with no success.

I found that the libraries bam.h and libbam.a are in /home/gigiux/src/dwgsim/samtools since they were present in the tool dwgsim otherwise there are no other. Maybe this is the problem.

From the build.log file there are several modules missing, suc as Data::Stag. Alas I cannot fit build.log here because it will overflow the word count. Shouldn't they be installed when I installed BioPerl (which I have done with CPAN)?

How can I go ahead?

Thank you

This is the output of the installation:

$ cpanm Bio::DB::Sam
!
! Can't write to /usr/local/share/perl/5.26.0 and /usr/local/bin: Installing modules to /home/gigiux/perl5
! To turn off this warning, you have to do one of the following:
!   - run me as a root or with --sudo option (to install to /usr/local/share/perl/5.26.0 and /usr/local/bin)
!   - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
!   - Install local::lib by running the following commands
!
!         cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
--> Working on Bio::DB::Sam
Fetching http://www.cpan.org/authors/id/L/LD/LDS/Bio-SamTools-1.43.tar.gz ... OK
Configuring Bio-SamTools-1.43 ... Please enter the location of the bam.h and compiled libbam.a files: /home/gigiux/src/dwgsim/samtools
OK
Building and testing Bio-SamTools-1.43 ... FAIL
! Installing Bio::DB::Sam failed. See /home/gigiux/.cpanm/work/1523348725.18948/build.log for details. Retry with --force to force install it.

 $ cpanm Bio::DB::Sam --force
!
! Can't write to /usr/local/share/perl/5.26.0 and /usr/local/bin: Installing modules to /home/gigiux/perl5
! To turn off this warning, you have to do one of the following:
!   - run me as a root or with --sudo option (to install to /usr/local/share/perl/5.26.0 and /usr/local/bin)
!   - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
!   - Install local::lib by running the following commands
!
!         cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
--> Working on Bio::DB::Sam
Fetching http://www.cpan.org/authors/id/L/LD/LDS/Bio-SamTools-1.43.tar.gz ... OK
Configuring Bio-SamTools-1.43 ... Please enter the location of the bam.h and compiled libbam.a files: /home/gigiux/src/dwgsim/samtools
OK
Building and testing Bio-SamTools-1.43 ... FAIL
! Installing Bio::DB::Sam failed. See /home/gigiux/.cpanm/work/1523348745.18997/build.log for details. Retry with --force to force install it.

$ sudo cpanm Bio::DB::Sam --force
--> Working on Bio::DB::Sam
Fetching http://www.cpan.org/authors/id/L/LD/LDS/Bio-SamTools-1.43.tar.gz ... OK
Configuring Bio-SamTools-1.43 ... Please enter the location of the bam.h and compiled libbam.a files: /home/gigiux/src/dwgsim/samtools
OK
==> Found dependencies: Bio::Root::Version
--> Working on Bio::Root::Version
Fetching http://www.cpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-1.007002.tar.gz ... OK
Configuring BioPerl-1.007002 ... OK
==> Found dependencies: Test::Most, Data::Stag
--> Working on Test::Most
Fetching http://www.cpan.org/authors/id/O/OV/OVID/Test-Most-0.35.tar.gz ... OK
Configuring Test-Most-0.35 ... OK
==> Found dependencies: Test::Exception, Test::Deep, Exception::Class, Test::Differences, Test::Warn
--> Working on Test::Exception
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Exception-0.43.tar.gz ... OK
Configuring Test-Exception-0.43 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz ... OK
Configuring Sub-Uplevel-0.2800 ... OK
Building and testing Sub-Uplevel-0.2800 ... OK
Successfully installed Sub-Uplevel-0.2800
Building and testing Test-Exception-0.43 ... OK
Successfully installed Test-Exception-0.43
--> Working on Test::Deep
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Deep-1.127.tar.gz ... OK
Configuring Test-Deep-1.127 ... OK
Building and testing Test-Deep-1.127 ... OK
Successfully installed Test-Deep-1.127
--> Working on Exception::Class
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Exception-Class-1.44.tar.gz ... OK
Configuring Exception-Class-1.44 ... OK
==> Found dependencies: Devel::StackTrace, Class::Data::Inheritable
--> Working on Devel::StackTrace
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-2.03.tar.gz ... OK
Configuring Devel-StackTrace-2.03 ... OK
Building and testing Devel-StackTrace-2.03 ... OK
Successfully installed Devel-StackTrace-2.03
--> Working on Class::Data::Inheritable
Fetching http://www.cpan.org/authors/id/T/TM/TMTM/Class-Data-Inheritable-0.08.tar.gz ... OK
Configuring Class-Data-Inheritable-0.08 ... OK
Building and testing Class-Data-Inheritable-0.08 ... OK
Successfully installed Class-Data-Inheritable-0.08
Building and testing Exception-Class-1.44 ... OK
Successfully installed Exception-Class-1.44
--> Working on Test::Differences
Fetching http://www.cpan.org/authors/id/D/DC/DCANTRELL/Test-Differences-0.64.tar.gz ... OK
Configuring Test-Differences-0.64 ... OK
==> Found dependencies: Text::Diff
--> Working on Text::Diff
Fetching http://www.cpan.org/authors/id/N/NE/NEILB/Text-Diff-1.45.tar.gz ... OK
Configuring Text-Diff-1.45 ... OK
Building and testing Text-Diff-1.45 ... OK
Successfully installed Text-Diff-1.45
Building and testing Test-Differences-0.64 ... OK
Successfully installed Test-Differences-0.64
--> Working on Test::Warn
Fetching http://www.cpan.org/authors/id/B/BI/BIGJ/Test-Warn-0.32.tar.gz ... OK
Configuring Test-Warn-0.32 ... OK
Building and testing Test-Warn-0.32 ... OK
Successfully installed Test-Warn-0.32
Building and testing Test-Most-0.35 ... OK
Successfully installed Test-Most-0.35
--> Working on Data::Stag
Fetching http://www.cpan.org/authors/id/C/CM/CMUNGALL/Data-Stag-0.14.tar.gz ... OK
Configuring Data-Stag-0.14 ... OK
Building and testing Data-Stag-0.14 ... OK
Successfully installed Data-Stag-0.14
Building and testing BioPerl-1.007002 ... OK
Successfully installed BioPerl-1.007002
Building and testing Bio-SamTools-1.43 ... FAIL
! Installing Bio::DB::Sam failed. See /home/gigiux/.cpanm/work/1523349040.19234/build.log for details. Retry with --force to force install it.
12 distributions installed
$ whereis samtools
samtools: /usr/bin/samtools /usr/bin/samtools.pl /usr/local/bin/samtools /usr/local/bin/samtools.pl /usr/share/man/man1/samtools.1.gz
software error bioperl • 4.6k views
ADD COMMENT
0
Entering edit mode

Is this tool expecting to find an old version of samtools (v.0.1.19)?

ADD REPLY
0
Entering edit mode

the samtools i have installed is version 1.6

ADD REPLY
0
Entering edit mode

! Installing Bio::DB::Sam failed. See /home/gigiux/.cpanm/work/1523349040.19234/build.log for details. Retry with --force to force install it.

So what about /home/gigiux/.cpanm/work/1523349040.19234/build.log?

ADD REPLY
0
Entering edit mode

marongiu.luigi : Use pastebin for long log entries that don't fit here.

ADD REPLY
0
Entering edit mode

I wanted to add it to the post, but it is too big. Maybe as an attachment but I don't know how to send it. Anyway it has a list of modules missing, such as Bio::Root::Version, Data::Stag, Test::Most, Algorithm::Munkres, Array::Compare, Bio::Phylo, Convert::Binary, GD, Graphand many many more. If so many modules are missing, what is the point of installing BioPerl in the first place?

ADD REPLY
0
Entering edit mode

Did you read /home/gigiux/.cpanm/work/1523349040.19234/build.log? It should have further information on why the build fails.

edit: see previous thread on the same issue: bio::db::sam installation error

You already have seen it.

ADD REPLY
0
Entering edit mode
6.0 years ago
h.mon 35k

the solutions in this post did not work because I got an error in compiling samtools (and anyway, it is already installed).

It is not enough to have samtools installed, you need the correct version of samtools installed. SAMtools version 0.1.17 (I guess 0.1.18 and / or 0.1.19 should also work) is a requirement of Bio::DB::Sam, so you should first troubleshoot the old SAMtools install, then proceed to Bio::DB::Sam.

ADD COMMENT
0
Entering edit mode

the version installed with apt should be 0.1.19, although from the command line I get: Program: samtools (Tools for alignments in the SAM format) Version: 1.4.1 (using htslib 1.5)

ADD REPLY
0
Entering edit mode

No, for Ubuntu 17.10, it should be samtools 1.4.1 (as it indeed is):

apt search samtools

samtools/artful,now 1.4.1-1build1 amd64 [installed]

processing sequence alignments in SAM and BAM formats

ADD REPLY
0
Entering edit mode

and isn't that the one I have already? 1.4.1?

ADD REPLY
0
Entering edit mode

You have v.1.4.1 but Bio::BD:Sam perl module likely requires v.0.1.1x. That is an ancient version of samtools that you may need to manually install.

ADD REPLY
0
Entering edit mode

You said:

the version installed with apt should be 0.1.19

I just pointed out this is incorrect.

ADD REPLY

Login before adding your answer.

Traffic: 1695 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6