Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

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


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


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


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


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


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


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


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


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

                    Comment


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


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


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


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


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

                              • seqadmin
                                Advancing Precision Medicine for Rare Diseases in Children
                                by seqadmin




                                Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                                12-16-2024, 07:57 AM
                              • seqadmin
                                Recent Advances in Sequencing Technologies
                                by seqadmin



                                Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                                Long-Read Sequencing
                                Long-read sequencing has seen remarkable advancements,...
                                12-02-2024, 01:49 PM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 12-17-2024, 10:28 AM
                              0 responses
                              33 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-13-2024, 08:24 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-12-2024, 07:41 AM
                              0 responses
                              34 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-11-2024, 07:45 AM
                              0 responses
                              46 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X