This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BLAST Database error: No alias or index file found for protein database [/mnt/research/common-data/Bio/blastdb/nr]

I have the error below:

Bio.Application.ApplicationError: Non-zero return code 2 from ‘psiblast -out 7NDB_B_WT.out -query 7NDB_B_WT.fasta -db /mnt/research/common-data/Bio/blastdb/nr -evalue 5000 -num_iterations 3 -out_ascii_pssm 7NDB_B_WT.pssm’, message ‘BLAST Database error: No alias or index file found for protein database [/mnt/research/common-data/Bio/blastdb/nr] in search path [/media/leon//Machine_learning_model_binding_free_energy_BFE_change_predictions/TopNetmAb/7NDB/features/7NDB_B_A_344_S::]’

I downloaded the “nr” file from the blast database and created a database link in the directory [/mnt/research/common-data/Bio/blastdb/nr]. But the error persists.

Please, can anyone help me?

biopython free calculation blast python

set $BLASTDB to where you index files for nr are located. You don't download just nr file. There are 55 files (as of Dec 2021) for pre-formatted nr db and you need to download them all, uncompress in a directory. nr db was upwards of 300GB last time I had looked.

2 answers

It is highly recommended that you use the update_blastdb.pl --decompress nr command.

The commands that you need to use will be something like:

wget https://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/ncbi-blast-2.12.0+-x64-linux.tar.gz
tar -xzf ncbi-blast-2.12.0+-x64-linux.tar.gz
./ncbi-blast-2.12.0+/bin/update_blastdb.pl --decompress nr

(You may need to give execution rights)

You need to create an index of the nr database, and it seems that you didn't

Need to use the makeblastdb command to do it. See This page for further instructions

Log in to answer this question.