Docsity

Sequence Alignment - Intorduction to Bioinformatics - Lecture Slides, Slides of Bioinformatics

Partial preview of the text

Download Sequence Alignment - Intorduction to Bioinformatics - Lecture Slides and more Slides Bioinformatics in PDF only on Docsity!

Sequence Alignment

Sequence Alignment

  • Why:
    • To match a new sequence to others with known functions
    • To search for ESTs and other signs of gene expression
    • To understand population dynamics and evolutionary relationships between genes and species
    • To find important regions within proteins
  • Issues:
    • Alignment should mimic evolutionary descent: the actual history of mutation and selection that led to this gene - But it is too complicated to get perfectly correct - Protein alignments work over larger evolutionary distances than nucleotide
    • How to treat substitutions, insertions and deletions (gaps)
    • How to score possible alignments
      • Global vs. local alignment
    • Multiple alignment (as an extension of pairwise alignment
      • Hidden Markov Models and other ways of abstracting multiple alignment information
  • Homology: related by evolutionary descent. As opposed to similarity, which

is not necessarily based on descent from a common ancestor

  • But in practice, long aligned sequences seem to only arise by evolution
  • Short alignments can be due to chance or convergent evolution.

Scoring by Identity

  • One simple way to score an alignment is by counting the number of

perfect matches.

  • Get percentage of identities by dividing number of matches by total

positions (including gap positions). This is a measure of relatedness

between 2 proteins.

  • For previous example, 11 matches with 16 positions = 68.75% (69%)

identities

  • Length matters: it is harder to get a high percentage of identities in a

long sequence than in a short one.

  • Problem of random matches. For nucleotides, 25% of all positions

in random sequences match, and it’s 5% for proteins.

  • General rule, based on proteins with known structural similarity:
    • Two proteins are probably structurally similar (and thus probably homologous) if they have 30% or more identical amino acids over their whole length when aligned.
    • Less than 20% amino acid identity means probably not homologous
    • Between 20% and 30% is a gray zone
    • My personal happiness with matches increases when it’s above 35%
    • Except for very unusual proteins, 100% identity doesn’t occur between homologous proteins in different species

Dotplots

• Dotplots are a simple way

of seeing alignments

  • We really like to see good

visual demonstrations, not

just tables of numbers

• It’s a grid: put one

sequence along the top

and the other down the

side, and put a dot

wherever they match.

• You see the alignment as

a diagonal

A Real Dotplot

  • Two haptoglobin sequences. (Haptoglobin is a blood protein that binds to hemoglobin that has gotten out of the red blood cells).
  • You can see a gap in one sequence, a region of poor similarity just before it, and a simple sequence repeat near the beginning.

Similarity Matching

  • In proteins, many substitutions occur that have little effect on structure or

function

  • or, they alter the protein to make it more adapted for the lifestyles of the different species
  • This depends on where in the protein they occur and on the chemical and physical properties of the amino acids.
  • Substitution matrices: scores of the probability of changing one amino

acid into another.

  • Amino acids are similar if they can frequently be substituted for each other.
  • These are just overall numbers compiled over many sequences, not adapted to specific cases.
  • Early attempts were based on amino acid properties, or on the number of

nucleotide substitutions needed to change from one amino acid to the

other.

  • Now they are based on actual comparison between sequences.
    • The two most popular types: PAM and BLOSUM
    • There are other, more specialized substitution matrices, for comparing transmembrane regions, for example.

Similarity Matrix Theory

  • Think about aligning 2 proteins from similar species that are orthologs: same function

and syntenic. At some point back in evolutionary time, there was a single DNA

sequence that is the common ancestor of both proteins.

  • Most paired amino acids are identical, but a few are different.
  • Reduce the problem: consider a single aligned pair of amino acids, that are not

identical. T-S

  • We are comparing 2 theories of how these amino acids were derived from a common

ancestor. 1 Random mutation followed by natural selection. Some substitutions will happen more frequently than others because they lead to functional proteins more often.

  • The frequency with which T and S are substituted for each other by evolution is derived from counting them in well-aligned sequences. = freq(T-S) 2 Completely random changes: every possible substitution happens in proportion to the relative frequencies of the different amino acids, the two amino acids are unrelated to each other.
  • In this case, the frequency of a T and an S is just the product of the frequency of T’s and the frequency of S’s in the entire protein (or proteome). -= freq(T) • freq(S)
  • The odds ratio is the evolutionary theory (observed data) frequency divided by the

random theory frequency. OR = freq(T-S) / freq(T) • freq(S)

More Theory

  • We want to get the odds that a given alignment fits the evolutionary model

better than a random model.

  • Good alignments give high odds ratios
  • Need to multiply the OR’s for all amino acids in the alignment
  • It is easier (and doesn’t overflow the computer’s floating point calculator)

to take the logarithm of the odds ratio for each amino acid, and then add

the logarithms.

  • This is the lod score (log of odds).
  • A negative score means that the given substitution is less likely than

chance, and a positive score means it is more likely than chance.

  • You can score each possible alignment by adding up over the whole

protein

  • Some fooling with constants (which don’t distort the results but are either more pleasing to the

human eye or make further calculations easier: multiply lod score by 10, or add a constant to make al values 0 or greater

BLOSUM

  • =BLOck Substitution Matrix. Derived in the 1990’s by Henikoff and

Henikoff.

  • Based on local alignments of Blocks, which are short, highly homologous

regions, with no gaps

  • Sequences were grouped together if they were very similar, and then

comparisons were made between the groups as in the PAM matrices.

  • No attempt at phylogenetic trees
  • The different BLOSUM matrices have specific cutoffs for amino acid identities. For example, the BLOSUM62 matrix is based on sequence blocks with at least 62% identity.
  • The odds ratio for each substitution is calculated, but instead of taking the base 10 log and multiplying the result by 10 as in PAM, BLOSUM takes the base 2 log and multiplies by 2. This gives scores in “half-bits”.
  • Bigger numbers imply closer evolutionary distance, so BLOSUM80 is better

for closely related species than BLOSUM 45.

  • BLOSUM seems to work better than PAM
    • BLOSUM62 is the default used in BLAST searches.

BLOSUM62 and PAM120 Matrices

The colors represent different

physiochemical properties.

Note that some substitutions are

positive, which indicates that they

occur more frequently than chance.

The average value is negative: it is

more likely than an amino acid will

stay the same than change.

The diagonal values are unchanged

amino acids, all of which have positive

values. Some are less changeable

than others: tryptophan and cysteine

especially.

Comparing 2 distantly related sequences with different gap penalties:

  • Top sequence has fewer gaps and longer matches.
  • Bottom sequence has more identities and similarities overall, but lots of little gaps. The matches near

the C-terminal are absurd.

  • Look at the short segment after the first gap in the lower sequence: gained 3 identities

How Do We Make Alignments?

  • We have been working on scoring an alignment: identities and similarities, and gap

penalties.

  • But, how do you get an alignment to score in the first place?
    • Trying all possibilities is one of those “more possibilities than there are atoms in the Universe” problems.
  • The general solution: “dynamic programming”, a technique first applied to DNA

sequences by Needleman and Wunsch (1970)

  • Their original method gave global alignments.
  • Smith and Waterman (1981) provided a slight (but critical) modification that produced local alignments, which work better than global for most genes.
  • These methods provide an optimal alignment, for a given substitution matrix and set

of gap penalties.

  • They are much faster than trying all possibilities, but still not quick enough. Various

refinements and heuristic methods improve the speed.

BLOSUM

With positive

scores marked

Calculating Cell Scores

  • Using BLOSUM62 for

substitutions, and a -6 linear gap penalty.

  • The cell at row i and column j

has a score S(i, j)

  • Starting at top left cell, proceed

row-by-row, calculating each cell’s score S(i, j). S(i, j) is the maximum of:

  • 0 (i.e. set to 0 if the calculated

score is less than 0)

  • S(i-1, j-1) + match/mismatch

score for cell (i, j)

  • S(i, j-1) + match/mismatch

score for cell (i, j) + gap

penalty

  • S(i-1, j) + match/mismatch

score for cell (i, j) + gap

penalty

T A

T 9 8

P 2?

For the cell in question, the amino acids don’t match. On the BLOSUM62 matrix, this is a -1. There are 3 possible alignment paths to this cell:

  1. diagonal (query/subject alignment). Score = 9 – 1 = 8.
  2. vertical (query gap). Score = 8 – 6 – 1 = 1
  3. horizontal (subject gap). Score = 2 – 6 – 1 = -5 (set to 0)

Since 8 is the maximum, the cell’s value is set to 8.