BLAST Database error: No alias or index file found for nucleotide database
2
4
Entering edit mode
8.3 years ago
arronslacey ▴ 310

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 MBits: T
Maximum file size: 1073741824B


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

blast blastn sift makeblastdb • 70k views
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 MBits: T
Maximum file size: 1000000000B


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.

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.

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

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?

0
Entering edit mode

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.

7
Entering edit mode
8.3 years ago
Ram 37k

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

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.

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

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 :-)

1
Entering edit mode

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

1
Entering edit mode

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

0
Entering edit mode
21 months ago
wmorgan • 0

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.