SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
freebayes installation problems(*****) AnushaC Bioinformatics 1 06-16-2015 05:13 AM
problems with installation FastQC shirley47162928 Bioinformatics 3 05-04-2015 05:57 PM
BWA installation problems seq_GA Bioinformatics 22 04-28-2015 05:15 PM
Problems with Bio-linux/Ubuntu 14.04 Kimist99 Bioinformatics 16 04-24-2015 04:25 AM
Tophat Installation problems sebastion Bioinformatics 0 01-10-2012 08:14 AM

Reply
 
Thread Tools
Old 10-02-2015, 12:20 PM   #1
Robby
Member
 
Location: Germany

Join Date: Mar 2011
Posts: 68
Default Installation problems Bio-SamTools

Hi everybody,

I would like to install Bio-SamTools 1.41 without root-permissions. I tried the following commands:
Code:
perl Build.PL --install_base /home/$User/perl5
./Build
But I received the following error:
Code:
Building Bio-SamTools
which: no nmake in ([...])
gcc -g -Wall -O2 -fPIC -o bam2bedgraph bam2bedgraph.o  -L/path/samtools -lbam -lpthread -lm -lz
bam2bedgraph.o: In function `main':
/path/Bio-SamTools-1.41/c_bin/bam2bedgraph.c:62: undefined reference to `hts_idx_load'
bam2bedgraph.o: In function `bam_index_destroy':
/path/samtools/bam.h:449: undefined reference to `hts_idx_destroy'
/path/samtools/libbam.a(bam_aux.o): In function `bam_parse_region':
/path/samtools/bam_aux.c:63: undefined reference to `hts_parse_reg'
/path/samtools/bam_aux.c:67: undefined reference to `bam_name2id'
/path/samtools/libbam.a(bam.o): In function `bam_fetch':
/path/software/samtools/bam.c:84: undefined reference to `bam_init1'
/path/samtools/libbam.a(bam.o): In function `bam_iter_query':
/path/samtools/bam.h:475: undefined reference to `sam_itr_queryi'
/path/samtools/libbam.a(bam.o): In function `bam_iter_read':
/path/samtools/bam.h:476: undefined reference to `hts_itr_next'
/path/samtools/bam.h:476: undefined reference to `bam_read1'
/path/samtools/libbam.a(bam.o): In function `bam_iter_destroy':
/path/samtools/bam.h:477: undefined reference to `hts_itr_destroy'
/path/samtools/libbam.a(bam.o): In function `bam_fetch':
/path/samtools/bam.c:88: undefined reference to `bam_destroy1'
/path/samtools/libbam.a(bam.o): In function `bam_format1':
/path/samtools/bam.c:37: undefined reference to `sam_format1'
/path/samtools/libbam.a(sam.o): In function `samfaipath':
/path/samtools/sam.c:102: undefined reference to `hts_verbose'
/path/samtools/sam.c:103: undefined reference to `fai_build'
/path/samtools/libbam.a(sam.o): In function `sampileup':
/path/samtools/sam.c:77: undefined reference to `bam_init1'
/path/samtools/libbam.a(sam.o): In function `samread':
/path/samtools/sam.h:95: undefined reference to `sam_read1'
/path/samtools/libbam.a(sam.o): In function `sampileup':
/path/samtools/sam.c:88: undefined reference to `bam_destroy1'
/path/samtools/libbam.a(sam.o): In function `samclose':
/path/samtools/sam.c:66: undefined reference to `bam_hdr_destroy'
/path/samtools/sam.c:67: undefined reference to `hts_close'
/path/samtools/libbam.a(sam.o): In function `samopen':
/path/samtools/sam.c:41: undefined reference to `hts_open'
/path/samtools/sam.c:48: undefined reference to `hts_set_fai_filename'
/path/samtools/sam.c:49: undefined reference to `sam_hdr_read'
/path/samtools/sam.c:51: undefined reference to `hts_verbose'
/path/samtools/sam.c:57: undefined reference to `hts_get_format'
/path/samtools/sam.c:57: undefined reference to `sam_hdr_write'
/path/samtools/libbam.a(sam.o): In function `samthreads':
/path/samtools/sam.c:33: undefined reference to `hts_get_format'
/path/samtools/sam.c:34: undefined reference to `bgzf_mt'
/path/samtools/libbam.a(bam_plbuf.o): In function `bam_plbuf_push':
/path/samtools/bam_plbuf.c:61: undefined reference to `bam_plp_push'
/path/samtools/bam_plbuf.c:63: undefined reference to `bam_plp_next'
/path/samtools/libbam.a(bam_plbuf.o): In function `bam_plbuf_destroy':
/path/samtools/bam_plbuf.c:53: undefined reference to `bam_plp_destroy'
/path/samtools/libbam.a(bam_plbuf.o): In function `bam_plbuf_init':
/path/samtools/bam_plbuf.c:45: undefined reference to `bam_plp_init'
/path/samtools/libbam.a(bam_plbuf.o): In function `bam_plbuf_reset':
/path/samtools/bam_plbuf.c:38: undefined reference to `bam_plp_reset'
collect2: ld returned 1 exit status
make: *** [bam2bedgraph] Error 1
I tested already with different samtools versions (1.2, 0.1.17, 0.1.18). I would be happy about any suggestions. Does anybody have an idea?

Best
Robby
Robby is offline   Reply With Quote
Old 10-02-2015, 12:40 PM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

Have you done the following for your samtools directory?

Quote:
set the environment variable SAMTOOLS to point to this directory
GenoMax is offline   Reply With Quote
Old 10-03-2015, 12:12 AM   #3
Robby
Member
 
Location: Germany

Join Date: Mar 2011
Posts: 68
Default

Yes, I applied the following command
Code:
export SAMTOOLS=$SAMTOOLS:/path/samtools
Robby is offline   Reply With Quote
Old 10-03-2015, 05:28 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

Can you try

Code:
$ SAMTOOLS='/path/samtools'
$ echo $SAMTOOLS
GenoMax is offline   Reply With Quote
Old 10-03-2015, 07:20 AM   #5
Robby
Member
 
Location: Germany

Join Date: Mar 2011
Posts: 68
Default

Thanks for your prompt answers!

I tested your comand first with samtools 0.1.17 and afterwards with samtools 1.2:

Code:
$ SAMTOOLS='/path/samtools-0.1.17'
$ echo $SAMTOOLS
/path/software/samtools-0.1.17
For samtools 1.2 I received the same error message mentioned above. For samtools 0.1.17 the error message is slightly different, but probably caused by the same problem:

Code:
perl Build.PL --install_base /home/$User/perl5/
Found /path/samtools-0.1.17/bam.h and /path/samtools-0.1.17/libbam.a.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Bio-SamTools' version '1.41'
Code:
Building Bio-SamTools
which: no nmake in ([...])
gcc -g -Wall -O2 -fPIC -o bam2bedgraph bam2bedgraph.o  -L/path/samtools-0.1.17 -lbam -lpthread -lm -lz
bam2bedgraph.o: In function `main':
/path/Bio-SamTools-1.41/c_bin/bam2bedgraph.c:62: undefined reference to `hts_idx_load'
bam2bedgraph.o: In function `bam_index_destroy':
/path/samtools-1.2/bam.h:449: undefined reference to `hts_idx_destroy'
collect2: ld returned 1 exit status
make: *** [bam2bedgraph] Error 1
For some reason the bam.h from samtools 1.2 is used, although it should point to samtools 1.2.
Robby is offline   Reply With Quote
Old 10-03-2015, 07:51 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

According to the Bio-Samtools README

Quote:
This is a Perl interface to the SAMtools sequence alignment
interface. It ONLY works on versions of Samtools up to 0.1.19. It does
not work on version 1.0 or higher due to major changes in the library
structure.
so this will not work with new samtools (1.2).

Can you re-try (in a new terminal window) making sure the SAMTOOLS variable is pointing to the older version? Also start with a freshly uncompressed source directory or do a "make clean" to remove any past traces.
GenoMax is offline   Reply With Quote
Old 10-03-2015, 08:35 AM   #7
Robby
Member
 
Location: Germany

Join Date: Mar 2011
Posts: 68
Default

OK, that seems to work. I have still some warnings, but at least no errors. So I will start to test, if it really works. Thanks a lot for your help

Code:
Building Bio-SamTools
gcc -I/path/samtools-0.1.19 -Ic_bin -I/usr/lib64/perl5/CORE -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o c_bin/bam2bedgraph.o c_bin/bam2bedgraph.c
gcc -I/path/samtools-0.1.19 -Ic_bin -I/usr/lib64/perl5/CORE -DXS_VERSION="1.41" -DVERSION="1.41" -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o lib/Bio/DB/Sam.o lib/Bio/DB/Sam.c
lib/Bio/DB/Sam.xs: In function ‘invoke_pileup_callback_fun’:
lib/Bio/DB/Sam.xs:118: warning: unused variable ‘pileups’
lib/Bio/DB/Sam.xs:116: warning: unused variable ‘pileup_obj’
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam_open’:
lib/Bio/DB/Sam.c:563: warning: unused variable ‘packname’
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam_index_build’:
lib/Bio/DB/Sam.c:623: warning: unused variable ‘packname’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam_sort_core’:
lib/Bio/DB/Sam.xs:324: warning: implicit declaration of function ‘bam_sort_core’
lib/Bio/DB/Sam.c:647: warning: unused variable ‘packname’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment_qseq’:
lib/Bio/DB/Sam.xs:518: warning: operation on ‘seq’ may be undefined
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment__qscore’:
lib/Bio/DB/Sam.xs:532: warning: pointer targets in passing argument 2 of ‘Perl_newSVpv’ differ in signedness
/usr/lib64/perl5/CORE/proto.h:2210: note: expected ‘const char *’ but argument is of type ‘uint8_t *’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment_aux’:
lib/Bio/DB/Sam.xs:615: warning: pointer targets in passing argument 2 of ‘strncat’ differ in signedness
/usr/include/bits/string3.h:149: note: expected ‘const char * __restrict__’ but argument is of type ‘uint8_t *’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment_aux_keys’:
lib/Bio/DB/Sam.xs:687: warning: pointer targets in passing argument 2 of ‘Perl_newSVpv’ differ in signedness
/usr/lib64/perl5/CORE/proto.h:2210: note: expected ‘const char *’ but argument is of type ‘uint8_t *’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment_data’:
lib/Bio/DB/Sam.xs:710: warning: pointer targets in assignment differ in signedness
lib/Bio/DB/Sam.xs:713: warning: pointer targets in passing argument 2 of ‘Perl_newSVpv’ differ in signedness
/usr/lib64/perl5/CORE/proto.h:2210: note: expected ‘const char *’ but argument is of type ‘uint8_t *’
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Header_view1’:
lib/Bio/DB/Sam.xs:916: warning: implicit declaration of function ‘bam_view1’
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam__Index_coverage’:
lib/Bio/DB/Sam.xs:1001: warning: unused variable ‘cov’
lib/Bio/DB/Sam.c: In function ‘invoke_pileup_callback_fun’:
lib/Bio/DB/Sam.xs:151: warning: control reaches end of non-void function
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Bio/DB/Sam/Sam.bs')
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o blib/arch/auto/Bio/DB/Sam/Sam.so lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o -L/path/samtools-0.1.19 -lbam -lpthread -lz
which: no nmake in ([...])
gcc -g -Wall -O2 -fPIC -o bam2bedgraph bam2bedgraph.o  -L/path/samtools-0.1.19 -lbam -lpthread -lm -lz
Robby is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO