Home › Bioinformatics Tutorial › BLAST and Homology Search

BLAST and Homology Search

⏱ 11 min read Updated: 14 Oct 2026

1. Introduction

Every gene and protein carries clues about its evolutionary history. When researchers discover a new DNA sequence from a soil bacterium, a patient sample, or a previously unstudied plant, one of their first questions is: Has a similar sequence been identified before?

The Basic Local Alignment Search Tool (BLAST), developed by the National Center for Biotechnology Information (NCBI), helps answer this question by comparing a query sequence against sequences stored in a database. It identifies regions of local similarity that may provide evidence of evolutionary relationships and clues about biological function.

Note: Sequence similarity can suggest common ancestry, but it does not automatically prove that two sequences have the same function. Researchers must interpret BLAST results alongside statistical evidence, biological context, and additional analyses.

2. The Five Main Types of BLAST

The appropriate BLAST program depends on the type of query sequence and the database being searched.

Figure 1. Choosing the right BLAST program from the type of query and the type of database.

ProgramQueryDatabase
BLASTnNucleotideNucleotide
BLASTpProteinProtein
BLASTxNucleotide (6-frame translation)Protein
tBLASTnProteinNucleotide (6-frame translation)
tBLASTxNucleotide (6-frame translation)Nucleotide (6-frame translation)

2.1 BLASTn: Nucleotide Against Nucleotide

BLASTn compares a nucleotide query sequence with a nucleotide database. It is useful for identifying similar DNA or RNA-derived nucleotide sequences, checking PCR products, and identifying organisms using barcode genes.

Example: A researcher can compare a DNA barcode sequence from an unknown plant against a nucleotide database to identify closely related species.

2.2 BLASTp: Protein Against Protein

BLASTp compares an amino acid sequence with a protein database. Protein sequences can retain detectable evolutionary similarities even when their corresponding DNA sequences have diverged considerably. Therefore, BLASTp is useful for identifying related proteins and generating hypotheses about the function of an unknown protein.

Example: A newly identified protein may show significant similarity to a known enzyme, suggesting that it belongs to the same protein family.

2.3 BLASTx: Translated Nucleotide Against Protein

BLASTx translates a nucleotide query sequence in all six possible reading frames and compares the resulting translations against a protein database.

It is particularly useful when researchers have an unknown DNA fragment but do not know its protein-coding frame. Applications include expressed sequence tags (ESTs), transcript-derived sequences, and metagenomic fragments.

Example: A DNA fragment that produces no convincing nucleotide match may still reveal a significant protein-level similarity after translation.

2.4 tBLASTn: Protein Against Translated Nucleotide

tBLASTn compares a protein query against a nucleotide database translated in all six reading frames.

It is useful when a researcher knows a protein sequence but wants to locate potentially related coding regions in a nucleotide database, such as an incompletely annotated genome.

Example: A protein from one species can be used to search genomic DNA from another species for a possible homologous coding region.

2.5 tBLASTx: Translated Nucleotide Against Translated Nucleotide

tBLASTx translates both the nucleotide query and the nucleotide database sequences in all six reading frames and compares the resulting protein translations.

It can detect coding-region similarities that are difficult to identify using nucleotide-level comparisons alone. However, it is computationally intensive and can be slower than other BLAST programs.

It is particularly useful for exploratory comparisons of unannotated nucleotide sequences when protein-coding similarities are suspected.

Example: Identifying an Unknown DNA Fragment

Imagine that a researcher collects a DNA fragment from a river sample. BLASTn produces no convincing match, but this does not necessarily mean that the organism is new; the sequence may simply be absent from the database or too divergent to match reliably.

The researcher then runs BLASTx and identifies a significant similarity to a known bacterial cellulase protein. This suggests that the fragment may encode a related protein involved in cellulose degradation. Further sequence analysis and experimental evidence would be needed to confirm the protein’s identity and biological function.

Figure 2. The river-sample example: no nucleotide match, but a protein-level hit suggests a possible role.

Start: River sample → DNA fragment

SearchMethodResult
BLASTnNucleotide vs nucleotideNo convincing match (sequence may be absent from the database or too divergent)
BLASTx6-frame translation vs protein databaseSignificant hit to a bacterial cellulase protein

Conclusion: The fragment may encode a protein involved in cellulose degradation.
Next step: Further sequence analysis and experimental validation.

3. Understanding BLAST Results

A BLAST search produces a ranked list of sequence matches, commonly called hits. Several statistical measures help researchers assess the strength and relevance of these alignments.

3.1 E-value (Expect Value)

The E-value estimates the number of alignments with a score equal to or better than the observed score that are expected by chance in a database search under the statistical model.

  • A smaller E-value generally indicates stronger statistical evidence against a chance match.
  • An E-value of 10⁻⁵⁰ indicates a highly significant match under the search model.
  • An E-value of 0.5 indicates that approximately 0.5 alignments with an equal or better score are expected by chance.

An E-value below 10⁻⁵ is sometimes used as an initial screening threshold, but no single cutoff is suitable for every analysis. The interpretation depends on the sequence, database, search settings, and research objective.

Important: An E-value is not the probability that a hit is false, and statistical significance alone does not establish biological function.

3.2 Bit Score

The bit score is a normalized measure of alignment quality derived from the alignment score and the statistical properties of the scoring system.

  • Higher bit scores indicate stronger alignments.
  • Bit scores can help compare alignment strength across searches, particularly when scoring conditions are comparable.
  • Unlike the E-value, the bit score does not directly increase or decrease simply because the database becomes larger.

3.3 Percent Identity

Percent identity represents the percentage of aligned positions containing identical nucleotides or amino acids.

Example: If 80 out of 100 aligned positions contain identical residues, the percent identity is 80%. High identity across a substantial alignment often supports a close sequence relationship. However, percent identity must be interpreted alongside alignment length, gaps, and statistical significance.

3.4 Query Coverage

Query coverage indicates how much of the query sequence is included in the reported alignment or alignments, according to the reporting method.

Example 1: A hit with 100% identity but only 5% query coverage may match just a short region of the query. It may not represent a close relationship across the complete sequence.

Example 2: A protein hit with 35% identity across 95% of the query and an E-value of 10⁻⁶⁰ may provide strong evidence of an evolutionary relationship, depending on the alignment and biological context.

For proteins, approximately 30% identity across a sufficiently long, well-aligned region can support common ancestry, but there is no universal identity threshold that establishes homology in every case.

Figure 3. Reading query coverage and percent identity on a single hit (illustrative values).

FeatureValue
Query length100 amino acids
Aligned regionPositions 5 to 100 (95 residues)
Query coverage95%
Percent identity35% (identical positions inside the aligned region)
E-value1e-60

Reading: Strong evidence of a possible evolutionary relationship, but biological context is still needed.

Interpreting the Measures Together

MeasureWhat it tells youGeneral interpretation
E-valueExpected chance alignmentsLower is generally better
Bit scoreAlignment strengthHigher is better
Percent identityIdentical aligned residuesHigher often indicates closer similarity
Query coverageExtent of the query representedHigher coverage often provides more context

No single measure should be used in isolation. A convincing result combines strong statistical support, an appropriate alignment length, meaningful coverage, and biological plausibility.

4. Going Beyond a Single Search: PSI-BLAST

Ordinary BLASTp is effective at finding many related proteins, but distant evolutionary relationships can be difficult to detect using a single query sequence.

Position-Specific Iterated BLAST (PSI-BLAST) addresses this limitation through iterative searching. The process works as follows:

  1. Initial search: PSI-BLAST performs a protein similarity search using the query sequence.
  2. Hit selection: Qualifying sequences are selected according to the inclusion criteria.
  3. Profile construction: The selected alignments are used to construct a position-specific scoring matrix (PSSM), which represents residue preferences and conservation at different positions.
  4. Next search: The PSSM is used to search the protein database again.
  5. Iteration: Newly qualifying sequences may be incorporated into subsequent rounds, allowing the profile to detect more distant relatives.

Figure 4. PSI-BLAST repeats search, hit selection and profile building to reach distant relatives.

StepActionNote
1Query protein → initial BLASTp searchStarting point
2Select hitsInclusion threshold, default E = 0.005
3Build PSSMPosition-specific scoring matrix
4Search the database using the PSSMProfile-based search
5Check for new sequencesIf YES, go back to Step 2 (next iteration). If NO, stop.

Final result: Distant relatives / protein family.

Example: Discovering a Protein Family

Suppose a protein with an unknown function produces only a few significant matches in the first search. After several PSI-BLAST iterations, the profile may identify additional proteins belonging to a related family, potentially revealing conserved domains or motifs associated with a biological role.

However, incorrect or unrelated sequences included in the profile can lead to false matches in later rounds. Researchers should examine the inclusion criteria, alignment quality, and biological relevance of newly identified sequences.

The default PSI-BLAST inclusion threshold is commonly E = 0.005, although settings may be changed. This threshold is an inclusion criterion, not a guarantee that every selected sequence is a true homolog.

5. Homology, Orthologs, and Paralogs

Sequence similarity and homology are related concepts, but they are not interchangeable.

  • Sequence similarity is an observable property measured by comparing sequences.
  • Homology describes an evolutionary relationship in which two sequences descend from a common ancestor.

Homology is a qualitative conclusion: two sequences are homologous or they are not. Expressions such as “60% homologous” are therefore incorrect. Use “60% identical” or an appropriate measure of sequence similarity instead.

5.1 Orthologs

Orthologs are homologous genes that diverged following a speciation event. They occur in different species and often retain related biological functions.

Example: Human and mouse insulin genes are orthologs. Although orthologs frequently preserve similar functions, their functions should not automatically be assumed to be identical.

5.2 Paralogs

Paralogs are homologous genes that originated through gene duplication. They may occur within the same genome and can evolve different functions over time.

Example: Human alpha-globin and beta-globin genes belong to a globin gene family that evolved through duplication and subsequent divergence. They encode distinct globin chains that contribute to hemoglobin.

Figure 5. In a gene tree, speciation nodes connect orthologs and duplication nodes connect paralogs.

Gene tree (read from top to bottom):

  • Ancestral gene
    • Duplication event → Gene copy A and Gene copy B
      • Gene copy A → Speciation event → A-Human, A-Mouse
      • Gene copy B → Speciation event → B-Human, B-Mouse
RelationshipMeeting pointGene pairs
OrthologsSpeciation nodeA-Human and A-Mouse; B-Human and B-Mouse
ParalogsDuplication nodeA-Human and B-Human; A-Mouse and B-Mouse; A-Human and B-Mouse; A-Mouse and B-Human

Can BLAST Distinguish Orthologs From Paralogs?

BLAST alone cannot reliably determine whether two sequences are orthologs or paralogs. A strong BLAST hit is a useful candidate for further investigation, but additional evidence is needed:

  • Reciprocal best-hit comparisons as an initial screening method.
  • Phylogenetic trees to investigate evolutionary relationships.
  • Gene-family and domain analyses.
  • Genomic context, synteny, and available functional evidence.

Reciprocal best hits are useful but are not definitive proof of orthology, especially when gene duplication, gene loss, or incomplete databases complicate the analysis.

6. Setting Up BLAST Locally

The NCBI web interface is convenient for individual searches. However, a local installation of BLAST+ is useful when researchers need to process many sequences, work with private data, or build custom databases.

BLAST+ is the NCBI command-line suite for sequence similarity searching.

Figure 6. From FASTA files to tabular results with BLAST+ on your own computer.

StageInputTool or commandOutput
1. Build databasegenome.fasta (subject sequences)makeblastdbmydb (local database)
2. Run searchreads.fasta (query sequences) + mydbblastnresults.txt (tabular, -outfmt 6)
3. Analyseresults.txtExcel or Python + PandasFiltered, summarized, shortlisted hits

Step 1: Install BLAST+

Download and install the appropriate BLAST+ package from the official NCBI website:
https://blast.ncbi.nlm.nih.gov/doc/blast-help/downloadblastdata.html

Ensure that the executable files are accessible from your terminal or command prompt.

Step 2: Prepare the FASTA File

Prepare a nucleotide FASTA file named genome.fasta. A FASTA file typically contains a header beginning with > followed by the sequence on the next line or lines.

Example:

>seq1 example sequence ATGCGTACGTTAGCTAGCTAGCTAGGATCCGATCG

Step 3: Build a Nucleotide Database

Run the following command:

bash

makeblastdb -in genome.fasta -dbtype nucl -out mydb

Here:

  • -in genome.fasta specifies the input FASTA file.
  • -dbtype nucl indicates that the database contains nucleotide sequences.
  • -out mydb specifies the database name.

The input file must exist at the path provided.

Step 4: Run a BLASTn Search

Prepare a query file named reads.fasta and run:

bash

blastn -query reads.fasta -db mydb -evalue 1e-5 -outfmt 6 -num_threads 4 -out results.txt

This command searches the query sequences against the locally created nucleotide database.

  • -query reads.fasta: specifies the query sequences.
  • -db mydb: specifies the database created in the previous step.
  • -evalue 1e-5: sets the reporting E-value threshold.
  • -outfmt 6: produces tabular output without a header by default.
  • -num_threads 4: requests four computational threads.
  • -out results.txt: saves the results to a text file.

Step 5: Interpret the Tabular Output

The standard tabular format, -outfmt 6, contains 12 columns in the following order:

ColumnFieldDescription
1qseqidQuery sequence ID
2sseqidSubject sequence ID
3pidentPercent identity
4lengthAlignment length
5mismatchNumber of mismatches
6gapopenNumber of gap openings
7qstartQuery start position
8qendQuery end position
9sstartSubject start position
10sendSubject end position
11evalueE-value
12bitscoreBit score

The output can be examined using a spreadsheet or processed with Python and Pandas to filter significant hits, summarize results, and identify candidate sequences for further study.

For protein searches, build a protein database using -dbtype prot and use blastp. The other BLAST programs require their corresponding query and database sequence types.