This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Blast Db Version

Hi all,

I'm currently updating my BLAST application from the legacy BLAST to BLAST+. It seems that BLAST+ expects 'version 4' database files. Which my blast DB's apparently are not.

Is there a way to use makeblastdb, or any other utility, to update the version of a blast db that was created using formatdb?

Thanks in advance, and my apologies if this has been addressed on this forum previously.

Regards,
Brandon Wilson

makeblastdb blast

I do have a set of sequence reads (5k) and did a read-to-read comparison.I ran both formatdb and makeblastdb but it gave different answer. Why would it gave different answer?

Below is the different result between two different version of BLASTN (megablast)

# BLASTN 2.2.29+

# Query: 5431875_t14_w100_x1
# Database: birc5
# 0 hits found
# BLASTN 2.2.29+
# Query: 5431875_t14_w100_x1
# Database: birc5
# 0 hits found
# BLASTN 2.2.29+
# Query: 9230189_t14_w100_x1
# Database: birc5
# Fields: query acc., subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score
# 2174 hits found
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-48     185

This is my command-line:

./blastn -db birc5 -query BIRC5.fasta -perc_identity 0.98 -xdrop_gap 40 -num_alignments 90000000 -dust yes -soft_masking true -lcase_masking -outfmt "7 qacc seqid pident length mismatch gapopen qstart qend sstart send evalue bitscore" -out birc5_megablast&

[v1wwanm@ris-lx09 blastn]$ head -n 20 ../megablast/birc5_megablast
# BLASTN 2.2.22 [Sep-27-2009]
# Query: 16383 sequences
# Database: BIRC5.fasta
# Fields: Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value, bit score
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198
9230189_t14_w100_x1     9230189_t14_w100_x1     100.00  100     0       0       1       100     1       100     2e-52    198

This is my command-line:

./megablast -d BIRC5.fasta -i BIRC5.fasta -p 98 -UT -X40 -JF -F mD -v90000000 -b90000000 -D3 -o birc5_megablast -m0&

2 answers

They musy be quite old BLAST databases. All recent versions of BLAST formatdb can create databases that can be used by the new BLAST+ makeblastdb.

I think you can convert old databases using makeblastdb, as it supports 'blastdb' as an input type, not just the traditional 'fasta'.

makeblastdb -in <legacy-db> -out /newdir/newdbname

If that doesn't work, you can reverse the old database and reindex it:

fastacmd -d <legacy-db> -D 1 | makeblastdb -dbtype nucl -out <newfolder/newname>

The -D 1 dumps the database as fasta. You'll need to change nucl to prot depending. Make sure you put the new databases in a separate folder.

Blast+ will work with your "legacy" blast DB.

Log in to answer this question.