Biological Sequence Analysis
Biological Sequence Analysis: Core Concepts and Methods
Introduction to Sequence Analysis
Sequence analysis is fundamental to genomics and bioinformatics. The ability to compare nucleotide and protein sequences enables researchers to infer biological relationships, predict function, and understand evolutionary history. Sequence alignments form the foundation of these comparative methods.
Alignments allow measurements of relatedness between sequences, leading to insights about structural, functional, and evolutionary relationships. There are two primary types: pairwise alignments (comparing two sequences) and multiple sequence alignments (comparing collections of related sequences).
Similarity vs. Homology
Two critical terms that carry distinct meanings in sequence analysis.
Similarity
A quantitative, observable measure based on direct comparison of aligned residues. It is usually expressed as percent identity — the proportion of matching residues in an alignment. Similarity quantifies changes such as substitutions, insertions, and deletions (indels) between diverging sequences. High similarity can imply common evolutionary history or shared biological function.
Homology
An evolutionary relationship — two genes or proteins that share a common ancestor. Homology is an all-or-nothing conclusion, not a matter of degree. As Walter Fitch stated: "Homology, like pregnancy, is indivisible." A researcher should never say "80 percent homology"; instead, they say "80 percent identity" and then conclude homology based on sufficient similarity.
Orthologs and Paralogs
Homologous genes are categorized by how they arise:
Orthologs: Genes that diverged due to a speciation event. They are the same gene in different species, direct descendants of an ancestral sequence. Orthologs typically retain similar domain structure, three-dimensional conformation, and biological function over time. They are used to predict gene function in newly sequenced genomes.
Paralogs: Genes that arose from gene duplication within a lineage. Paralo**gous genes in the same species may acquire new functions over evolutionary time (neofunctionalization). They provide raw material for evolutionary innovation.
In a phylogenetic context: if a common ancestor had gene A, which duplicated into A and B, then subsequent speciation produces orthologs of A (across species) and orthologs of B. Any pair of genes from the A lineage and B lineage are paralogs.
Identifying Orthologs: Reciprocal Best BLAST Hits
The most common method to identify orthologs uses reciprocal sequence similarity searches:
Take a query sequence from organism 1 and search against the genome of organism 2.
Identify the best hit.
Take that best hit as a new query and search against organism 1.
If the first query returns as the best hit in the reverse search, the two genes are likely orthologs.
This method has a low false-positive rate but can fail when recent gene duplications create paralogs that break reciprocity, requiring further phylogenetic analysis.
Types of Sequence Alignments
Global Alignment
Aligns two sequences across their entire length, attempting to match as many residues as possible. Works well for highly similar sequences of similar length. Becomes problematic when sequences are divergent or of different lengths, as it may force alignment and miss important local domains.
Local Alignment
Finds regions of high similarity between two sequences (paired subsequences). Regions outside the alignment are excluded, and the same two sequences can yield multiple local alignments. This method focuses on evolutionarily important domains and is the preferred approach for sequences sharing partial similarity or differing in length.
Scoring Matrices
Scoring matrices provide a metric to evaluate how good an alignment is, incorporating biological and physicochemical properties of residues. They consider conservation (which residues can substitute without harming function) and frequency of occurrence across all proteins.
Nucleotide Scoring Matrices
Simple match/mismatch schemes. A typical matrix assigns +2 for a match and -3 for a mismatch, assuming each nucleotide occurs about 25% of the time. This works reasonably because nucleotides are chemically similar.
Protein Scoring Matrices (BLOSUM)
BLOSUM (BLOcks SUbstitution Matrix) matrices are derived from observed substitutions in alignments of conserved, ungapped regions of protein families. They are based on local alignments of known protein families.
BLOSUM62 (the default for BLAST at NCBI) illustrates key properties:
Exact matches earn the highest score; rarer residues (e.g., tryptophan) score higher than common residues.
Conservative substitutions earn positive scores lower than exact matches.
Non-conservative substitutions earn negative scores.
The number in a BLOSUM matrix (e.g., 62) indicates the percent identity threshold used to cluster sequences during construction. To reduce bias from oversampled sequences, sequences sharing more than n% identity are clustered together before computing substitution frequencies.
Guidelines for choosing BLOSUM matrices:
High n (e.g., BLOSUM80): best for short, highly similar alignments (closely related sequences).
Default (BLOSUM62): most effective for finding a wide range of similarities.
Low n (e.g., BLOSUM30): best for detecting distantly related sequences with long, weak local alignments.
Triple BLAST strategy (recommended by Steve Altschul): run the same query three times with BLOSUM80, BLOSUM62, and BLOSUM30 to capture relationships across evolutionary distances.
The older PAM matrices (Percent Accepted Mutation) were derived from few data and extrapolations. BLOSUM matrices are preferred for most analyses.
Gap Penalties
Inserting gaps in an alignment implies a biological event (insertion or deletion). Gaps must be penalized to maintain biological plausibility. The affine gap penalty formula is:
G (gap-opening penalty): large penalty for starting a gap. Typical values: -5 for nucleotides, -11 for proteins.
L (gap-extension penalty): smaller penalty for each additional gap position. Typical values: -2 for nucleotides, -1 for proteins.
A rule of thumb is one gap per 20 residues, but this varies by context.
BLAST: Basic Local Alignment Search Tool
BLAST is the cornerstone of sequence analysis for identifying homologous sequences. It searches for high-scoring segment pairs (HSPs) — pairs of sequences that can be aligned locally with a score above a defined threshold. BLAST uses local alignment, returning all plausible alignments between query and database sequences.
BLAST Family of Programs
BLASTN: Nucleotide query vs. nucleotide database.
BLASTP: Protein query vs. protein database.
BLASTX: Nucleotide query (6-frame translation) vs. protein database.
TBLASTN: Protein query vs. translated nucleotide database.
TBLASTX: Translated nucleotide query vs. translated nucleotide database.
How BLAST Works
Query words: The query sequence is broken into short overlapping words (default 3 for protein, 11 for nucleotides).
Neighborhood generation: For each word, the algorithm generates a set of similar words (neighbors) based on the scoring matrix, keeping those above a neighborhood score threshold (T). This captures exact matches and conservative substitutions.
Seeding: BLAST searches the database for exact matches to any word (including neighbors). These matches are called seeds.
Extension: Each seed is extended in both directions as long as the cumulative score increases. Extension stops when the score drops a certain amount, and the maximum scoring segment is reported.
Score and E-value: The raw score is normalized using the Karlin-Altschul equation to produce an E-value (expectation value) representing the number of HSPs expected by chance.
The E-Value (Expectation Value)
The E-value is derived from the equation:
where K and λ are statistical parameters, m and n are sequence lengths, and S′ is the normalized score. Lower E-values indicate higher significance.
Rules of thumb for statistical significance:
Nucleotide searches (BLASTN): E-value ≤10−6
Protein searches (BLASTP, BLASTX): E-value ≤10−3
These are starting guidelines; biology should always be considered.
Interpreting BLAST Results
The NCBI BLAST interface provides:
Distribution graph: Color-coded bars showing alignment scores (not E-values). Gaps appear as hash marks.
Hit list: Each hit shows description, score, E-value, and percent identity.
Alignment details: Shows query-subject alignment with residue positions, identities (exact matches), positives (identities + conservative substitutions), and gap counts.
Percent identity guidelines (in addition to E-value):
Protein: ≥25% identity
Nucleotide: ≥70% identity
Important: Biology trumps computed cutoffs. If a hit falls slightly below thresholds but makes biological sense, it may still be meaningful.
BLAST Two Sequences (bl2seq)
For pairwise alignment of two known sequences, the BLAST 2 Sequences tool (bl2seq) is used. It works similarly to database BLAST but produces only one result. The results show one or more HSPs between the two sequences.
Nucleotide BLAST Variants
Program | Best For | Word size | Gap penalty |
|---|---|---|---|
MegaBLAST | Long, highly similar sequences (e.g., aligning mRNA to genome) | 28 | Linear (no gap-open penalty) |
Discontiguous MegaBLAST | Cross-species comparisons, finding conserved regions | Variable | Affine (gap-open + extension) |
blastn | Short, nearly exact matches | 11 | Affine (default) |
MegaBLAST is much faster for near-identical matches but may miss diverged sequences. Discontiguous MegaBLAST is a compromise. blastn remains useful for short queries.
RefSeq Database
The RefSeq (Reference Sequence) database provides a single, non-redundant, curated sequence for each major biological molecule (DNA, mRNA, protein) for a given gene. It eliminates the confusion of multiple GenBank entries for the same gene.
Accession number prefixes distinguish RefSeq types:
NT: Genomic contig (assembled DNA)
NM: mRNA (experimentally determined)
NP: Protein (experimentally determined)
NR: Non-coding transcript
XM / XP: Model mRNA / protein (predicted from genome annotation)
Whenever possible, use the NM/NP entries (N prefixes) as they are experimentally validated; XM/XP are computational predictions and may not be accurate.
BLAT: BLAST-Like Alignment Tool
BLAT (from UCSC) is optimized for aligning long nucleotide sequences (≥40 bp) with ≥95% identity. It is about 500 times faster than BLAST for DNA/DNA or mRNA/DNA alignments. However, it may miss divergent or short matches. BLAT is ideal for:
Determining the genomic location of a sequence (chromosomal coordinates)
Identifying exon-intron structure
Finding highly similar/identical sequences across species
Displaying a sequence as a custom track in the UCSC Genome Browser
BLAT outputs include score, strand, start/end positions, chromosome, and alignment length. The "I'm feeling lucky" button returns only the top hit.
Summary of Key Guidelines
Comparison Type | E-value threshold | Percent identity threshold |
|---|---|---|
Nucleotide (BLASTN) | ≤10−6 | ≥70% |
Protein (BLASTP, BLASTX) | ≤10−3 | ≥25% |
Always consider biological context; cutoffs are starting points.
Use the triple BLAST strategy (BLOSUM80, 62, 30) when exploring novel sequences.
Filter low-complexity regions to avoid false positives.
For nucleotide searches, choose MegaBLAST for speed and blastn for sensitivity to short exact matches.
Use BLAT for mapping long, highly similar sequences to genomes.
RefSeq entries with N prefixes are experimentally validated; X prefixes are predictions.

Ask anything
We've read this whole study set, so questions about it get the best answers.