This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Blast Error: Tax database file not found

Hello, I am running this command for a blast search.

blastx -query Ndiv_cap300.fasta -out Ndiv_run -outfmt 7 -db nr -num_threads 32 -evalue 1e-3 -max_target_seqs 5

however I get the following error that I just do not understand

/Liams_Work$ blastx -query Ndiv_cap300.fasta -out Ndiv_run -outfmt 7 -db nr -num_threads 32 -evalue 1e-3 -max_target_seqs 5
terminate called after throwing an instance of 'ncbi::CSeqDBException'
  what():  NCBI C++ Exception:
    "/build/buildd/ncbi-blast+-2.2.28/c++/src/objtools/blast/seqdb_reader/seqdbtax.cpp", line 82: Error: ncbi::CSeqDBTaxInfo::x_Init() - Error: Tax database file not found.

any help would be greatly appreciated.

Thanks in advance!

blast

1 answer

That error message suggests that NCBI BLAST+ is attempting to look-up taxonomy information and is failing due to the Taxonomy database not being present in the directory containing the database being searched.

In order to allow NCBI BLAST+ to access the taxonomy information you will need to download 'taxdb.tar.gz' from ftp://ftp.ncbi.nlm.nih.gov/blast/db/ and unpack it into the same directory as you are using for the 'nr' database. For more information about the BLAST databases provided by NCBI see ftp://ftp.ncbi.nlm.nih.gov/blast/db/README and the various database related sections of the BLAST Command Line Applications User Manual.

Except that his query should not require taxdb. It looks to me (I could be wrong), that OP has, instead of using a binary, compiled blast from the source himself, and that the root of the problem lies there.

hpmcwill your solution worked thank you very much.

Log in to answer this question.