SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   bowtie2 2.6.0 command not found (http://seqanswers.com/forums/showthread.php?t=61823)

cmccabe 08-08-2015 05:16 AM

bowtie2 2.6.0 command not found
 
I downloaded bowtie2-2.6.0 from github, extracted, and installed it. I added it to path using:

Code:

echo "export PATH=\$PATH:export PATH=$PATH:"/media/C2F8EFBFF8EFAFB9/bowtie2-2.6.0"/" >> ~/.bashrc
and confirmed it using:

Code:

cat ~/.bashrc
Code:

/media/C2F8EFBFF8EFAFB9/picard-tools-1.135/:/media/C2F8EFBFF8EFAFB9/bowtie2-2.6.0/
it appears to be added but when I try to build and index using combined files from chromFA.tar.gz using:

Code:

bowtie2-build hg19.fa hg19
No command 'bowtie2-build' found, did you mean:
 Command 'bowtie-build' from package 'bowtie' (universe)
bowtie2-build: command not found

What did I do wrong? Thank you :).

GenoMax 08-08-2015 08:30 AM

You probably need to set the path to a directory lower than now
Code:

$ /media/C2F8EFBFF8EFAFB9/bowtie2-2.6.0/bin

cmccabe 08-10-2015 07:59 AM

I mounted the directorry to the desktop and added path again.... it recognizes bowtie2 but throws an error:

Code:

dnascopev@ubuntu:~$ cd "/home/dnascopev/Desktop/hg19_fasta"
dnascopev@ubuntu:~/Desktop/hg19_fasta$ bowtie2-build hg19.fa hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory

If I am reading the error right it can not find the hg19.fa but that file is directory (/home/dnascopev/Desktop/hg19_fasta). Any suggestions? Thanks :).

GenoMax 08-10-2015 08:06 AM

When things are not in the current directory (or in $PATH) it is simple to provide the full/relative path to the file/directory in question.
Code:

$ bowtie2-build ./hg19.fa hg19 OR
$ bowtie2-build /home/dnascopev/Desktop/hg19_fasta/hg19.fa hg19

Is there a reason your are building these yourself than getting them from iGenomes?

cmccabe 08-10-2015 08:55 AM

I tried both:

Code:

dnascopev@ubuntu:~/Desktop/hg19_fasta$ bowtie2-build /home/dnascopev/Desktop/hg19_fasta/hg19.fa hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory
dnascopev@ubuntu:~/Desktop/hg19_fasta$ bowtie2-build ./hg19.fa hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory

I am downloaded from iGenomes, just curious why its not working.

.bashrc
Code:

export PATH=$PATH:/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0
Thanks :).

GenoMax 08-10-2015 09:07 AM

Have you tried
Code:

$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa hg19
Is that file actually present?

Code:

$ ls -lh /home/dnascopev/Desktop/hg19_fasta/*.fa
These indexes should already be present in Sequences/Bowtie2Index directory (base name genome), if you had downloaded the bundle from iGenomes.

cmccabe 08-10-2015 10:01 AM

Code:

dnascopev@ubuntu:~$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory

The fie appears to be there.

Code:

dnascopev@ubuntu:~$ ls -lh /home/dnascopev/Desktop/hg19_fasta/*.fa
-rw-rw-r-- 1 dnascopev dnascopev 3.0G Jun 22 10:17 /home/dnascopev/Desktop/hg19_fasta/hg19.fa


GenoMax 08-10-2015 10:09 AM

You do have write permissions in that directory?

Code:

$ touch /home/dnascopev/Desktop/hg19_fasta/test
$ ls -l /home/dnascopev/Desktop/hg19_fasta/test


cmccabe 08-10-2015 10:21 AM

The permissions on that directory are set to create and delete

Code:

dnascopev@ubuntu:~$ touch /home/dnascopev/Desktop/hg19_fasta/test
dnascopev@ubuntu:~$ ls -l /home/dnascopev/Desktop/hg19_fasta/test
-rw-rw-r-- 1 dnascopev dnascopev 0 Aug 10 13:10 /home/dnascopev/Desktop/hg19_fasta/test

a file test was created that was 0 bytes. Thank you.

GenoMax 08-10-2015 10:26 AM

Did you compile bowtie2 package yourself or download a pre-compiled version?

One last try

Code:

$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa /home/dnascopev/Desktop/hg19_fasta/my_hg19

cmccabe 08-10-2015 10:35 AM

Code:

dnascopev@ubuntu:~$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa /home/dnascopev/Desktop/hg19_fasta/my_hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory

I downloaded the package from github, extracted, and added the directory to path where bowtie2 is.

Code:

export PATH=$PATH:/home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0
I also made it executable using:

Code:

chmod +x /home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0/bowtie2*
as I was getting an error:

Code:

No command 'bowtie2-build' found, did you mean:
 Command 'bowtie-build' from package 'bowtie' (universe)
bowtie2-build: command not found

making bowtie2 executable fixed one issue but lead to another. Thank you :).

GenoMax 08-10-2015 10:47 AM

Wow .. my head is starting to hurt :confused:

Why did you put the bowtie2 executables under the directory with the fasta sequence? There is no logical explanation as to why this is not working .. perhaps bowtie does not like to have any other files/directories where it is working.

If you are willing .. try the following (I am assuming that the executable files are right in bowtie2-2.6.0 directory):

Code:

$ mv /home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0 /home/dnascopev/Desktop/
$ export PATH=$PATH:/home/dnascopev/Desktop/bowtie2-2.6.0
$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa /home/dnascopev/Desktop/hg19_fasta/my_hg19


cmccabe 08-10-2015 10:59 AM

Code:

dnascopev@ubuntu:~$ mv /home/dnascopev/Desktop/hg19_fasta/bowtie2-2.6.0 /home/dnascopev/Desktop/
dnascopev@ubuntu:~$ export PATH=$PATH:/home/dnascopev/Desktop/bowtie2-2.6.0
dnascopev@ubuntu:~$ bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa /home/dnascopev/Desktop/hg19_fasta/my_hg19
Traceback (most recent call last):
  File "/home/dnascopev/Desktop/bowtie2-2.6.0/bowtie2-build", line 95, in <module>
    main()
  File "/home/dnascopev/Desktop/bowtie2-2.6.0/bowtie2-build", line 92, in main
    os.execv(build_bin_spec, argv)
OSError: [Errno 2] No such file or directory


downloaded the zip from: https://github.com/BenLangmead/bowtie2 as I am blocked from sourceforge.

Thank you for all your help :).

GenoMax 08-10-2015 11:16 AM

I compiled v.2.2.6 from GitHub and can build indexes without any problem so the source files on GitHub are fine.

How about
Code:

$ ls -lh /home/dnascopev/Desktop/bowtie2-2.6.0/bowtie*

cmccabe 08-10-2015 12:01 PM

I am going to re-install. Did you have to do anything besides download, extract, and add to path? Was chmod or make necessary? Thank you :)

GenoMax 08-10-2015 12:12 PM

Quote:

Originally Posted by cmccabe (Post 178822)
I am going to re-install. Did you have to do anything besides download, extract, and add to path? Was chmod or make necessary? Thank you :)

Since it is source code you have to compile it by "make". Did you not do that?

cmccabe 08-10-2015 12:24 PM

Here are the steps:

Code:

wget https://github.com/BenLangmead/bowtie2/archive/master.zip
unzip master.zip
cd /home/dnascopev/Desktop/master
make

after that I renamed the folder to bowtie2-2.2.6 and added that to path using:

Code:

echo 'export PATH=$PATH:/home/dnascopev/Desktop/bowtie2-2.6.0' >> ~/.bashrc
Thank you :).

cmccabe 08-10-2015 01:09 PM

the build indexs is running:

Are these normal?

Code:

Warning: Encountered empty reference sequence
Warning: Encountered reference sequence with only gaps
Warning: Encountered reference sequence with only gaps
Warning: Encountered empty reference sequence
Warning: Encountered empty reference sequence
Warning: Encountered reference sequence with only gaps
Warning: Encountered empty reference sequence

Code:

bowtie2-build -f /home/dnascopev/Desktop/hg19_fasta/hg19.fa /home/dnascopev/Desktop/hg19_fasta/my_hg19
was used to build the index

Code:

cat *.fa > hg19.fa
was used to concatenate the fa from chromFa.tar.gz

Thank you :).

sahil.jain 06-10-2019 07:47 AM

bowtie2-build: command not found
 
I downloaded the bowtie 2-2.3.5.1 for mac using the link:https://sourceforge.net/projects/bowtie-bio/

It was a zipped file so I unzipped it.

I opened the unzipped folder on the terminal and then typed the command:

(base) linglabs-ipro:bowtie2-2.3.5.1-macos-x86_64 linglab$ bowtie2-build
-bash: bowtie2-build: command not found
(base) linglabs-ipro:bowtie2-2.3.5.1-macos-x86_64 linglab$

Please Help!

GenoMax 06-10-2019 07:53 AM

@sahil: Please go through this UNIX basics tutorial, if you are unfamiliar with the command line.


All times are GMT -8. The time now is 10:17 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.