Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Problem setting samtools up

    Hello,

    so I have downloaded samtools-1.3 to an ubuntu computer and I want to use it to manipulate the output from my bwa mem.

    I enter the samtools-1.3 folder in the terminal and type "make" to set it up. It starts to run encounters an error as follows:

    bam_tview_curses.o bam_tview_curses.c
    bam_tview_curses.c:41:20: fatal error: curses.h: No such file or directory
    #include <curses.h>
    ^
    compilation terminated.
    make: *** [bam_tview_curses.o] Error 1

    My initial response (after searching the Internet) was that curses was not installed, and I tried to remedy that using sudo (apparently my user was not in the list of sudoers though.

    So I tried to see if curses was already installed, after consulting the Internet I tried

    ldconfig -p | grep ncurses
    which gave the output:

    libncursesw.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libncursesw.so.5
    libncurses.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libncurses.so.5

    I took this as curses was installed. But that leaves me at a loss what could have happened. But this should at least mean that curses are there right? I'm not very experianced using ubuntu or C programs (I took a smaller course in C long ago and whil I've used linux computers quite some I've mostly used the terminal for navigation)

    Happy for Help!

  • #2
    You are missing libncurses5-dev library. Install it using software center/yum or whichever mechanism you use on your flavor of linux.

    Comment


    • #3
      Thanks for the answer. The only suggestion for installing ncurses have been to use sudo, but since my account is not a sudoer it doesn't work. Do you know if there is a way install it without using sudo, or will I have to talk to the administrator to fix that for me?

      Also when I wrote

      ldconfig -p | grep ncurses

      I got

      libncursesw.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libncursesw.so.5
      libncurses.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libncurses.so.5

      out which I took as ncurses were there (although I have to admit I only vaguely knew what I was doing)

      Comment


      • #4
        It may sound odd, but you can use anaconda (the python distribution) to install samtools with all of its dependencies. samtools is in the "bioconda" channel, so "conda install -c bioconda samtools". This is a convenient way to install many bioinformatics tools without needing sudo privileges.

        Comment


        • #5
          First just ask you system administrator to install ncurses developmental package. (You'll want it when you have to compile that specific version R to make your obscure TICKETTOSTOCKHOLM biostat package work anyway. Why? To prove those MUC and OR genes cause cancer, of course.).

          Second, the easiet thing to do is check the samtools INSTALL instructions. You can bypass curses.

          (from samtools file called "INSTALL" ; the one I'm using is from samtools version 1.1)
          " If you do not have this library installed,
          you can still compile the rest of SAMtools by manually changing:
          `-D_CURSES_LIB=1' to `-D_CURSES_LIB=0' at the line starting with `DFLAGS=', and
          comment out the line starting with `LIBCURSES='.
          Note that on some systems the library is available as -lcurses while on others
          as -lnurses. This can be set in Makefile by setting LIBCURSES= -lcurses vs
          -lncurses."


          Thirdly ... in desperation ... you can download the ncurses source, compile it and "point to" it.

          Instructions here: http://emboss.open-bio.org/html/adm/ch01s11.html ; pick up the recipe at instruction #2.

          The following is more commentary than fool proof ...

          Edit the makefile.

          check the LDFLAGS = and LDLIBS = lines.

          There are many ways to skin a cat in this case and just hardwiring in the right place can provide equivalent solutions.


          By "point to" it you'll probably have to do two things when you edit the Makefile to configure the C compiler to look in the "INCLUDE" directory; this involves the -I paramteer for gcc; which you will have to carefully edit. See gcc documentation for the "-I" parameter. You must also properly link to the libcurses library. There are two types of libraries. You can use 1) shared object link or 2) static link the libcurses library. Static linking is probably the easiest way; just put the libcurses ".a" (dot a) file in the link ("link") command. Makefiles can be a little scary and great care and typing must be done to get it right. Shared object style linink in trickier as you'll have to provide the LD_LIBRARY_PATH environmental variable to point to the shared library at samtools run time.

          The finer points of specifying Include files and linking are bit of learning curve; so ask a local gcc expert to help out as it should be a trivial edit session on Makefile for them.
          If you do it yourself, you'll need to understand the gcc's -I ( dash eye) parameter and how to append the path to the libcurses library (either the full path or using the -L (dash elle) parmeter for the "link" comand which IS HIDDEN by the gcc command which does the actual call to link. In this case; some makefiles have explicit link instruction.
          Last edited by Richard Finney; 02-07-2016, 09:46 AM.

          Comment


          • #6
            Thank you very much! That is really helpful.

            Comment


            • #7
              The information Richard quoted from samtools 1.1 has been superseded in samtools 1.3.

              First off, system packages like the ncurses development package libncurses5-dev are non-science-related standard software for a development machine that your system administrators should have no qualms about installed. (Frankly, they should already be installed on a development machine!) So instructing your administrators to install this package and other system packages like it will be doing everyone using that development machine a service.

              Otherwise, in samtools 1.3 you can disable the curses-using tview command by configuring with

              Code:
              ./configure --without-curses
              make

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM
              • seqadmin
                Techniques and Challenges in Conservation Genomics
                by seqadmin



                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                Avian Conservation
                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                03-08-2024, 10:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 06:37 PM
              0 responses
              11 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, Yesterday, 06:07 PM
              0 responses
              10 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2024, 10:03 AM
              0 responses
              51 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-21-2024, 07:32 AM
              0 responses
              68 views
              0 likes
              Last Post seqadmin  
              Working...
              X