Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Robby
    Member
    • Mar 2011
    • 68

    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
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

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

    set the environment variable SAMTOOLS to point to this directory

    Comment

    • Robby
      Member
      • Mar 2011
      • 68

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

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Can you try

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

        Comment

        • Robby
          Member
          • Mar 2011
          • 68

          #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

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #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

            • Robby
              Member
              • Mar 2011
              • 68

              #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

              • SEQadmin2
                Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                by SEQadmin2



                Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                Today, 05:17 AM
              • GATTACAT
                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by GATTACAT
                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                07-01-2026, 11:43 AM
              • SEQadmin2
                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by SEQadmin2


                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                Here are nine questions we think about, in roughly the order they matter, before...
                06-18-2026, 07:11 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Today, 10:08 AM
              0 responses
              6 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, Yesterday, 11:05 AM
              0 responses
              7 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-02-2026, 11:08 AM
              0 responses
              30 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-30-2026, 05:37 AM
              0 responses
              28 views
              0 reactions
              Last Post SEQadmin2  
              Working...