Header Leaderboard Ad

Collapse

installition of SAM tools package

Collapse

Announcement

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

  • installition of SAM tools package

    I would like to install SAM tools in linux system, zlib and ncurses had been installed before successfully, however, when type "make", I got wrong information below:



    make[1]: Entering directory `/home/flsun/samtools-0.1.6'
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bgzf.c -o bgzf.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 kstring.c -o kstring.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_aux.c -o bam_aux.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam.c -o bam.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_import.c -o bam_import.o
    bam_import.c: In function â__bam_get_linesâ:
    bam_import.c:75: warning: implicit declaration of function âgzopen64â
    bam_import.c:75: warning: pointer/integer type mismatch in conditional expression
    bam_import.c: In function âsam_header_read2â:
    bam_import.c:125: warning: pointer/integer type mismatch in conditional expression
    bam_import.c: In function âsam_openâ:
    bam_import.c:502: warning: pointer/integer type mismatch in conditional expression
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 sam.c -o sam.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_index.c -o bam_index.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_pileup.c -o bam_pileup.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_lpileup.c -o bam_lpileup.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_md.c -o bam_md.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 glf.c -o glf.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 razf.c -o razf.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 faidx.c -o faidx.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 knetfile.c -o knetfile.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_sort.c -o bam_sort.o
    ar -cru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o knetfile.o bam_sort.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_tview.c -o bam_tview.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_maqcns.c -o bam_maqcns.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_plcmd.c -o bam_plcmd.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 sam_view.c -o sam_view.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_rmdup.c -o bam_rmdup.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_rmdupse.c -o bam_rmdupse.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_mate.c -o bam_mate.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_stat.c -o bam_stat.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_color.c -o bam_color.o
    gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bamtk.c -o bamtk.o
    gcc -g -Wall -O2 -o samtools bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o -lm -lcurses -lz -L. -lbam
    ./libbam.a(bam_import.o): In function `sam_open':
    /home/flsun/samtools-0.1.6/bam_import.c:502: undefined reference to `gzopen64'
    ./libbam.a(bam_import.o): In function `__bam_get_lines':
    /home/flsun/samtools-0.1.6/bam_import.c:75: undefined reference to `gzopen64'
    ./libbam.a(bam_import.o): In function `sam_header_read2':
    /home/flsun/samtools-0.1.6/bam_import.c:125: undefined reference to `gzopen64'
    collect2: ld returned 1 exit status
    make[1]: *** [samtools] Error 1
    make[1]: Leaving directory `/home/flsun/samtools-0.1.6'
    make: *** [all-recur] Error 1


    I am a new user, I'd like to please everyone to help me

  • #2

    You can read this method, though it wasn't the same as your problem. I think it will help you.

    Comment


    • #3
      Originally posted by lynn012 View Post
      http://openhelp.net/2010/11/11/libxm...e-to-gzopen64/
      You can read this method, though it wasn't the same as your problem. I think it will help you.
      I have got the way to solove the problem:
      first: cd zlib/
      CFLAGS="-O3 -fPIC" ./configure
      make
      make install;
      then cd sam/
      and type make
      it will be okay now!

      Comment


      • #4
        Painful

        Dear all,
        I have a similar issue on a Centos machine. I want to compile samtools and it runs fine until it issues this;
        gcc -g -Wall -O2 -o samtools bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o -Lbcftools libbam.a -lbcf -lcurses -lm -lz
        phase.o: In function `loadpos':
        /root/samtools-0.1.15/phase.c:475: undefined reference to `gzopen64'
        libbam.a(bam_import.o): In function `__bam_get_lines':
        /root/samtools-0.1.15/bam_import.c:76: undefined reference to `gzopen64'
        libbam.a(bam_import.o): In function `sam_open':
        /root/samtools-0.1.15/bam_import.c:442: undefined reference to `gzopen64'
        libbam.a(bam_import.o): In function `sam_header_read2':
        /root/samtools-0.1.15/bam_import.c:126: undefined reference to `gzopen64'
        libbam.a(bedidx.o): In function `bed_read':
        /root/samtools-0.1.15/bedidx.c:99: undefined reference to `gzopen64'
        collect2: ld returned 1 exit status
        make[1]: *** [samtools] Error 1
        make[1]: Leaving directory `/root/samtools-0.1.15'
        make: *** [all-recur] Error 1

        I have tried the solution listed here;
        1) downloaded http://www.zlib.net/ zlib 1.2.5

        2) As stated by sflong
        CFLAGS="-O3 -fPIC" ./configure
        make
        make install;
        then cd sam/
        and type make

        Can anyone save me from setting fire to our cluster

        Thank you for any ideas.

        John.

        Comment


        • #5
          On Ubuntu try:
          sudo apt-get install --reinstall zlib1g
          Data analysis www.persmed.eu

          Comment


          • #6
            samtools installation : problem"gzopen64"

            Hi,
            I face the same problem even after reinstalling the zlib i am getting error as "undefined reference to `gzopen64' "

            Thanks for any suggestions

            Comment


            • #7
              error in samtools installation

              There is an error when I install samtools in a linux system (zorin-os-7.1). The message is in the following. Has someone had this problem before? Is there any suggestion I should do? Thanks.

              gcc -g -Wall -O2 -o razip razip.o razf.o knetfile.o -lz
              /usr/bin/ld: cannot find -lz
              collect2: error: ld returned 1 exit status
              make: *** [razip] Error 1

              Comment


              • #8
                As the install instructions say have you tried doing a plain "make"?
                Type `make' to compile samtools. If you have zlib >= 1.2.2.1, you can compile razip with `make razip'
                I am not familiar with "Zorin". Does it use "packages"? If so you may be able to use one from another linux distro.

                Otherwise you may need to compile/install zlib from source as last option: http://www.zlib.net/

                Comment


                • #9
                  In the make file change
                  CFLAGS= -g -Wall -O2 to
                  CFLAGS= -g -Wall -O2 -L /usr/local/lib (This is where my zlib libraries are located)

                  Comment


                  • #10
                    Thanks Teja,

                    Miss having you around

                    Comment


                    • #11
                      Also to install bedtools you will need to make a similar change

                      export LIBS = /usr/local/lib/libz.so.1.2.8

                      Comment


                      • #12
                        Thanks, vyellapa! This solution really works and it can also work in the guest mode.

                        Comment


                        • #13
                          I solved this problem today by replacing the line
                          Code:
                          #include <zlib.h>
                          with
                          Code:
                          #include "win32/zlib.h"
                          on dict.c, stats.c, bedcov.c, phase.c, bedidx.c and misc/md5fa.c.
                          If you have already tried to compile, clear your folder with a
                          Code:
                           rm *.o misc/*.o
                          before running "make" again.
                          This works because samtools ships with the zlib.h for windows users.

                          Comment

                          Latest Articles

                          Collapse

                          • seqadmin
                            How RNA-Seq is Transforming Cancer Studies
                            by seqadmin



                            Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
                            09-07-2023, 11:15 PM
                          • seqadmin
                            Methods for Investigating the Transcriptome
                            by seqadmin




                            Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

                            Whole Transcriptome RNA-seq
                            Whole transcriptome sequencing...
                            08-31-2023, 11:07 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by seqadmin, Yesterday, 07:42 AM
                          0 responses
                          10 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 09-22-2023, 09:05 AM
                          0 responses
                          23 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 09-21-2023, 06:18 AM
                          0 responses
                          16 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 09-20-2023, 09:17 AM
                          0 responses
                          16 views
                          0 likes
                          Last Post seqadmin  
                          Working...
                          X