1. Home
  2. Explore
  3. Biology
  4. Introduction to Bioinformatics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Bioinformatics

Bioinformatics: Sequence Alignment and Analysis

Introduction

Bioinformatics and genomics are inextricably linked. Computational approaches are essential for analyzing data generated from whole-genome sequencing, genome-wide association studies, clinical sequencing, and pharmacogenomic studies. A foundational understanding of bioinformatics tools is critical because they appear repeatedly in genomic research. The ability to properly use these techniques moves them from a "black box" to a practical, interpretable toolkit.

Key Concepts: Similarity and Homology

Similarity

Similarity is a quantitative, observable measure of relatedness between sequences. When two sequences (A and B) are aligned, similarity is determined by counting matches and mismatches. It is usually expressed as percent identity. Similarity quantifies changes as sequences diverge, including substitutions, insertions, and deletions. High similarity suggests a common evolutionary history or shared biological function. At the protein level, it can identify residues crucial for structure and function; at the nucleotide level, it can highlight regions important for expression.

Homology

Homology is the conclusion inferred from similarity—it implies an evolutionary relationship. Sequences that share a common ancestor are termed homologs. Unlike similarity, homology is not measured in degrees: either sequences are homologous or they are not. As bioinformatics pioneer Walter Fischer stated: "Homology, like pregnancy, is indivisible; you're either homologous/pregnant, or you are not."

Types of Homologs

Orthologs

Orthologs are genes that diverged as a result of a speciation event. They are direct descendants of a sequence in a common ancestor. Orthologs typically retain similar domain structure, three-dimensional structure, and the same or very similar biological functions over evolutionary time. This allows prediction of gene function in newly sequenced genomes. Simply put, orthologs are the same gene in different species.

Paralogs

Paralogs are genes that arose by duplication of a single gene within a lineage. They may take on new functions over evolutionary time, providing evolutionary innovation by co-opting existing gene products for new biological roles. Paralogs are similar genes within the same species.

Identifying Orthologs: Reciprocal Best Hits

The most common computational method for identifying candidate orthologs is reciprocal best hits:

  1. Start with a gene from Organism 1. Perform a sequence similarity search against all genes in Organism 2. The top hit (most similar) is identified.

  2. Take that top hit and perform a similarity search back against all genes in Organism 1. If the best hit in this reverse direction is the original gene, the two are candidate orthologs.

    The term "candidate" is crucial—computational predictions require experimental verification.

Types of Sequence Alignments

Global Sequence Alignments

Global alignments align two sequences across their entire length. They work well for sequences of similar length that are relatively similar. However, as sequences become more divergent, global methods may miss important biological relationships because forcing alignment over the full length can obscure conserved structural or functional domains.

Local Sequence Alignments

Local alignments find the most similar regions (paired subsequences) within two sequences. Regions outside the local alignment are excluded. This approach can yield multiple local alignments for a pair of sequences. It works well for sequences that share partial similarity, are of different lengths, or are distantly related. Local alignment is the best approach from a biological standpoint, especially for deducing evolutionary relationships.

Scoring Matrices

Scoring matrices are empirical weighting schemes that assign numerical values to matches, mismatches, and substitutions in sequence alignments. They incorporate physical, chemical, and biological characteristics of nucleotides or amino acids, including:

  • Side chain structure and chemistry

  • Functional roles (e.g., cysteine and proline help maintain protein structure; tryptophan has a bulky side chain; lysine and arginine are positively charged and important for DNA binding)

  • Conservation: which residues can substitute without affecting function (e.g., isoleucine/valine, serine/threonine)

  • Frequency: how often each amino acid appears across all proteins—rare amino acids contribute more to scores on exact matches

Scoring matrices appear in every sequence comparison and implicitly represent evolutionary patterns. The choice of matrix strongly influences results, so the default is not always optimal.

Nucleotide Scoring Matrices

With only four nucleotides (A, T, G, C), a simple match/mismatch scheme is used. For example, a match scores +2, a mismatch scores –3. The diagonal (exact matches) has uniform values, assuming equal nucleotide frequencies (25% each).

Amino Acid Scoring Matrices: BLOSUM

The BLOSUM (BLOcks SUbstitution Matrix) family was developed by the Henikoffs using conserved, ungapped regions (blocks) of protein families. BLOSUM matrices are based on observed substitution probabilities, conservation, and amino acid frequencies. They are sensitive to detecting structural and functional substitutions and perform better than the older PAM matrices, which were derived from limited sequence data and extrapolated from closely related proteins.

BLOSUM Matrix Numbers

The number following "BLOSUM" (e.g., BLOSUM62) represents the percent identity threshold used during construction:

  • Sequences sharing ≥ N% identity are clustered to reduce bias toward closely related sequences.

  • Lower N → More distantly related sequences are included

  • Higher N → More closely related sequences are emphasized

BLOSUM62 (Default)

BLOSUM62 is the default for BLAST at NCBI. It is effective for finding similarities down to 30–40% identity. In BLOSUM62, an exact match of tryptophan (rare) scores +11, while a match of common amino acids scores lower.

Matrix Selection Strategy

  • BLOSUM90: Shorter alignments with 70–90% similarity (closely related)

  • BLOSUM62: Balances sensitivity, finds similarities down to ~30–40%

  • Lower numbers (e.g., BLOSUM45): Longer, weaker alignments for distantly related sequences

  • Three-Matrix Strategy: Instead of one search, run three with BLOSUM62 as a baseline, one more stringent, one less stringent. Overlapping results increase confidence. No single matrix works for all comparisons.

Affine Gap Penalties

Gaps are introduced to improve alignments but represent biological events (insertions/deletions). They must be limited to avoid biologically implausible scenarios (rule of thumb: ~1 gap per 20 residues).

Gap scoring uses an affine gap penalty:

  • Gap opening penalty (G): deducted when a gap is first introduced

  • Gap extension penalty (L × N): deducted for each additional position in the gap (L is penalty per residue, N is length)

Typical defaults:

  • Nucleotide: opening –5, extension –2

  • Protein: opening –11, extension –1

For a gap of length 2 in a protein alignment: total penalty = 11 + (1 × 2) = 13 points subtracted.

BLAST: Basic Local Alignment Search Tool

BLAST is the most important technique in bioinformatics. It searches for high-scoring segment pairs (HSPs)—local alignments between a query sequence and database sequences. The method attempts to make alignments as long as possible in a statistically robust way. Alignments that score above a threshold S are reported. Results can be gapped or ungapped.

Just because a result appears on screen does not imply biological significance.

BLAST Flavors

  • BLASTN: Nucleotide query vs. nucleotide database

  • BLASTP: Protein query vs. protein database

  • BLASTX: Nucleotide query translated in six frames → protein → compared to protein database (more sensitive than BLASTN)

  • TBLASTN and TBLASTX: Translated comparisons at the nucleotide level (rarely used)

How BLAST Works

  1. Query word selection: The query sequence is broken into overlapping words of length w (default 3 for proteins).

  2. Neighborhood generation: For each word, conservative substitutions are included using the scoring matrix. A neighborhood score threshold T is applied—only words scoring ≥ T are kept.

  3. Database scanning: The neighborhood words are matched against the database.

  4. Extension: Matches are extended in both directions, with the cumulative score tracked. Extension stops when the score drops significantly below the peak (significance decay). The peak represents the final alignment.

Statistical Significance: The Karlin-Altschul Equation

Scores alone are not comparable across alignments because scoring matrices incorporate frequency bias. Instead, BLAST calculates an E-value using:

E=Kmne−λSE = K m n e^{-\lambda S}E=Kmne−λS

Where:

  • SSS = normalized score

  • mmm, nnn = lengths of query and database

  • KKK, λ\lambdaλ = statistical parameters

The E-value represents the number of HSPs expected by chance. Lower values indicate higher similarity and greater significance.

E-value Cutoffs

  • Nucleotide searches (BLASTN): E≤10−6E \leq 10^{-6}E≤10−6

  • Protein searches (BLASTP, BLASTX): E≤10−3E \leq 10^{-3}E≤10−3

Percent Identity Cutoffs

  • Nucleotide: ≥ 70%

  • Protein: ≥ 25%

These are starting points; biological evidence always trumps computational predictions.

Practical BLAST Usage

  • Database choice: RefSeq provides a single, non-redundant, curated reference sequence per molecule. Accession numbers starting with N (e.g., NM, NP) are experimentally verified; X prefixes (XM, XP) are computationally predicted and require caution.

  • Organism filtering: Can restrict by taxonomy.

  • Algorithm parameters:

    • Increase max target sequences (e.g., to 250) to capture all significant hits.

    • Filter low complexity regions (e.g., homopolymeric runs) to avoid false positives—always enable.

    • Choose scoring matrix based on expected divergence.

    • Set E-value threshold, apply cutoffs after results.

  • Interpreting results:

    • Graphic overview: colors correspond to scores, not probabilities. Gaps indicate multiple HSPs.

    • Hit list: sorted by E-value (lower is better). Use E-value and percent identity in tandem.

    • Alignment view: shows match (+ for conservative substitution), mismatches, gaps. Also shows "positives" (identities + conservative substitutions).

    • Low complexity regions appear gray/lowercase.

BLAST Two Sequences (bl2seq)

Used to align two predetermined sequences (nucleotide or protein). Accessible from the "Specialized BLAST" section. Accepts one query and one subject. Results are similar to a standard BLAST alignment, with statistical measures. The dot-matrix view graphically shows which parts align.

Nucleotide BLAST Variants

  • MegaBLAST: Optimized for very long, highly similar sequences (≥95% identity) like aligning against whole genomes or chromosomes. Uses word size 28, match/mismatch scores +1/-2, linear gap penalty.

  • Discontiguous MegaBLAST: Recommended for most nucleotide searches; balances speed and sensitivity.

  • BLASTn: Standard nucleotide search; useful for shorter or exact matches.

BLAT: BLAST-Like Alignment Tool

Developed at UCSC, BLAT is designed for rapid alignment of long nucleotide sequences (≥40 bp, ≥95% similarity). It is 500 times faster than BLAST for most mRNA/DNA searches and reliably finds exact matches down to 33 bases. BLAT may miss divergent or shorter alignments. For protein sequences, BLASTP is preferred.

Uses for BLAT

  • Find genomic coordinates and gene structure (introns/exons) of a new sequence

  • Identify nearby markers of interest

  • Align mRNA sequences to genome assemblies

  • Find additional genome family members

  • Cross-species alignments to identify putative homologs

  • Display results as a track in the UCSC Genome Browser (provides context from other data tracks: mRNAs, ESTs, conservation)

Practical BLAT

  • Select genome and query type (DNA), submit.

  • Results table: score, start/end positions, percent identity.

  • Click "browser" to view alignment in genome browser context (mismatches in red, gaps, other tracks).

  • "Details" view shows aligned sequences with color-coded matches and boundaries.

FASTA

FASTA is another local alignment tool that uses the Smith-Waterman algorithm to find optimal local alignments. It is slower than BLAST but more stringent. FASTA can be used as a secondary method to verify results around the significance cutoff—similar to using two experimental techniques to confirm a result.

Summary of Guidelines

Search Type

E-value Cutoff

Percent Identity Cutoff

Nucleotide

10−610^{-6}10−6

≥ 70%

Protein (BLASTP, BLASTX)

10−310^{-3}10−3

≥ 25%

  • Always filter low complexity regions.

  • Use the three-matrix strategy for sensitive BLAST searches.

  • Prefer RefSeq (accessions starting with N) over computationally predicted sequences (X prefixes).

  • Biological knowledge should guide interpretation—cutoffs are starting points, not absolute rules.

These concepts provide the foundation for more advanced topics such as multiple sequence alignments and functional prediction, which build directly on the theory of pairwise sequence comparison.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent