This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BLASTP version 4 database error *Help

I am having trouble running the blastp command. When I run this command against the Swiss-prot database installed from the NCBI i get this error

$ blastp -db swissprot -query Ecoli_rpoB.fasta -out TEST15.txt
BLAST Database error: Error: Not a valid version 4 database.

However, when I create my own database from a normal fasta file it works, the same command works fine. I have the latest blast+ tool I believe ncbi-blast-2.10.1+-x64-linux.tar.gz

I am trying to use the preformatted database from NCBI, the way i install it is

 perl update_blastdb.pl swissprot 

perl update_blastdb.pl swissprot.tar.gz -decompress

This gives me the swissprot.pdb, .phr, .pin, pog, pos, .pot, ppd, ppi, psq, ptf, pto

I think the issue is with the version of the database, but I am unsure how to get a different version or if this is even the problem. Thank you for the help :) The same issue occurs with the refseq database I installed from the NCBI

alignment software error sequence

NCBI databases are all v5 by default now which the current blast+ supports. It is odd that you are getting that error if you downloaded a fresh copy of swissprot.

Edit: As hinted by @h.mon, you likely have an old version of blastp that is in your $PATH. It is not able to support the new v5 database.

up to version 2.9.0 the makeblastdb was still default to version 4 (had to specifically ask for v5 format) from 2.10.0 onwards it's indeed v5

Thank you, the older version of blastp was in my path, your correct

I got the issue fixed!

2 answers

What is the output of:

which blastp

And:

blastp -version

blast p

$ blastp
BLAST query/options error: Either a BLAST database or subject sequence(s) must be specified
Please refer to the BLAST+ user manual.
(bioinfo)

blastp -version:

$ blastp -version
blastp: 2.6.0+
 Package: blast 2.6.0, build Jan 15 2017 17:12:27
(bioinfo)

If you did install the latest version of blast+ make sure it is in your $PATH and comes before this old version.

The latest version of update_blastdb.pl allows you to specify which version of the BLAST databases to retrieve, but the default is version 4.

To download version 5 of any available database type option "--blastdb_version 5"

Example:

./update_blastdb.pl --decompres 16S_ribosomal_RNA --blastdb_version 5

but the default is version 4.

This is not correct. Default is 5 but you can download old v.4 indexes (frozen as of Feb 2020 I think since that is what the FTP site has).

--blastdb_version
         Specify which BLAST database version to download (default: 5).  Supported values: 4, 5

Log in to answer this question.