Question: Makeblastdb error: file does not exist
1
gravatar for coreyhowe99
4.9 years ago by
coreyhowe9920
United States
coreyhowe9920 wrote:

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/. 

Ive 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 • 3.4k views
ADD COMMENTlink modified 4.9 years ago by RamRS24k • written 4.9 years ago by coreyhowe9920

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 REPLYlink written 4.9 years ago by RamRS24k

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 REPLYlink written 4.9 years ago by coreyhowe9920

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 REPLYlink written 4.9 years ago by RamRS24k

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 REPLYlink written 4.9 years ago by coreyhowe9920

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 REPLYlink written 4.9 years ago by coreyhowe9920

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.

~ 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 REPLYlink modified 4.9 years ago • written 4.9 years ago by RamRS24k
0
gravatar for RamRS
4.9 years ago by
RamRS24k
Houston, TX
RamRS24k wrote:

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 COMMENTlink written 4.9 years ago by RamRS24k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1314 users visited in the last hour