Sequence Alignment — Biological Sequence Alignment
Biological Sequence Alignment · Also known as: pairwise alignment, multiple sequence alignment, MSA, sequence comparison
Sequence alignment is a foundational bioinformatics technique that arranges two or more DNA, RNA, or protein sequences to reveal regions of similarity, infer evolutionary relationships, identify functional domains, and map sequencing reads to reference genomes. It underpins virtually every downstream genomic analysis, from variant calling and gene expression quantification to phylogenetics and structural annotation.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
+5 more
When to use it
Use sequence alignment whenever you need to compare biological sequences: mapping short reads to a reference genome before variant calling or expression quantification; identifying homologous genes or proteins across species; detecting conserved functional domains; or inferring evolutionary relationships as input to phylogenetic analysis. Pairwise alignment is appropriate for comparing two sequences; MSA is required when aligning three or more homologs. Do not use sequence alignment as a standalone analysis for quantitative trait or expression studies — it is a preprocessing step, not an end-point method. Avoid applying alignment tools designed for DNA to protein data without choosing an appropriate substitution matrix, and do not use global alignment algorithms when only local similarity is expected (e.g., when comparing a short domain to a full-length protein).
Strengths & limitations
- Mathematically principled: dynamic programming guarantees the optimal alignment for a given scoring scheme.
- Universally applicable to DNA, RNA, and protein sequences across all organisms.
- Scales from pairwise comparison of two sequences to genome-wide read mapping of billions of short reads.
- Extensively validated and embedded in mature, community-maintained software (BLAST, BWA-MEM, STAR, MUSCLE, MAFFT).
- Alignment files (SAM/BAM) are standardised and compatible with the entire downstream genomics toolchain.
- Optimal dynamic programming algorithms (Needleman–Wunsch, Smith–Waterman) are computationally expensive (O(mn) time and space) and impractical for whole-genome comparisons without heuristic acceleration.
- Alignment quality is sensitive to the choice of substitution matrix and gap penalties, which often require domain knowledge to set appropriately.
- Highly divergent sequences (low identity) may yield unreliable alignments that do not reflect true homology.
- Multiple sequence alignment of large, variable-length datasets is NP-hard in the strict sense; heuristic MSA tools may return locally but not globally optimal solutions.
- Repetitive genomic regions cause reads to map ambiguously, and multi-mapping reads must be handled carefully to avoid downstream artifacts.
Frequently asked
What is the difference between global and local alignment?
Global alignment (Needleman–Wunsch) aligns the full length of both sequences from end to end, inserting gaps wherever necessary. It is appropriate when both sequences are of similar length and expected to be homologous along their entire extent (e.g., comparing orthologous full-length proteins). Local alignment (Smith–Waterman) finds the highest-scoring contiguous matching subsequences without requiring end-to-end coverage. It is preferred when looking for a conserved domain within a larger, otherwise divergent sequence, or when query and target lengths differ substantially.
When should I use BLAST versus a short-read aligner like BWA?
BLAST is designed for database similarity search — you have one or a few sequences and want to find homologs in a large database. It returns scored hits ranked by E-value and handles sequences of arbitrary length. Short-read aligners (BWA, Bowtie2, HISAT2) are optimised for mapping millions of short reads (50–300 bp) generated by NGS platforms to a single reference genome with very high throughput. Use BLAST for annotation and homology searches; use a short-read aligner for read mapping in genomics, transcriptomics, or epigenomics experiments.
What is an E-value and what threshold should I use?
The E-value (expect value) in a BLAST search reports the number of alignments with an equal or better score that would be expected by chance in a database of the same size. An E-value of 0.001 means roughly one spurious hit per 1000 searches at this score level. Thresholds depend on context: 1e-5 is a common conservative cutoff for homology inference; 1e-3 may be used for remote homologs; values above 0.01 should be interpreted with caution. Always combine E-value with percent identity and alignment coverage — a low E-value with short alignment coverage may still be biologically uninformative.
Does sequence alignment work for long-read sequencing data?
Yes, but standard short-read aligners are not appropriate. Long reads from Oxford Nanopore or PacBio platforms are typically 1–50 kb and have higher per-base error rates than Illumina reads. Tools such as minimap2 and NGMLR are designed for long-read alignment; they use a different seed strategy (minimisers) and are tolerant of the elevated indel rates characteristic of long-read technologies.
How do I choose a substitution matrix for protein alignment?
The BLOSUM family is the standard choice for most protein alignment tasks. BLOSUM62 is the default in BLAST and performs well for sequences with roughly 30–60% identity. For more distantly related proteins (below 30% identity) use BLOSUM45 or BLOSUM30, which are calibrated on more divergent training sets and assign higher scores to rare but evolutionarily plausible substitutions. PAM matrices are an older alternative; PAM250 is roughly analogous to BLOSUM45 for distant comparisons.
Sources
- Needleman, S. B., & Wunsch, C. D. (1970). A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 48(3), 443–453. DOI: 10.1016/0022-2836(70)90057-4 ↗
- Smith, T. F., & Waterman, M. S. (1981). Identification of common molecular subsequences. Journal of Molecular Biology, 147(1), 195–197. DOI: 10.1016/0022-2836(81)90087-5 ↗
How to cite this page
ScholarGate. (2026, June 3). Biological Sequence Alignment. ScholarGate. https://scholargate.app/en/bioinformatics/sequence-alignment
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- ChIP-seq Peak CallingBioinformatics↔ compare
- Genome-wide association studyBioinformatics↔ compare
- Phylogenetic AnalysisBioinformatics↔ compare
- RNA-seq Differential ExpressionBioinformatics↔ compare
- Single-cell RNA-seq analysisBioinformatics↔ compare
- Variant CallingBioinformatics↔ compare