Announcement

Collapse
No announcement yet.

bcftools inastallation problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bcftools inastallation problem

    Hi there,
    I wanted to try to install bcftools in my linux workstation. But it gave me the following error report. What should I do now?

    Best Regards
    Zillur

    [[email protected] ~]$ cd Desktop/zillur/Tools/bcftools-1.2/
    [[email protected] bcftools-1.2]$ ls
    AUTHORS Makefile consensus.c filter.c kmin.c ploidy.h prob1.h tsv2vcf.c vcfconcat.c vcfisec.c vcfroh.c vcmp.c
    HMM.c README convert.c filter.h kmin.h plot-vcfstats rbuf.h tsv2vcf.h vcfconvert.c vcfmerge.c vcfsom.c vcmp.h
    HMM.h bcftools.h convert.h gvcf.c main.c plugins reheader.c vcfannotate.c vcffilter.c vcfnorm.c vcfstats.c version.c
    INSTALL call.h doc htslib-1.2.1 mcall.c polysomy.c tabix.c vcfcall.c vcfgtcheck.c vcfplugin.c vcfutils.pl
    LICENSE ccall.c em.c khash_str2str.h ploidy.c prob1.c test vcfcnv.c vcfindex.c vcfquery.c vcfview.c
    [[email protected] bcftools-1.2]$ nano README
    [[email protected] bcftools-1.2]$ nano INSTALL
    [[email protected] bcftools-1.2]$ sudo make
    [sudo] password for zillur:
    cd htslib-1.2.1 && make lib-static
    make[1]: Entering directory `/home/zillur/Desktop/zillur/Tools/bcftools-1.2/htslib-1.2.1'
    gcc -g -Wall -O2 -I. -c -o bgzf.o bgzf.c
    In file included from bgzf.c:37:0:
    htslib/bgzf.h:34:18: fatal error: zlib.h: No such file or directory
    #include <zlib.h>
    ^
    compilation terminated.
    make[1]: *** [bgzf.o] Error 1
    make[1]: Leaving directory `/home/zillur/Desktop/zillur/Tools/bcftools-1.2/htslib-1.2.1'
    make: *** [htslib-1.2.1/libhts.a] Error 2
    [[email protected] bcftools-1.2]$

  • #2
    Code:
    $ sudo apt-get install zlib zlib-devel

    Comment


    • #3
      Another problem

      Thank you very much for your kind help. This command worked perfectly but another problem, after installation.

      Best Regards
      Zillur

      [[email protected] samtools-1.2]$ bcftools
      bash: bcftools: command not found...

      Comment


      • #4
        You only compiled the program. You would need to amend your $PATH to include the location of the program e.g. "/path_to/samtools-1.2/src/bcftools-1.2/" or copy the bcftools executable to a directory already in your $PATH (e.r. /usr/local/bin).

        Comment


        • #5
          Thank you very much for your quick answer. How can I amend my $PATH or get info about my current $PATH.
          Best Regards
          Zillur

          [[email protected] bcftools-1.2]$ pwd
          /home/zillur/Desktop/zillur/Tools/bcftools-1.2

          Comment


          • #6
            Originally posted by zillur View Post
            Thank you very much for your quick answer. How can I amend my $PATH or get info about my current $PATH.
            Best Regards
            Zillur

            [[email protected] bcftools-1.2]$ pwd
            /home/zillur/Desktop/zillur/Tools/bcftools-1.2
            https://kb.iu.edu/d/acar

            We have gone over this last year: http://seqanswers.com/forums/showpos...9&postcount=77

            Comment


            • #7
              Thank you very much for your kind response. bacfools is working now perfectly. But when I was trying to install samtools it gave me the following error report:

              [[email protected] samtools-1.2]$ sudo make install
              [sudo] password for zillur:
              gcc -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -I. -Ihtslib-1.2.1 -c -o bam_tview_curses.o bam_tview_curses.c
              bam_tview_curses.c:30:20: fatal error: curses.h: No such file or directory
              #include <curses.h>
              ^
              compilation terminated.
              make: *** [bam_tview_curses.o] Error 1

              The installation instructions are :


              Compilation
              ===========

              'cd' to the samtools-1.x directory containing the package's source and type
              'make' to compile samtools.

              This samtools release contains a copy of HTSlib which will be used to build
              samtools. If you already have a system-installed HTSlib or another HTSlib
              that you would prefer to build against, you can arrange this by overriding
              $(HTSDIR) by typing 'make HTSDIR=/path/to/htslib-source' -- see the makefile
              for details.


              Installation
              ============

              Type 'make install' to install the samtools executable and various scripts
              and executables from misc/ and a manual page to /usr/local.

              Type 'make prefix=/path/to/dir install' to install everything under your
              choice of installation directory. The install target also understands
              DESTDIR and the other usual installation directory variables.

              The bgzip and tabix utilities are provided by HTSlib. If you have not also
              installed HTSlib separately, you may wish to install these utilities by hand
              by copying samtools-1.x/htslib-1.x/{bgzip,tabix} to the same bin directory
              to which you have installed samtools et al.

              Comment


              • #8
                Code:
                $ sudo apt-get install libncurses5-dev

                Comment


                • #9
                  Thank you very much for your kind help. I was trying like this, but:

                  [[email protected] samtools-1.2]$ sudo yum install libncurses5-dev
                  [sudo] password for zillur:
                  Loaded plugins: fastestmirror, langpacks
                  Loading mirror speeds from cached hostfile
                  * base: mirrors.uprm.edu
                  * extras: mirrors.uprm.edu
                  * updates: mirrors.uprm.edu
                  No package libncurses5-dev available.
                  Error: Nothing to do
                  [[email protected] samtools-1.2]$ sudo apt-get install libncurses5-dev
                  sudo: apt-get: command not found

                  Comment


                  • #10
                    Try

                    Code:
                    $ sudo apt-get install ncurses-dev
                    See this link for general help with package installations: http://askubuntu.com/questions/37855...ackages-by-apt

                    Comment


                    • #11
                      Thank you very much for your kind reply. I have tried like this:

                      [[email protected] Tools]$ sudo apt-get install ncurses-dev
                      [sudo] password for zillur:
                      sudo: apt-get: command not found
                      [[email protected] Tools]$ sudo yum install ncurses-dev
                      Failed to set locale, defaulting to C
                      Loaded plugins: fastestmirror, langpacks
                      base | 3.6 kB 00:00:00
                      Not using downloaded repomd.xml because it is older than what we have:
                      Current : Tue Mar 31 20:19:44 2015
                      Downloaded: Tue Mar 31 18:50:46 2015
                      extras | 3.4 kB 00:00:00
                      updates | 3.4 kB 00:00:00
                      updates/7/x86_64/primary_db | 3.3 MB 00:00:00
                      Determining fastest mirrors
                      * base: mirrors.uprm.edu
                      * extras: mirrors.uprm.edu
                      * updates: mirrors.uprm.edu
                      No package ncurses-dev available.
                      Error: Nothing to do

                      BUT THEN I HAVE TRIED THIS:

                      [[email protected] samtools-1.2]$ sudo yum install ncurses
                      [sudo] password for zillur:
                      Failed to set locale, defaulting to C
                      Loaded plugins: fastestmirror, langpacks
                      Loading mirror speeds from cached hostfile
                      * base: mirrors.uprm.edu
                      * extras: mirrors.uprm.edu
                      * updates: mirrors.uprm.edu
                      Package ncurses-5.9-13.20130511.el7.x86_64 already installed and latest version
                      Nothing to do
                      [[email protected] samtools-1.2]$ make
                      gcc -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -I. -Ihtslib-1.2.1 -c -o bam_tview_curses.o bam_tview_curses.c
                      bam_tview_curses.c:30:20: fatal error: curses.h: No such file or directory
                      #include <curses.h>
                      ^
                      compilation terminated.
                      make: *** [bam_tview_curses.o] Error 1

                      Comment


                      • #12
                        On RPM-based distributions, this package is often called ncurses-devel.

                        Comment


                        • #13
                          Thank you very much for your kind suggestions. It is working now perfectly. Another question, whenever I logout or shut down my computer and login again why I need to specify the paths (export PATH="/dir/:PATH"). Is there any way to avoid it?

                          Comment


                          • #14
                            Originally posted by zillur View Post
                            Thank you very much for your kind suggestions. It is working now perfectly. Another question, whenever I logout or shut down my computer and login again why I need to specify the paths (export PATH="/dir/:PATH"). Is there any way to avoid it?
                            There are many ways of doing this. You can edit .profile (or .bashrc) file in your home directory (~) and put that export statement in there. If you already have an export statement for PATH in the file(s) then amend it as needed.

                            Comment


                            • #15
                              Thank you very much for your kind reply. Here is my bash_profile file:# .bash_profile

                              # Get the aliases and functions
                              if [ -f ~/.bashrc ]; then
                              . ~/.bashrc
                              fi

                              # User specific environment and startup programs

                              PATH=$PATH:$HOME/.local/bin:$HOME/bin

                              export PATH


                              I am not sure which part I need to edit. I have different tools in different directory, like:

                              /home/zillur/Desktop/zillur/Tools/bcftools-1.2

                              /home/zillur/Desktop/zillur/Tools/samtools-1.2

                              /home/zillur/Desktop/zillur/Tools/bowtie2-2.2.5

                              Comment

                              Working...
                              X