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 nucleotide database [nr] in search path

Hi, I'm a newbie in bioinformatics. I've tried using blast. Specifically, I've tried to use perl [PATH TO THE blast]/update_blastdb.pl --passive --decompress nr

The database has been built using the above command. I downloaded the file in fasta format from https://www.uniprot.org/downloads to test the blast,

blastn -db nr/ -query [PATHTOTHEQUERY]/uniprot_sprot.fasta -out results.out

I've run the above command. As a result I received the following error.

BLAST Database error: No alias or index file found for nucleotide database [PATHTOTHEDATABASE/nr] in search path [/bio:::]

I think I have failed to build the database, but I don't know how to build the database.

blastn blast

The database has been built using the above command.

That command only downloads preformatted database files from NCBI. Did all files download and decompress? These files are large and should take a significant chunk of time to download and then decompress.

Thank you for your answer! There are many .phd .phi .phr .pin .pog .pppd .ppi .psq files in the nr/ directory. So I think the files decompresed.

Apart from @genomax comment, it seems the value for the -db parameter is not valid. it should point to a database file (nr in your case indeed) but not nr/ as this is a path location (== remove the / from it )

Thank you for your response. I remove / but received a similar error when I tried to run it.

OK.

can you confirm that you specified the correct path ([PATHTOTHEDATABASE/nr]) to the nr DB location on your system? aside from all the files you mentioned, there should be a nr.pal one. Is it there?

Thank you for your further response! I think I have the path to the database confirm correctly , because there are a lot of .phd .phi .phr .pin .pog .pppd .ppi .psq files in there. Yes there is nr.pal file in nr/ directory.

that's how it should look like indeed.

Could you try setting the BLASTDB= global var before starting the blast.

so do: BLASTDB=PATHTOTHEDATABASE before starting the blast itself

and just to be completely sure: if you do ls PATHTOTHEDATABASE/nr* you get that list of files you mentioned above, correct?

to create a database from a fasta file, you can use BLAST+ and you need to use the command

makeblastdb

Here is the link for explanations.

1 answer

Thank you for your answers. They were really helpful.

I solved this issue.

blastp -db nr/nr -query PATHTODATA

I learn -db option is not path but name of database.

Log in to answer this question.