This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem setting blastdb in linux

Hi,

I have been trying to run a program using blastall and it doesn't seem to be able to use the database I am trying to use:

/usr/bin/blastall -p blastp -e 10 -T T -I T -d /database/NR/ -i test1.fasta -outdor blastresults

I get the error msg:

BLAST Database error: No alias or index file found for protein database [/database/NR/] in search path [/home/Desktop/phylo::]

The program I am running is old (from 2004) I made sure that both the query and the DB are protein (I am using the NR as the DB) The blastall is legacy_blast.pl 195935 2010-06-28 20:32:08Z camacho

The directory I am in is the one called phylo I tried copying the NR into that directory but that didn't work either.

I am sure I'm missing something but I don't know what it is. Maybe the blast version are not compatible?

blastdb blastall

2 answers

If you downloaded the nr database from NCBI recently then it is in a new format (v.5) that is incompatible with the old version of blast you are running. Hope you have a specific reason to do that. I am not even sure if v.4 indexes that NCBI makes available in this directory (they were last updated in Feb 2020) are even going to work that old a version of blast. If you must use that old a version then your option is to download nr fasta files from here and make the index yourself. Which will not be a trivial task.

Several things could be wrong here. First, the -d switch requires a file name, not a directory name. So if all your nr.??? files are in the /database/NR/ directory, you would enter /database/NR/nr after -d. Second, blastall doesn't have a -outdor switch. The output switch is -o. Lastly, as GenoMax already suggested, you will most likely need an old-style database indices for this to work. I think it is fairly simple to make them. A program called formatdb should have come in the same package as your blastall. Let's say that you downloaded a single nr.gz file from this link into /database/NR/ directory. After unpacking the database (gunzip nr.gz), this is how you create its old-style index:

formatdb -i nr -p T -o T -n "Non-redundant database"

This will take a while, but when it is done you should be able to run the blastall command after incorporating changes I indicated above.

Log in to answer this question.