Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Have you done the following for your samtools directory?

    set the environment variable SAMTOOLS to point to this directory

    Comment


    • #3
      Yes, I applied the following command
      Code:
      export SAMTOOLS=$SAMTOOLS:/path/samtools

      Comment


      • #4
        Can you try

        Code:
        $ SAMTOOLS='/path/samtools'
        $ echo $SAMTOOLS

        Comment


        • #5
          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.

          Comment


          • #6
            According to the Bio-Samtools README

            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.

            Comment


            • #7
              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

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM
              • seqadmin
                Techniques and Challenges in Conservation Genomics
                by seqadmin



                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                Avian Conservation
                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                03-08-2024, 10:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 06:37 PM
              0 responses
              10 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, Yesterday, 06:07 PM
              0 responses
              9 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2024, 10:03 AM
              0 responses
              51 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-21-2024, 07:32 AM
              0 responses
              67 views
              0 likes
              Last Post seqadmin  
              Working...
              X