SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
bcftools command not found sadiexiaoyu Bioinformatics 6 02-17-2014 12:47 AM
FLASH : command not found opencell Bioinformatics 2 04-17-2013 11:07 PM
Bedtools command not found sarah_19 Bioinformatics 2 03-13-2013 08:51 AM
coverageBed: command not found ibn.adam RNA Sequencing 6 10-29-2011 02:24 PM
twoBitToFa: command not found papori Bioinformatics 11 07-06-2011 04:36 AM

Reply
 
Thread Tools
Old 08-08-2015, 05:16 AM   #1
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default 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 .
cmccabe is offline   Reply With Quote
Old 08-08-2015, 08:30 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

You probably need to set the path to a directory lower than now
Code:
$ /media/C2F8EFBFF8EFAFB9/bowtie2-2.6.0/bin
GenoMax is offline   Reply With Quote
Old 08-10-2015, 07:59 AM   #3
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 .
cmccabe is offline   Reply With Quote
Old 08-10-2015, 08:06 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

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?
GenoMax is offline   Reply With Quote
Old 08-10-2015, 08:55 AM   #5
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 .
cmccabe is offline   Reply With Quote
Old 08-10-2015, 09:07 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

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.
GenoMax is offline   Reply With Quote
Old 08-10-2015, 10:01 AM   #7
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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
cmccabe is offline   Reply With Quote
Old 08-10-2015, 10:09 AM   #8
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

You do have write permissions in that directory?

Code:
$ touch /home/dnascopev/Desktop/hg19_fasta/test
$ ls -l /home/dnascopev/Desktop/hg19_fasta/test
GenoMax is offline   Reply With Quote
Old 08-10-2015, 10:21 AM   #9
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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.
cmccabe is offline   Reply With Quote
Old 08-10-2015, 10:26 AM   #10
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

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
GenoMax is offline   Reply With Quote
Old 08-10-2015, 10:35 AM   #11
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 .
cmccabe is offline   Reply With Quote
Old 08-10-2015, 10:47 AM   #12
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

Wow .. my head is starting to hurt

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
GenoMax is offline   Reply With Quote
Old 08-10-2015, 10:59 AM   #13
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 .
cmccabe is offline   Reply With Quote
Old 08-10-2015, 11:16 AM   #14
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

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*
GenoMax is offline   Reply With Quote
Old 08-10-2015, 12:01 PM   #15
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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
cmccabe is offline   Reply With Quote
Old 08-10-2015, 12:12 PM   #16
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

Quote:
Originally Posted by cmccabe View Post
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?
GenoMax is offline   Reply With Quote
Old 08-10-2015, 12:24 PM   #17
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 is offline   Reply With Quote
Old 08-10-2015, 01:09 PM   #18
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 353
Default

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 .
cmccabe is offline   Reply With Quote
Old 06-10-2019, 07:47 AM   #19
sahil.jain
Junior Member
 
Location: St. Louis

Join Date: Jun 2019
Posts: 1
Default 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!
sahil.jain is offline   Reply With Quote
Old 06-10-2019, 07:53 AM   #20
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,937
Default

@sahil: Please go through this UNIX basics tutorial, if you are unfamiliar with the command line.
GenoMax 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 12:44 PM.


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