Header Leaderboard Ad


SAMtools installation



No announcement yet.
  • 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.



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


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


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


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


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


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


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


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


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


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


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

                          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.


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


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


                              Latest Articles


                              • seqadmin
                                Improved Targeted Sequencing: A Comprehensive Guide to Amplicon Sequencing
                                by seqadmin

                                Amplicon sequencing is a targeted approach that allows researchers to investigate specific regions of the genome. This technique is routinely used in applications such as variant identification, clinical research, and infectious disease surveillance. The amplicon sequencing process begins by designing primers that flank the regions of interest. The DNA sequences are then amplified through PCR (typically multiplex PCR) to produce amplicons complementary to the targets. RNA targets...
                                03-21-2023, 01:49 PM
                              • seqadmin
                                Targeted Sequencing: Choosing Between Hybridization Capture and Amplicon Sequencing
                                by seqadmin

                                Targeted sequencing is an effective way to sequence and analyze specific genomic regions of interest. This method enables researchers to focus their efforts on their desired targets, as opposed to other methods like whole genome sequencing that involve the sequencing of total DNA. Utilizing targeted sequencing is an attractive option for many researchers because it is often faster, more cost-effective, and only generates applicable data. While there are many approaches...
                                03-10-2023, 05:31 AM





                              Topics Statistics Last Post
                              Started by seqadmin, 03-24-2023, 02:45 PM
                              0 responses
                              Last Post seqadmin  
                              Started by seqadmin, 03-22-2023, 12:26 PM
                              0 responses
                              Last Post seqadmin  
                              Started by seqadmin, 03-17-2023, 12:32 PM
                              0 responses
                              Last Post seqadmin  
                              Started by seqadmin, 03-15-2023, 12:42 PM
                              0 responses
                              Last Post seqadmin