All protocols
Run a local BLAST search against a custom database
Build a BLAST database from a FASTA file and query it locally with blastn — no web submission required.
SSSudipta SardarUpdated July 8, 2026
Prerequisites
- BLAST+ installed (`makeblastdb`, `blastn`)
- A subject FASTA file
- A query FASTA file
1Build the database
Index your subject sequences into a nucleotide BLAST database.
bash
makeblastdb -in subject.fasta -dbtype nucl -out subjectdbExpected output
Building a new DB, current time: ...
Adding sequences from FASTA; added 42 sequences in 0.03 seconds.2Run the search
Query the database and request tabular output for easy parsing.
bash
blastn -query query.fasta -db subjectdb -outfmt 6 -out hits.tsvExpected output
query1 subject3 98.5 200 3 0 1 200 1 200 1e-95 355Troubleshooting
BLAST Database error: No alias or index file found
The -db value must match the -out prefix from makeblastdb, without a file extension.
No hits returned
Confirm query and subject are the same molecule type (nucl vs prot) and lower -evalue if sequences are short.