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
                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...
                Yesterday, 07:11 AM
              • SEQadmin2
                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                by SEQadmin2


                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                ...
                06-02-2026, 10:05 AM
              • SEQadmin2
                Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                by SEQadmin2


                With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                Introduction

                Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                05-22-2026, 06:42 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 06-17-2026, 06:09 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-09-2026, 11:58 AM
              0 responses
              38 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-05-2026, 10:09 AM
              0 responses
              45 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-04-2026, 08:59 AM
              0 responses
              49 views
              0 reactions
              Last Post SEQadmin2  
              Working...