blastdbcmd
Quick Start
- Command:
blastdbcmd - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/blastdbcmd - Version: 2.17.0+
- Full reference: See references/help.md for complete options
When To Use This Tool
- Inspect a BLAST database after building it.
- Retrieve one or many sequences by identifier from a local BLAST DB.
- Export taxonomy summaries or database metadata.
- Sanity-check that
makeblastdbproduced what your pipeline expects.
Common Patterns
# 1) Inspect database metadata
blastdbcmd -db proteins_db -info
# 2) Retrieve one entry in FASTA format
blastdbcmd \
-db proteins_db \
-entry XP_123456.1 \
-outfmt "%f"
# 3) Retrieve many entries from a batch file
blastdbcmd \
-db proteins_db \
-entry_batch ids.txt \
-outfmt "%f" \
-out hits.fa
# 4) Export taxonomy summary
blastdbcmd -db proteins_db -tax_info
Recommended Workflow
- Use
-infofirst to confirm the database type and metadata. - Retrieve by
-entryor-entry_batchonly if the DB was built with usable sequence IDs. - Use
-outfmtdeliberately;%fis the common FASTA choice for sequence export. - For taxonomic inspection, use
-tax_inforather than trying to parse raw metadata blobs.
Guardrails
-entry,-entry_batch,-info,-metadata, and-tax_infoare mutually exclusive modes.- Range and strand selection only make sense for nucleotide sequence retrieval.
-entry allcan dump an entire database, which is often much larger than expected.- If retrieval by accession fails, the underlying DB may have been built without
-parse_seqids.