SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie bwa question (HiSeq data)Hi, Sorry for the newbie question! I am trying to c bsmith030465 Bioinformatics 6 02-26-2015 09:08 AM
Newbie.. Jade1076 Introductions 0 06-06-2014 09:26 AM
newbie BWA alignment question Opusone Bioinformatics 2 04-04-2013 10:59 AM
Error while instaling samtools in SuSE Enterprise gabrielfernandes Bioinformatics 1 09-25-2012 06:33 PM
How to use BWA - a newbie's question henrye Bioinformatics 1 03-12-2012 01:47 PM

Reply
 
Thread Tools
Old 07-14-2015, 02:30 PM   #1
pioters
Junior Member
 
Location: Warsaw

Join Date: Jul 2015
Posts: 5
Default 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

Quote:
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:
Quote:
chmod +x bwa.sh
and
Quote:
./bwa.sh
but no go.

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

Quote:
#!/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
pioters is offline   Reply With Quote
Old 07-14-2015, 04:43 PM   #2
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

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.
Richard Finney is offline   Reply With Quote
Old 07-14-2015, 05:27 PM   #3
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,062
Default

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
GenoMax is offline   Reply With Quote
Old 07-14-2015, 10:56 PM   #4
pioters
Junior Member
 
Location: Warsaw

Join Date: Jul 2015
Posts: 5
Default

Thank You for your response. I used GenoMax suggestions and ...

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

Quote:
piotr@piotr-desktop:~$ ~/Desktop/bwa-0.7.12/bwa
.. the result is
Quote:
Program: bwa (alignment via Burrows-Wheeler transformation)
Version: 0.7.12-r1039
Contact: Heng Li <lh3@sanger.ac.uk>

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
Quote:
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
Quote:
Program: bwa (alignment via Burrows-Wheeler transformation)
Version: 0.7.12-r1039
Contact: Heng Li <lh3@sanger.ac.uk> (...)
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 at 11:11 PM.
pioters is offline   Reply With Quote
Old 07-14-2015, 11:29 PM   #5
pioters
Junior Member
 
Location: Warsaw

Join Date: Jul 2015
Posts: 5
Default

Quote:
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:
Quote:
#!/bin/bash
BWA_HOME=~/Desktop/bwa-0.7.12
PATH=$BWA_HOME:$PATH
export PATH
and after typing file command in terminal
Quote:
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
pioters is offline   Reply With Quote
Old 07-15-2015, 01:14 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,062
Default

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)
GenoMax is offline   Reply With Quote
Old 07-15-2015, 02:02 AM   #7
pioters
Junior Member
 
Location: Warsaw

Join Date: Jul 2015
Posts: 5
Default

Quote:
Originally Posted by GenoMax View Post
bwa is "compiled" and ready to use. There is no installation needed per se.
OK. Now I understand.
Quote:
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.
pioters is offline   Reply With Quote
Old 07-15-2015, 02:55 AM   #8
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,062
Default

Quote:
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.
GenoMax is offline   Reply With Quote
Old 07-15-2015, 03:32 AM   #9
pioters
Junior Member
 
Location: Warsaw

Join Date: Jul 2015
Posts: 5
Default

Quote:
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
pioters is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:43 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO