Makeblastdb error: file does not exist
1
1
Entering edit mode
9.4 years ago
coreyhowe99 ▴ 30

Bioinformatics noob here,

I just downloaded the blast command line applications and I would like to make a database of a transcriptome that I have acquired. It is labeled as firefly.fas and I have put the file into a folder on my desktop in the path /Desktop/Science/ncbi/.

I've been typing this into the command line:

-bash: Desktop/Science/ncbi/: is a directory
makeblastdb -in firefly.fas -dbtype nucl -parse_seqids -out FF
Building a new DB, current time: 12/18/2014 15:23:12
New DB name:   FF
New DB title:  firefly.fas
Sequence type: Nucleotide
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1000000000B
BLAST options error: File firefly.fas does not exist

Everytime I always get that the files does not exist. I am sure that it is a fasta file, and that it is in the right folder. I even tried sample fasta sequences that I downloaded and got the same error. It is probably a simple problem to solve, but I cannot seem to get past it.

blast • 8.1k views
ADD COMMENT
0
Entering edit mode

Is it /Desktop/Science/ncbi or **~**/Desktop/Science/ncbi? That could be a possible problem. Also, could you please give the output of running ls -l in the working folder?

ADD REPLY
0
Entering edit mode

Tried both /Desktop/Science/ncbi and ~/Desktop/Science/ncbi, both gave the same error.

Here is the output of running ls -l:

ls -l

total 24
drwxr-xr-x     3 coreyhowe  staff    102 Dec 17 19:57 12
drwx------     4 coreyhowe  staff    136 Dec  1 00:00 Applications
-rw-r--r--     1 coreyhowe  staff   7756 Feb  9  2012 BBa_K325909 Part-only sequence (7637 bp).ape
drwxr-xr-x    29 coreyhowe  staff    986 Jun 29 19:10 CLC_Data
drwxr-xr-x    13 coreyhowe  staff    442 Dec  3 23:05 CLCdatabases
drwxr-xr-x     7 coreyhowe  staff    238 Jan  8  2014 Calibre Library
drwx------+   29 coreyhowe  staff    986 Dec 18 19:15 Desktop
drwx------+  165 coreyhowe  staff   5610 Dec  6 16:46 Documents
drwx------+ 1330 coreyhowe  staff  45220 Dec 18 15:20 Downloads
drwx------@   18 coreyhowe  staff    612 Dec 18 14:58 Google Drive
drwx------@   60 coreyhowe  staff   2040 Dec 17 18:00 Library
drwx------+   16 coreyhowe  staff    544 Jul 14 22:37 Movies
drwx------+    9 coreyhowe  staff    306 Jun 22 11:31 Music
drwxr-xr-x     6 coreyhowe  staff    204 Nov  9 00:43 New Unity Project
drwxr-xr-x    18 coreyhowe  staff    612 Nov 14 20:56 New Unity Project 1
drwx------+  613 coreyhowe  staff  20842 Apr  7  2014 Pictures
drwxr-xr-x+    5 coreyhowe  staff    170 Oct  5  2011 Public
lrwxr-xr-x     1 root       staff     59 Oct  5  2011 Send Registration -> /Users/coreyhowe/Library/Assistants/Send Registration.setup
drwxr-xr-x+    5 coreyhowe  staff    170 Oct  5  2011 Sites
drwxr-xr-x     6 coreyhowe  staff    204 Nov 15  2013 jahstorage
drwxr-xr-x@    2 coreyhowe  staff     68 Mar  3  2012 tmp
ADD REPLY
0
Entering edit mode

Please run ls -l on the directory in which you have the fasta file. And it looks like you're on a Mac. The path you're looking for is ~/Desktop/Science/ncbi.

Run this:

cd ~/Desktop/Science/ncbi && ls -l
ADD REPLY
0
Entering edit mode

Ok after running that I get this output:

cd ~/Desktop/Science/ncbi && ls -l

total 70480
-rw-r--r--@  1 coreyhowe  staff        85 Oct 27 19:09 ChangeLog
-rw-r--r--@  1 coreyhowe  staff      1054 Oct 27 19:09 LICENSE
-rw-r--r--   1 coreyhowe  staff       465 Oct 27 19:09 README
drwxr-xr-x@ 24 coreyhowe  staff       816 Oct 27 19:09 bin
drwxr-xr-x@  3 coreyhowe  staff       102 Oct 27 19:18 doc
-rw-------   1 coreyhowe  staff  36057824 Jun 27 08:31 firefly.fas
-rw-r--r--@  1 coreyhowe  staff     10594 Oct 27 19:09 ncbi_package_info
ADD REPLY
0
Entering edit mode

Alright, I tried doing the makeblastdb after running the command above and it was successful. The new database FF is in my directory folder, thanks a lot for the help!

Any idea of what the problem was? What exactly does the ~ before the path do and what the ls -l does?

ADD REPLY
0
Entering edit mode

Hi,

You were trying to run the program in a different directory than the one that had your files. Computers are dumb. They have to be shown which files you're referring to by running the command from the directory that contains the files. pointing the computer to the location of the command(s) as well as the file(s). Adding appropriate locations to the $PATH environment variable helps us avoid specifying the full path to frequently used command(s).

~ is Unix shorthand for user's home directory. / is Unix's way of representing the topmost directory of the entire file system. ~ on Mac corresponds to /Users/<username> (which in your case should be /Users/coreyhowe

ls -l is a command to merely list all contents in the current directory with some details. I asked for it so I could check if the directory contained the fasta file and if you had the requisite permissions to access (read) the file.

directory = folder (on Unix).

ADD REPLY
0
Entering edit mode
9.4 years ago
Ram 43k

Adding the solution as an answer,

You were trying to run the program in a different directory than the one that had your files. Computers are dumb. They have to be shown which files you're referring to by running the command from the directory that contains the files.

~ is Unix shorthand for user's home directory. / is Unix's way of representing the topmost directory of the entire file system. ~ on Mac corresponds to /Users/<username> (which in your case should be /Users/coreyhowe).Your files are in the directory /Users/coreyhowe/Desktop/Science/ncbi (same as ~/Desktop/Science/ncbi)

Putting the above together, you just had to run cd ~/Desktop/Science/ncbi for your command to work fine.

I also wanted to make sure that you had the necessary permissions to work with the file. One way to check that is to list the contents of the directory in a detailed format with the ls -l command. It solves two problems for me - checks if the directory contains the fasta file and also displays the permissions on the file.

Also, "directory" is how we refer to a folder on Unix.

ADD COMMENT

Login before adding your answer.

Traffic: 2575 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6