BLAST Database error: No alias or index file found for nucleotide database
3
5
Entering edit mode
10.1 years ago
arronslacey ▴ 320

Hi - I am trying to run blastn, and then also SIFT standalone. I am having database configuration issues however as I am getting the following:

arron@arron-Ideapad-Z570 ~/Phd/programs/sift4.0.3b $ blastn -query test/lacI.fasta -db db/swissprot/
BLAST Database error: No alias or index file found for nucleotide database [db/swissprot/] in search path [/home/arron/Phd/programs/sift4.0.3b:::]

After some advice from other threads, I downloaded a protein database, for example swissprot:

wget ftp://ftp.ebi.ac.uk/pub/databases/fastafiles/uniprot/uniprotkb_swissprot.gz
zcat uniprotkb_swissprot.gz | awk '{if (/^>/) { print ">" $2} else { print $_}}' > swissprot.fa

and then used makeblastdb to create a blast database:

arron@arron-Ideapad-Z570 ~/Phd/programs/sift4.0.3b/db/swissprot $ makeblastdb -in swissprot.fa -dbtype prot

Building a new DB, current time: 10/27/2014 13:18:57
New DB name:   swissprot.fa
New DB title:  swissprot.fa
Sequence type: Protein
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1073741824B
Adding sequences from FASTA; added 546439 sequences in 19.0039 seconds.

yet I am still getting the same problem. What am I doing wrong?

blast blastn sift makeblastdb • 91k views
ADD COMMENT
0
Entering edit mode

I'm experiencing a similar issue.

Using a set of genomes/transcriptomes, I invoked makeblastdb as follows:

makeblastdb -in exons_for_blastall.fasta -input_type fasta -dbtype nucl \
-title exons_for_blastall -parse_seqids -out exons_for_blastall

This is what is reported on screen:

Building a new DB, current time: 06/01/2016 21:31:34
New DB name:   exons_for_blastall
New DB title:  exons_for_blastall
Sequence type: Nucleotide
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1000000000B
Adding sequences from FASTA; added 231417 sequences in 52.605 seconds.

Next, I tried to blastn this db with the .fasta file I used to generate it (all vs. all blast):

blastn -db exons_for_blastall -query exons_for_blastall.fasta -perc_identity 80\
 -out exons_for_blastall.blasted -evalue 1e-20

You'll see I used the db name exactly. This resulted in the same error message that started this thread. Interestingly, makeblastdb created a number of files, for which I have no idea what they are for: .nhr, .nin, .nog, .nsd, .nsi, and .nsq.

ADD REPLY
0
Entering edit mode

I am not sure why people always choose the same name as their fasta file as the basename for the database.

Are all the ".n" files in the same directory? Could you try to create a new db in a different directory with a different name and see if that helps.

ADD REPLY
1
Entering edit mode

Figure out the problem. For some reason, blastn doesn't like spaces in paths to a file, even if the appropriate symbol to indicate a space in a directory name is used.

ADD REPLY
0
Entering edit mode

Hello! I'm trying to parse the database UNITE to BLAST and I am getting this same error, but actually, not all .n files are generating (just the .nhr, .nin, .nsq).

This is the command I am using:

makeblastdb -in sh_general_release_dynamic_02.02.2019.fasta -input_type fasta -dbtype nucl -parse_seqids -title uniteDB2019 -hash_index -out uniteDB2019o

Is there something missing?

ADD REPLY
0
Entering edit mode

Please open a new question and reference this post in there. Do not add answers unless you're answering the top-level question.

ADD REPLY
0
Entering edit mode

I had this error but fixed it by first "cd"-ing (changing directory) to the actual database-containing directory and then running the blastdbcmd command.

ADD REPLY
7
Entering edit mode
10.1 years ago
Ram 44k

Once you create the database using makeblastdb, your database name is swissprot.fa

Your command should be:

blastn -query test/lacI.fasta -db <path_to_db>/swissprot.fa

I'd recommend using a custom name with makeblastdb that you can then supply to the -db parameter - that should avoid confusion with existing file-names.

ADD COMMENT
1
Entering edit mode

hi RamRS - I actually think I should have been using blastp as swissprot as a protein database...yes it works fine with blastp

ADD REPLY
1
Entering edit mode

It would seem I have run out of coffee once again - should've seen that bit from a mile away. Or probably because it's Monday.

Anyway, glad you found the solution :-)

ADD REPLY
1
Entering edit mode

This was actually very helpful for me. Thank you!! (Even though you were missing out on coffee).

ADD REPLY
1
Entering edit mode

Oh well, another coffee-less Monday, another shot in the dark!

ADD REPLY
2
Entering edit mode
3.6 years ago
wmorgan ▴ 20

I had the same BLAST Database error, which I was able to fix by changing to the directory containing the database files (cd ~/blast/blastdb_custom) and then running the blastn command from within that directory. I suspect that specifying the BLASTDB location in a configuration file as described here would also work, but I haven't tried this yet.

ADD COMMENT
0
Entering edit mode

Looking into this a little more deeply, I discovered that it wants you to name the database WITHIN the directory, rather than naming the directory that contains it. So if I have

Seq1.fasta
16S_ribosomal_RNA/16S_ribosomal_RNA.ndb etc

under my working directory, I want to call blast as:

blastn -query "Seq1.fasta"  -db "./16S_ribosomal_RNA/16S_ribosomal_RNA" ...

This works.

ADD REPLY
0
Entering edit mode
14 months ago
amit • 0

Use proper code: makeblastdb -in db.fasta -dbtype prot -out DB

then blastp -query test.fasta -db DB -out test.blastp.out

ADD COMMENT

Login before adding your answer.

Traffic: 1210 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