Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Newbie Instaling BWA

    Hello!

    I know there are some topics about BWA installation but most of them are focusing on "make" command. I think I did pass this barrier but have different problem. So I used this install instructions to "install" BWA.
    My OS is Ubuntu 14.04 LTS and what I did presents as follows:
    First of all: updated gcc, installed build-essential and zlib
    Then:
    1. Downloaded BWA from 2. Saved on desktop, extracted, went to bwa folder and hit "make"
    3. Results below

    piotr@piotr-desktop:~/Desktop/bwa-0.7.12$ make
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS utils.c -o utils.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kthread.c -o kthread.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kstring.c -o kstring.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS ksw.c -o ksw.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt.c -o bwt.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bntseq.c -o bntseq.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwa.c -o bwa.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem.c -o bwamem.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_pair.c -o bwamem_pair.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_extra.c -o bwamem_extra.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS malloc_wrap.c -o malloc_wrap.o
    ar -csru libbwa.a utils.o kthread.o kstring.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o bwamem_extra.o malloc_wrap.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS QSufSort.c -o QSufSort.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_gen.c -o bwt_gen.o
    bwt_gen.c: In function ‘BWTIncBuildRelativeRank’:
    bwt_gen.c:878:10: warning: variable ‘oldInverseSa0RelativeRank’ set but not used [-Wunused-but-set-variable]
    bgint_t oldInverseSa0RelativeRank = 0;
    ^
    bwt_gen.c: In function ‘BWTIncMergeBwt’:
    bwt_gen.c:952:15: warning: variable ‘bitsInWordMinusBitPerChar’ set but not used [-Wunused-but-set-variable]
    unsigned int bitsInWordMinusBitPerChar;
    ^
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwashm.c -o bwashm.o
    bwashm.c: In function ‘bwa_shm_stage’:
    bwashm.c:29:11: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
    ftruncate(shmid, BWA_CTL_SIZE);
    ^
    bwashm.c:66:11: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
    ftruncate(shmid, idx->l_mem);
    ^
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwase.c -o bwase.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwaseqio.c -o bwaseqio.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtgap.c -o bwtgap.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtaln.c -o bwtaln.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bamlite.c -o bamlite.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS is.c -o is.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtindex.c -o bwtindex.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwape.c -o bwape.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kopen.c -o kopen.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS pemerge.c -o pemerge.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_core.c -o bwtsw2_core.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_main.c -o bwtsw2_main.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_aux.c -o bwtsw2_aux.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_lite.c -o bwt_lite.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_chain.c -o bwtsw2_chain.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS fastmap.c -o fastmap.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_pair.c -o bwtsw2_pair.o
    gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS main.c -o main.o
    gcc -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS QSufSort.o bwt_gen.o bwashm.o bwase.o bwaseqio.o bwtgap.o bwtaln.o bamlite.o is.o bwtindex.o bwape.o kopen.o pemerge.o bwtsw2_core.o bwtsw2_main.o bwtsw2_aux.o bwt_lite.o bwtsw2_chain.o fastmap.o bwtsw2_pair.o main.o -o bwa -L. -lbwa -lm -lz -lpthread -lrt
    4. Went to ..etc/profile.d/ ,made bash file and tried to execute it.

    piotr@piotr-desktop:~/Desktop/bwa-0.7.12$ su
    Password:
    root@piotr-desktop:/home/piotr/Desktop/bwa-0.7.12# cd ../../../../
    root@piotr-desktop:/# cd etc/profile.d/
    root@piotr-desktop:/etc/profile.d# vim bwa.sh
    root@piotr-desktop:/etc/profile.d# chmod 755 bwa.sh
    root@piotr-desktop:/etc/profile.d# bwa
    The program 'bwa' is currently not installed. You can install it by typing:
    apt-get install bwa

    5. But after all this work BWA is still not installed. I don`t know where the problem is. Also tried to execute bash file with:
    chmod +x bwa.sh
    and
    ./bwa.sh
    but no go.

    Below I present the bwa.sh bash file. Maybe its not valid.

    #!/bin/bash
    BWA_HOME=/root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12
    PATH=$BWA_HOME:$PATH
    export PATH
    Maybe someone got a clue what`s going on. After 12h trying to run this properly I am brainwashed. Would be very grateful for any help

  • #2
    Looks like you're pretty close

    Does the file
    /root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12/bwa
    exist?

    What does the command
    file /root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12/bwa
    return?

    You don't per se need to "install" bwa. You can run it just by invoking it.

    Providing the right parameters is a whole 'nother problem.

    Comment


    • #3
      You may have to do

      Code:
      $ chmod a+x ~/Desktop/bwa-0.7.12/bwa
      then try to execute bwa by running

      Code:
      $ ~/Desktop/bwa-0.7.12/bwa

      Comment


      • #4
        Thank You for your response. I used GenoMax suggestions and ...

        piotr@piotr-desktop:~$ chmod a+x ~/Desktop/bwa-0.7.12/bwa
        and after this

        piotr@piotr-desktop:~$ ~/Desktop/bwa-0.7.12/bwa
        .. the result is
        Program: bwa (alignment via Burrows-Wheeler transformation)
        Version: 0.7.12-r1039
        Contact: Heng Li <[email protected]>

        Usage: bwa <command> [options]

        Command: index index sequences in the FASTA format
        mem BWA-MEM algorithm
        fastmap identify super-maximal exact matches
        pemerge merge overlapping paired ends (EXPERIMENTAL)
        aln gapped/ungapped alignment
        samse generate alignment (single ended)
        sampe generate alignment (paired ended)
        bwasw BWA-SW for long queries

        shm manage indices in shared memory
        fa2pac convert FASTA to PAC format
        pac2bwt generate BWT from PAC
        pac2bwtgen alternative algorithm for generating BWT
        bwtupdate update .bwt to the new format
        bwt2sa generate SA from BWT and Occ

        Note: To use BWA, you need to first index the genome with `bwa index'.
        There are three alignment algorithms in BWA: `mem', `bwasw', and
        `aln/samse/sampe'. If you are not sure which to use, try `bwa mem'
        first. Please `man ./bwa.1' for the manual.
        So I don`t know if this means that BWA is installed? When I hit just "bwa" in new terminal nothing happens
        piotr@piotr-desktop:~$ bwa
        The program 'bwa' is currently not installed. You can install it by typing:
        sudo apt-get install bwa
        But when I type "~/Desktop/bwa-0.7.12/bwa" then this information pops out
        Program: bwa (alignment via Burrows-Wheeler transformation)
        Version: 0.7.12-r1039
        Contact: Heng Li <[email protected]> (...)
        This means that BWA is installed and to run it I must do it through ~/Desktop/bwa-0.7.12/bwa, or it`s not installed at all?
        Last edited by pioters; 07-14-2015, 11:11 PM.

        Comment


        • #5
          Originally posted by Richard Finney View Post
          Looks like you're pretty close

          Does the file
          /root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12/bwa
          exist?

          What does the command
          file /root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12/bwa
          return?
          (...)
          Terminal returns ERROR: cannot open `/root/piotr-desktop/home/piotr/Desktop/bwa-0.7.12/' (No such file or directory)

          OK. I modified bwa.sh file with new path:
          #!/bin/bash
          BWA_HOME=~/Desktop/bwa-0.7.12
          PATH=$BWA_HOME:$PATH
          export PATH
          and after typing file command in terminal
          piotr@piotr-desktop:~$ file ~/Desktop/bwa-0.7.12/bwa

          /home/piotr/Desktop/bwa-0.7.12/bwa: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=8da0ef3d7f5b9bbcfdb7cdfd59ff109592936d19, not stripped

          Comment


          • #6
            bwa is "compiled" and ready to use. There is no installation needed per se.

            You can either use the program by directly providing full path ~/Desktop/bwa-0.7.12/bwa in your commands or use the bwa.sh file you made.

            What happens if you just do

            Code:
            $ bwa.sh
            Couple of suggestions. It is a bad idea to execute common programs like bwa as "root" user. Use a regular user account. Spend a couple of hours (or days depending on the time you have) at this link to understand basics of Unix for biologists (http://korflab.ucdavis.edu/Unix_and_...ent.html#part1)

            Comment


            • #7
              Originally posted by GenoMax View Post
              bwa is "compiled" and ready to use. There is no installation needed per se.
              OK. Now I understand.
              What happens if you just do

              Code:
              $ bwa.sh
              piotr@piotr-desktop:~$ bash.sh
              bash.sh: command not found


              If the BWA is ready to use, the problem has been solved. Thank you for your help and link. Much appreciated.

              Comment


              • #8
                Originally posted by pioters View Post
                piotr@piotr-desktop:~$ bash.sh
                bash.sh: command not found
                BTW: That should have been bwa.sh not bash.sh.

                Comment


                • #9
                  Originally posted by GenoMax View Post
                  BTW: That should have been bwa.sh not bash.sh.
                  Hehehe, Yes it should. My mistake.

                  piotr@piotr-desktop:~$ bwa.sh
                  bwa.sh: command not found

                  Comment

                  Latest Articles

                  Collapse

                  • seqadmin
                    Recent Advances in Sequencing Analysis Tools
                    by seqadmin


                    The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                    05-06-2024, 07:48 AM
                  • seqadmin
                    Essential Discoveries and Tools in Epitranscriptomics
                    by seqadmin




                    The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                    04-22-2024, 07:01 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 05-14-2024, 07:03 AM
                  0 responses
                  17 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-10-2024, 06:35 AM
                  0 responses
                  40 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-09-2024, 02:46 PM
                  0 responses
                  50 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-07-2024, 06:57 AM
                  0 responses
                  41 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X