This is a test version of Biostars. For the public version, visit https://www.biostars.org.
List record in a local BLAST database

Is there a way to get a FASTA file containing all the record in a local BLAST database.

I've created a local database using makeblastdb with a fasta file, but was wondering if there is any way to reverse this process?

Thanks!

fasta sequence blast database

2 answers

I found the corresponding fastacmd in blast+, it is blastdbcmd.

blastdbcmd -db database -entry all -out database.fasta

Use fastacmd to generate a single fasta file from an existing BLAST database

You can use the following arguments along with it:

-d    BLAST database (the default is "nr")
-D    1 (dump the database in fasta format)
-o    filename for the output

Example: fastacmd -d cdna -D 1 -o seq.fasta

fastacmd in not included in the latest blast+, is there a new command for this? I tried to search the blast+ document but cannot find it.

Log in to answer this question.