7
$\begingroup$

How to extract the sequence used to create a blast database. This is useful when you download a blastdb from somewhere else e.g. one of the databases provided by NCBI including the 16SMicrobial database. Or alternatively, when you want to double check which version of a sequence you have included in a blastdb.

$\endgroup$
0
6
$\begingroup$

You can extract fasta sequence from a blastdb constructed from a fasta file using blastdbcmd which should be installed when you install blast/makeblastdb.

blastdbcmd -entry all -db <database label> -out <outfile>

If you had a database called my_database which contained the files:

  • my_database.nhr
  • my_database.nsq
  • my_database.nin

and you wanted your fasta output file to be called reference.fasta you would run the following:

blastdbcmd -entry all -db my_database -out reference.fasta
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.