Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • kaushal25
    Junior Member
    • Oct 2010
    • 7

    SAMtools installation

    I would really like to know how to install SAMtools through Cygwin. How do you find bin folder on your computer where you need to store the SAMtools binary files ?
  • ETHANol
    Senior Member
    • Feb 2010
    • 308

    #2
    In Mac OS X it's under usr/local/bin but I think it varies from system to system.

    The installation instructions are ridiculously vague.

    I just did:

    sudo cp samtools usr/local/bin

    but I think first you have to do:
    make samtools

    Check out the instructions for BedTools. I think the installation is the same but written more clearly for Bedtools.

    --------------
    Ethan

    Comment

    • kaushal25
      Junior Member
      • Oct 2010
      • 7

      #3
      So basically i need to go in samtools directory and try 'make samtools', which is what I did but in Cygwin it tells me make: command not found

      Comment

      • krobison
        Senior Member
        • Nov 2007
        • 734

        #4
        You need to install make; it is definitely not in the default install. Start up your Cygwin installer, get to the screen where you pick what you want installed & look under "Devel" for "make". Click on the icon which looks like a cycle until it says "Install". Also ensure that "gcc-core" in the same category is set to "Install" or "Keep"

        Don't be surprised if you have to install some other stuff; it's been a while since I did this so unfortunately I can't remember. Just keep cycling back to the installer to install the next bit. I think I've gotten samtools to work under Cygwin & also bowtie, but quite a few tools have defeated me. Maybe you'll have better luck.

        In the end, samtools needs to be in a directory contained in your $PATH environment variable

        Comment

        • kaushal25
          Junior Member
          • Oct 2010
          • 7

          #5
          Thanks for the info krobison. I installed packages from Devel in fact i installed all the packages from devel but i am still getting an error

          bam_tview.c:5:20: error: curses.h: No such file or directory
          bam_tview.c:7:2: warning "_CURSES_LIB=1 BUT NCURSES_VERSION not defined; tview is not compiled"
          bam_tview.c:418:2: #warning "No curses library is available; tview is disabled
          make: *** [bam_tview.0] Error 1

          Comment

          • krobison
            Senior Member
            • Nov 2007
            • 734

            #6
            Turns out I can't compile it either under cygwin (I tried playing around with defining NCURSES_VERSION to match one of the installed ones, but that just creates a raft of new errors).

            There are pre-compiled binaries for 1.7 -- that's what I have installed (I don't use samtools much under Cygwin). Unfortunately, not for 1.8.

            Comment

            • jmarshall
              Samtools maintainer
              • Jul 2009
              • 39

              #7
              The Cygwin folks changed the way they install ncurses a while back; see http://www.cygwin.com/ml/cygwin-anno.../msg00002.html.

              Hence you should add -I/usr/include/ncurses to CFLAGS in the samtools Makefile. This will solve the <curses.h> problem you are running into.

              After that, you'll probably find that it fails to link, complaining that expl() and logl() are not defined. You can work around the absence of these C99 functions by adding -Dexpl=exp -Dlogl=log to DFLAGS in the samtools Makefile, though this may have an adverse effect on SNP calling: http://sourceforge.net/mailarchive/m...l.sanger.ac.uk.

              With these additions, samtools 0.1.8 can be compiled on Cygwin.

              Comment

              • huyvuong
                Member
                • Oct 2010
                • 10

                #8
                Thank for the first instructions, it works like a charm.
                For the second one, I tried adding -Dexpl=exp -Dlogl=log to DFLAGS as you said but it's still saying undefined expl() and logl(). How come?
                Thanks.

                Comment

                • jmarshall
                  Samtools maintainer
                  • Jul 2009
                  • 39

                  #9
                  The -Dexpl[etc] flags need to be in action when bam_maqcns.c is compiled. (And in the just-released samtools 0.1.9, also when errmod.c is compiled.) You probably have a faulty bam_maqcns.o lying around from the previous compilation attempts. Remove it.

                  In fact, whenever you change settings like this in a makefile, it's a good idea to use "make clean" before building again. So try again, typing "make clean" and then "make".

                  Comment

                  • huyvuong
                    Member
                    • Oct 2010
                    • 10

                    #10
                    thank for your reply. I downloaded the new version samtools_0.1.9 and it compiled successfully

                    Comment

                    • kaushal25
                      Junior Member
                      • Oct 2010
                      • 7

                      #11
                      thanks for the info jmarshall, but i am novice with unix, can you tell me how do we add -I/usr/include/ncurses to CFLAGS in the samtools Makefile

                      Comment

                      • kaushal25
                        Junior Member
                        • Oct 2010
                        • 7

                        #12
                        I downloaded ncurses, and I am now getting a different error

                        bam_tview.o: In function 'tv_draw_align':
                        /samtools/bam_tview.c:254: undefined reference to '_stdscr'

                        and this type of msg continues for a few lines

                        ending with

                        collect2: ld returned 1 exit status
                        make: *** [samtools] Error 1

                        Comment

                        • huyvuong
                          Member
                          • Oct 2010
                          • 10

                          #13
                          @kaushal25, sorry for the late reply
                          Here are the first few lines of my modified makefile. Note that I have added another CFLAGS and change the DFLAGS.
                          CC= gcc
                          CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
                          CFLAGS= -I/usr/include/ncurses
                          DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log
                          KNETFILE_O= knetfile.o
                          ...

                          After than, I just used the commands:
                          make clean
                          make

                          It all work for me.

                          2/ I guess that you may need to install ncurses (dev version) using cgywin setup tool. Please try again and let me know if it works. Try make clean first and then make.

                          Comment

                          • kaushal25
                            Junior Member
                            • Oct 2010
                            • 7

                            #14
                            Thanks for the response. I installed ncurses and modified the makefile. When I use make command the message I get is - Makefile:6: ***Recursive variable 'KNETFILE_O' references itself (eventually). Stop.

                            I am not sure if i have installed samtools successfully.

                            Comment

                            • huyvuong
                              Member
                              • Oct 2010
                              • 10

                              #15
                              Have you tried "make clean" before "make" command? Also, try using the latest version of samtools 0.1.9. hope it helps

                              Comment

                              Latest Articles

                              Collapse

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              14 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-04-2026, 08:59 AM
                              0 responses
                              24 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 12:03 PM
                              0 responses
                              29 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 11:40 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...