pairwise sequence alignment. pairwise alignment: protein sequences can be more informative than dna...

67
Pairwise sequence alignment

Upload: angela-swales

Post on 15-Dec-2015

287 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Pairwise sequence alignment

Page 2: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Pairwise alignment: protein sequencescan be more informative than DNA

• protein is more informative (20 vs 4 characters); many amino acids share related biophysical properties

• codons are degenerate: changes in the third position often do not alter the amino acid that is specified

• protein sequences offer a longer “look-back” time

• DNA sequences can be translated into protein, and then used in pairwise alignments

Page 3: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Pairwise alignment: protein sequencescan be more informative than DNA

• Many times, DNA alignments are appropriate--to confirm the identity of a cDNA--to study noncoding regions of DNA--to study DNA polymorphisms--example: Neanderthal vs modern human DNA

Query: 181 catcaactacaactccaaagacacccttacacccactaggatatcaacaaacctacccac 240 |||||||| |||| |||||| ||||| | ||||||||||||||||||||||||||||||| Sbjct: 189 catcaactgcaaccccaaagccacccct-cacccactaggatatcaacaaacctacccac 247

Page 4: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

SimilarityThe extent to which nucleotide or protein sequences are related. It is based upon identity plus conservation.

IdentityThe extent to which two sequences are invariant.

Conservation Changes at a specific position of an amino acid or (less commonly, DNA) sequence that preserve the physico-chemical properties of the original residue.

Definitions

Page 5: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

1 MKWVWALLLLAAWAAAERDCRVSSFRVKENFDKARFSGTWYAMAKKDPEG 50 RBP . ||| | . |. . . | : .||||.:| : 1 ...MKCLLLALALTCGAQALIVT..QTMKGLDIQKVAGTWYSLAMAASD. 44 lactoglobulin

51 LFLQDNIVAEFSVDETGQMSATAKGRVR.LLNNWD..VCADMVGTFTDTE 97 RBP : | | | | :: | .| . || |: || |. 45 ISLLDAQSAPLRV.YVEELKPTPEGDLEILLQKWENGECAQKKIIAEKTK 93 lactoglobulin

98 DPAKFKMKYWGVASFLQKGNDDHWIVDTDYDTYAV...........QYSC 136 RBP || ||. | :.|||| | . .| 94 IPAVFKIDALNENKVL........VLDTDYKKYLLFCMENSAEPEQSLAC 135 lactoglobulin

137 RLLNLDGTCADSYSFVFSRDPNGLPPEAQKIVRQRQ.EELCLARQYRLIV 185 RBP . | | | : || . | || | 136 QCLVRTPEVDDEALEKFDKALKALPMHIRLSFNPTQLEEQCHI....... 178 lactoglobulin

Pairwise alignment of retinol-binding protein and -lactoglobulin

Page 6: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

• Positions at which a letter is paired with a null are called gaps.

• Gap scores are typically negative.

• Since a single mutational event may cause the insertion or deletion of more than one residue, the presence of a gap is ascribed more significance than the length of the gap. Thus there are separate penalties for gap creation and gap extension.

• In BLAST, it is rarely necessary to change gap values from the default.

Gaps

Page 7: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Outline: pairwise alignment

• Overview and examples• Definitions: homologs, paralogs, orthologs• Assigning scores to aligned amino acids: Dayhoff’s PAM matrices• Alignment algorithms: Needleman-Wunsch, Smith-Waterman• Statistical significance of pairwise alignments

Page 8: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

General approach to pairwise alignment

• Choose two sequences• Select an algorithm that generates a score• Allow gaps (insertions, deletions)• Score reflects degree of similarity• Alignments can be global or local• Estimate probability that the alignment occurred by chance

Page 9: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Calculation of an alignment score

Source: http://www.ncbi.nlm.nih.gov/Education/BLASTinfo/Alignment_Scores2.html

Page 10: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

A 2 R -2 6 N 0 0 2 D 0 -1 2 4 C -2 -4 -4 -5 12 Q 0 1 1 2 -5 4 E 0 -1 1 3 -5 2 4 G 1 -3 0 1 -3 -1 0 5 H -1 2 2 1 -3 3 1 -2 6 I -1 -2 -2 -2 -2 -2 -2 -3 -2 5 L -2 -3 -3 -4 -6 -2 -3 -4 -2 -2 6 K -1 3 1 0 -5 1 0 -2 0 -2 -3 5 M -1 0 -2 -3 -5 -1 -2 -3 -2 2 4 0 6 F -3 -4 -3 -6 -4 -5 -5 -5 -2 1 2 -5 0 9 P 1 0 0 -1 -3 0 -1 0 0 -2 -3 -1 -2 -5 6 S 1 0 1 0 0 -1 0 1 -1 -1 -3 0 -2 -3 1 2 T 1 -1 0 0 -2 -1 0 0 -1 0 -2 0 -1 -3 0 1 3 W -6 2 -4 -7 -8 -5 -7 -7 -3 -5 -2 -3 -4 0 -6 -2 -5 17 Y -3 -4 -2 -4 0 -4 -4 -5 0 -1 -1 -4 -2 7 -5 -3 -3 0 10 V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 A R N D C Q E G H I L K M F P S T W Y V

PAM250 log oddsscoring matrix

Page 58

Page 11: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

PAM10 log oddsscoring matrix

Page 59

A 7

R -10 9

N -7 -9 9

D -6 -17 -1 8

C -10 -11 -17 -21 10

Q -7 -4 -7 -6 -20 9

E -5 -15 -5 0 -20 -1 8

G -4 -13 -6 -6 -13 -10 -7 7

H -11 -4 -2 -7 -10 -2 -9 -13 10

I -8 -8 -8 -11 -9 -11 -8 -17 -13 9

L -9 -12 -10 -19 -21 -8 -13 -14 -9 -4 7

K -10 -2 -4 -8 -20 -6 -7 -10 -10 -9 -11 7

M -8 -7 -15 -17 -20 -7 -10 -12 -17 -3 -2 -4 12

F -12 -12 -12 -21 -19 -19 -20 -12 -9 -5 -5 -20 -7 9

P -4 -7 -9 -12 -11 -6 -9 -10 -7 -12 -10 -10 -11 -13 8

S -3 -6 -2 -7 -6 -8 -7 -4 -9 -10 -12 -7 -8 -9 -4 7

T -3 -10 -5 -8 -11 -9 -9 -10 -11 -5 -10 -6 -7 -12 -7 -2 8

W -20 -5 -11 -21 -22 -19 -23 -21 -10 -20 -9 -18 -19 -7 -20 -8 -19 13

Y -11 -14 -7 -17 -7 -18 -11 -20 -6 -9 -10 -12 -17 -1 -20 -10 -9 -8 10

V -5 -11 -12 -11 -9 -10 -10 -9 -9 -1 -5 -13 -4 -12 -9 -10 -6 -22 -10 8

A R N D C Q E G H I L K M F P S T W Y V

Page 12: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Page 54

Page 13: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

AAla

RArg

NAsn

DAsp

CCys

QGln

EGlu

GGly

AR 30

N 109 17

D 154 0 532

C 33 10 0 0

Q 93 120 50 76 0

E 266 0 94 831 0 422

G 579 10 156 162 10 30 112

H 21 103 226 43 10 243 23 10

Dayhoff’s numbers of “accepted point mutations”:what amino acid substitutions occur in proteins?

Page 52

Page 14: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Dayhoff’s mutation probability matrixfor the evolutionary distance of 1 PAM

We have considered three kinds of information:• a table of number of accepted point mutations (PAMs)• relative mutabilities of the amino acids• normalized frequencies of the amino acids in PAM data

This information can be combined into a “mutation probability matrix” in which each element Mij gives the probability that the amino acid in column j will be replaced by the amino acid in row i after a given evolutionary interval (e.g. 1 PAM).

Page 50

Page 15: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Dayhoff’s PAM1 mutation probability matrix

AAla

RArg

NAsn

DAsp

CCys

QGln

EGlu

GGly

HHis

IIle

A 9867 2 9 10 3 8 17 21 2 6

R 1 9913 1 0 1 10 0 0 10 3

N 4 1 9822 36 0 4 6 6 21 3

D 6 0 42 9859 0 6 53 6 4 1

C 1 1 0 0 9973 0 0 0 1 1

Q 3 9 4 5 0 9876 27 1 23 1

E 10 0 7 56 0 35 9865 4 2 3

G 21 1 12 11 1 3 7 9935 1 0

H 1 8 18 3 1 20 1 0 9912 0

I 2 2 3 1 2 1 2 0 0 9872

Original amino acid

Page 55

Page 16: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Dayhoff’s PAM1 mutation probability matrix

AAla

RArg

NAsn

DAsp

CCys

QGln

EGlu

GGly

HHis

IIle

A 9867 2 9 10 3 8 17 21 2 6

R 1 9913 1 0 1 10 0 0 10 3

N 4 1 9822 36 0 4 6 6 21 3

D 6 0 42 9859 0 6 53 6 4 1

C 1 1 0 0 9973 0 0 0 1 1

Q 3 9 4 5 0 9876 27 1 23 1

E 10 0 7 56 0 35 9865 4 2 3

G 21 1 12 11 1 3 7 9935 1 0

H 1 8 18 3 1 20 1 0 9912 0

I 2 2 3 1 2 1 2 0 0 9872

Each element of the matrix shows the probability that an originalamino acid (top) will be replaced by another amino acid (side)

Page 17: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

A substitution matrix contains values proportional to the probability that amino acid i mutates into amino acid j for all pairs of amino acids.

Substitution matrices are constructed by assembling a large and diverse sample of verified pairwise alignments(or multiple sequence alignments) of amino acids. Substitution matrices should reflect the true probabilities of mutations occurring through a period of evolution.

The two major types of substitution matrices arePAM and BLOSUM.

Substitution Matrix

Page 18: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

PAM matrices are based on global alignments of closely related proteins.

The PAM1 is the matrix calculated from comparisons of sequences with no more than 1% divergence. At an evolutionary interval of PAM1, one change has occurred over a length of 100 amino acids.

Other PAM matrices are extrapolated from PAM1. For PAM250, 250 changes have occurred for two proteins over a length of 100 amino acids.

All the PAM data come from closely related proteins(>85% amino acid identity).

PAM matrices:Point-accepted mutations

Page 19: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Why do we go from a mutation probabilitymatrix to a log odds matrix?

• We want a scoring matrix so that when we do a pairwise alignment (or a BLAST search) we know what score to assign to two aligned amino acid residues.

• Logarithms are easier to use for a scoring system. They allow us to sum the scores of aligned residues (rather than having to multiply them).

Page 57

Page 20: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

How do we go from a mutation probabilitymatrix to a log odds matrix?

• The cells in a log odds matrix consist of an “odds ratio”:

the probability that an alignment is authenticthe probability that the alignment was random

The score S for an alignment of residues a,b is given by:

S(a,b) = 10 log10 (Mab/pb)

As an example, for tryptophan,

S(a,tryptophan) = 10 log10 (0.55/0.010) = 17.4 Page 57

Page 21: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Normalized frequencies of amino acids

Arg 4.1%Asn 4.0%Phe 4.0%Gln 3.8%Ile 3.7%His 3.4%Cys 3.3%Tyr 3.0%Met 1.5%Trp 1.0%

A R N D C Q E G H I L K M F P S T W Y V A 13 6 9 9 5 8 9 12 6 8 6 7 7 4 11 11 11 2 4 9

R 3 17 4 3 2 5 3 2 6 3 2 9 4 1 4 4 3 7 2 2

N 4 4 6 7 2 5 6 4 6 3 2 5 3 2 4 5 4 2 3 3

D 5 4 8 11 1 7 10 5 6 3 2 5 3 1 4 5 5 1 2 3

C 2 1 1 1 52 1 1 2 2 2 1 1 1 1 2 3 2 1 4 2

Q 3 5 5 6 1 10 7 3 7 2 3 5 3 1 4 3 3 1 2 3

E 5 4 7 11 1 9 12 5 6 3 2 5 3 1 4 5 5 1 2 3

G 12 5 10 10 4 7 9 27 5 5 4 6 5 3 8 11 9 2 3 7

H 2 5 5 4 2 7 4 2 15 2 2 3 2 2 3 3 2 2 3 2

I 3 2 2 2 2 2 2 2 2 10 6 2 6 5 2 3 4 1 3 9

L 6 4 4 3 2 6 4 3 5 15 34 4 20 13 5 4 6 6 7 13

K 6 18 10 8 2 10 8 5 8 5 4 24 9 2 6 8 8 4 3 5

M 1 1 1 1 0 1 1 1 1 2 3 2 6 2 1 1 1 1 1 2

F 2 1 2 1 1 1 1 1 3 5 6 1 4 32 1 2 2 4 20 3

P 7 5 5 4 3 5 4 5 5 3 3 4 3 2 20 6 5 1 2 4

S 9 6 8 7 7 6 7 9 6 5 4 7 5 3 9 10 9 4 4 6

T 8 5 6 6 4 5 5 6 4 6 4 6 5 3 6 8 11 2 3 6

W 0 2 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 55 1 0

Y 1 1 2 1 3 1 1 1 3 2 2 1 2 15 1 2 2 3 31 2

V 7 4 4 4 4 4 4 5 4 15 10 4 10 5 5 5 7 2 4 17

Page 22: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

What do the numbers meanin a log odds matrix?

S(a,tryptophan) = 10 log10 (0.55/0.010) = 17.4

A score of +17 for tryptophan means that this alignmentis 50 times more likely than a chance alignment of twoTrp residues.

S(a,b) = 17Probability of replacement (Mab/pb) = xThen17 = 10 log10 x1.7 = log10 x101.7 = x = 50 Page 58

Page 23: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

What do the numbers meanin a log odds matrix?

A score of +2 indicates that the amino acid replacementoccurs 1.6 times as frequently as expected by chance.

A score of 0 is neutral.

A score of –10 indicates that the correspondence of two amino acids in an alignment that accurately representshomology (evolutionary descent) is one tenth as frequentas the chance alignment of these amino acids.

Page 58

Page 24: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

A 2 R -2 6 N 0 0 2 D 0 -1 2 4 C -2 -4 -4 -5 12 Q 0 1 1 2 -5 4 E 0 -1 1 3 -5 2 4 G 1 -3 0 1 -3 -1 0 5 H -1 2 2 1 -3 3 1 -2 6 I -1 -2 -2 -2 -2 -2 -2 -3 -2 5 L -2 -3 -3 -4 -6 -2 -3 -4 -2 -2 6 K -1 3 1 0 -5 1 0 -2 0 -2 -3 5 M -1 0 -2 -3 -5 -1 -2 -3 -2 2 4 0 6 F -3 -4 -3 -6 -4 -5 -5 -5 -2 1 2 -5 0 9 P 1 0 0 -1 -3 0 -1 0 0 -2 -3 -1 -2 -5 6 S 1 0 1 0 0 -1 0 1 -1 -1 -3 0 -2 -3 1 2 T 1 -1 0 0 -2 -1 0 0 -1 0 -2 0 -1 -3 0 1 3 W -6 2 -4 -7 -8 -5 -7 -7 -3 -5 -2 -3 -4 0 -6 -2 -5 17 Y -3 -4 -2 -4 0 -4 -4 -5 0 -1 -1 -4 -2 7 -5 -3 -3 0 10 V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 A R N D C Q E G H I L K M F P S T W Y V

PAM250 log oddsscoring matrix

Page 58

Page 25: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

PAM10 log oddsscoring matrix

Page 59

A 7

R -10 9

N -7 -9 9

D -6 -17 -1 8

C -10 -11 -17 -21 10

Q -7 -4 -7 -6 -20 9

E -5 -15 -5 0 -20 -1 8

G -4 -13 -6 -6 -13 -10 -7 7

H -11 -4 -2 -7 -10 -2 -9 -13 10

I -8 -8 -8 -11 -9 -11 -8 -17 -13 9

L -9 -12 -10 -19 -21 -8 -13 -14 -9 -4 7

K -10 -2 -4 -8 -20 -6 -7 -10 -10 -9 -11 7

M -8 -7 -15 -17 -20 -7 -10 -12 -17 -3 -2 -4 12

F -12 -12 -12 -21 -19 -19 -20 -12 -9 -5 -5 -20 -7 9

P -4 -7 -9 -12 -11 -6 -9 -10 -7 -12 -10 -10 -11 -13 8

S -3 -6 -2 -7 -6 -8 -7 -4 -9 -10 -12 -7 -8 -9 -4 7

T -3 -10 -5 -8 -11 -9 -9 -10 -11 -5 -10 -6 -7 -12 -7 -2 8

W -20 -5 -11 -21 -22 -19 -23 -21 -10 -20 -9 -18 -19 -7 -20 -8 -19 13

Y -11 -14 -7 -17 -7 -18 -11 -20 -6 -9 -10 -12 -17 -1 -20 -10 -9 -8 10

V -5 -11 -12 -11 -9 -10 -10 -9 -9 -1 -5 -13 -4 -12 -9 -10 -6 -22 -10 8

A R N D C Q E G H I L K M F P S T W Y V

Page 26: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Rat versus mouse RBP

Rat versus bacteriallipocalin

More conserved Less conserved

Page 27: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Comparing two proteins with a PAM1 matrixgives completely different results than PAM250!

Consider two distantly related proteins. A PAM40 matrixis not forgiving of mismatches, and penalizes themseverely. Using this matrix you can find almost no match.

A PAM250 matrix is very tolerant of mismatches.

hsrbp, 136 CRLLNLDGTC btlact, 3 CLLLALALTC * ** * **

24.7% identity in 81 residues overlap; Score: 77.0; Gap frequency: 3.7% rbp4 26 RVKENFDKARFSGTWYAMAKKDPEGLFLQDNIVAEFSVDETGQMSATAKGRVRLLNNWDV btlact 21 QTMKGLDIQKVAGTWYSLAMAASD-ISLLDAQSAPLRVYVEELKPTPEGDLEILLQKWEN * **** * * * * ** *

rbp4 86 --CADMVGTFTDTEDPAKFKM btlact 80 GECAQKKIIAEKTKIPAVFKI ** * ** ** Page 60

Page 28: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

two nearly identical proteins

two distantly related proteins

Page 29: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

BLOSUM matrices are based on local alignments.

BLOSUM stands for blocks substitution matrix.

BLOSUM62 is a matrix calculated from comparisons of sequences with no less than 62% divergence.

BLOSUM Matrices

Page 60

Page 30: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

BLOSUM Matrices

100

62

30

Per

cent

am

ino

acid

iden

tity

BLOSUM62

colla

pse

Page 31: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

BLOSUM Matrices

100

62

30

Per

cent

am

ino

acid

iden

tity

BLOSUM62

100

62

30

BLOSUM30

100

62

30

BLOSUM80

colla

pse

colla

pse

colla

pse

Page 32: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

All BLOSUM matrices are based on observed alignments; they are not extrapolated from comparisons of closely related proteins.

The BLOCKS database contains thousands of groups ofmultiple sequence alignments.

BLOSUM62 is the default matrix in BLAST 2.0. Though it is tailored for comparisons of moderately distant proteins, it performs well in detecting closer relationships. A search for distant relatives may be more sensitive with a different matrix.

BLOSUM Matrices

Page 60

Page 33: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

A 4R -1 5N -2 0 6D -2 -2 1 6C 0 -3 -3 -3 9Q -1 1 0 0 -3 5E -1 0 0 2 -4 2 5G 0 -2 0 -1 -3 -2 -2 6H -2 0 1 -1 -3 0 0 -2 8I -1 -3 -3 -3 -1 -3 -3 -4 -3 4L -1 -2 -3 -4 -1 -2 -3 -4 -3 2 4K -1 2 0 -1 -1 1 1 -2 -1 -3 -2 5M -1 -2 -2 -3 -1 0 -2 -3 -2 1 2 -1 5F -2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 11Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4

A R N D C Q E G H I L K M F P S T W Y V

Blosum62 scoring matrix

Page 61

Page 34: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Blosum62 scoring matrix

Page 61

A 4 R -1 5 N -2 0 6 D -2 -2 1 6 C 0 -3 -3 -3 9 Q -1 1 0 0 -3 5 E -1 0 0 2 -4 2 5 G 0 -2 0 -1 -3 -2 -2 6 H -2 0 1 -1 -3 0 0 -2 8 I -1 -3 -3 -3 -1 -3 -3 -4 -3 4 L -1 -2 -3 -4 -1 -2 -3 -4 -3 2 4 K -1 2 0 -1 -1 1 1 -2 -1 -3 -2 5 M -1 -2 -2 -3 -1 0 -2 -3 -2 1 2 -1 5 F -2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6 P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7 S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 11 Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 A R N D C Q E G H I L K M F P S T W Y V

Page 35: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Rat versus mouse globin

Rat versus bacterialglobin

Page 61

Page 36: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Pe

rce

nt

ide

nti

ty

Evolutionary distance in PAMs

Two randomly diverging protein sequences changein a negatively exponential fashion

“twilight zone”

Page 62

Page 37: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Pe

rce

nt

ide

nti

ty

Differences per 100 residues

At PAM1, two proteins are 99% identicalAt PAM10.7, there are 10 differences per 100 residuesAt PAM80, there are 50 differences per 100 residues

At PAM250, there are 80 differences per 100 residues

“twilight zone”

Page 62

Page 38: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

PAM: “Accepted point mutation”

• Two proteins with 50% identity may have 80 changesper 100 residues. (Why? Because any residue can besubject to back mutations.)

• Proteins with 20% to 25% identity are in the “twilight zone”and may be statistically significantly related.

• PAM or “accepted point mutation” refers to the “hits” or matches between two sequences (Dayhoff & Eck, 1968)

Page 62

Page 39: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Ancestral sequence

Sequence 1ACCGATC

Sequence 2AATAATC

A no change AC single substitution C --> AC multiple substitutions C --> A --> TC --> G coincidental substitutions C --> AT --> A parallel substitutions T --> AA --> C --> T convergent substitutions A --> TC back substitution C --> T --> C

ACCCTAC

Li (1997) p.70

Page 40: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Percent identity between two proteins:What percent is significant?

100%80%65%30%23%19%

We will see in the BLAST lecture that it is appropriate to describe significance in terms of probability (or expect) values.As a rule of thumb, two proteins sharing > 30% over a substantial region are usually homologous.

Page 41: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Outline: pairwise alignment

• Overview and examples• Definitions: homologs, paralogs, orthologs• Assigning scores to aligned amino acids: Dayhoff’s PAM matrices• Alignment algorithms: Needleman-Wunsch, Smith-Waterman• Statistical significance of pairwise alignments

Page 42: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

An alignment scoring system is required to evaluate how good an alignment is

• positive and negative values assigned

• gap creation and extension penalties

• positive score for identities

• some partial positive score for conservative substitutions

• global versus local alignment

• use of a substitution matrix

Page 43: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Calculation of an alignment score

Page 44: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

We will first consider the global alignment algorithmof Needleman and Wunsch (1970).

We will then explore the local alignment algorithmof Smith and Waterman (1981).

Finally, we will consider BLAST, a heuristic versionof Smith-Waterman. We will cover BLAST in detailon Monday.

Two kinds of sequence alignment: global and local

Page 63

Page 45: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

• Two sequences can be compared in a matrix along x- and y-axes.

• If they are identical, a path along a diagonal can be drawn

• Find the optimal subpaths, and add them up to achieve the best score. This involves

--adding gaps when needed--allowing for conservative substitutions--choosing a scoring system (simple or complicated)

• N-W is guaranteed to find optimal alignment(s)

Global alignment with the algorithmof Needleman and Wunsch (1970)

Page 63

Page 46: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

[1] set up a matrix

[2] score the matrix

[3] identify the optimal alignment(s)

Three steps to global alignment with the Needleman-Wunsch algorithm

Page 63

Page 47: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

[1] identity (stay along a diagonal)[2] mismatch (stay along a diagonal)[3] gap in one sequence (move vertically!)[4] gap in the other sequence (move horizontally!)

Four possible outcomes in aligning two sequences

1

2

Page 64

Page 48: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Page 64

Page 49: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Fill in the matrix starting from the bottom right

Page 65

Page 50: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Page 66

Page 51: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

sequence 1 ABCNJ-RQCLCR-PMsequence 2 AJC-JNR-CKCRBP-

sequence 1 ABC-NJRQCLCR-PMsequence 2 AJCJN-R-CKCRBP-

Page 66

Page 52: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

N-W is guaranteed to find optimal alignments, although the algorithm does not search all possible alignments.

It is an example of a dynamic programming algorithm:an optimal path (alignment) is identified byincrementally extending optimal subpaths.Thus, a series of decisions is made at each step of thealignment to find the pair of residues with the best score.

Needleman-Wunsch: dynamic programming

Page 67

Page 53: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Try using needle to implement a Needleman-Wunsch global alignment algorithm to find the optimum alignment (including gaps):

http://www.ebi.ac.uk/emboss/align/

Page 54: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Queries:beta globin (NP_000509)alpha globin (NP_000549)

Page 55: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);
Page 56: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Global alignment (Needleman-Wunsch) extendsfrom one end of each sequence to the other.

Local alignment finds optimally matching regions within two sequences (“subsequences”).

Local alignment is almost always used for databasesearches such as BLAST. It is useful to find domains(or limited regions of homology) within sequences.

Smith and Waterman (1981) solved the problem of performing optimal local sequence alignment. Othermethods (BLAST, FASTA) are faster but less thorough.

Global alignment versus local alignment

Page 69

Page 57: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Rapid, heuristic versions of Smith-Waterman:FASTA and BLAST

Smith-Waterman is very rigorous and it is guaranteedto find an optimal alignment.

But Smith-Waterman is slow. It requires computerspace and time proportional to the product of the twosequences being aligned (or the product of a query against an entire database).

Gotoh (1982) and Myers and Miller (1988) improved thealgorithms so both global and local alignment requireless time and space.

FASTA and BLAST provide rapid alternatives to S-W.

Page 71

Page 58: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

How FASTA works

[1] A “lookup table” is created. It consists of short stretches of amino acids (e.g. k=3 for a protein search). The length of a stretch is called a k-tuple. The FASTA algorithm finds the ten highest scoring segments that align to the query.

[2] These ten aligned regions are re-scored with a PAM or BLOSUM matrix.

[3] High-scoring segments are joined.

[4] Needleman-Wunsch or Smith-Waterman is then performed.

Page 72

Page 59: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Outline: pairwise alignment

• Overview and examples• Definitions: homologs, paralogs, orthologs• Assigning scores to aligned amino acids: Dayhoff’s PAM matrices• Alignment algorithms: Needleman-Wunsch, Smith-Waterman• Statistical significance of pairwise alignments

Page 60: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

Statistical significance of pairwise alignment

We will discuss the statistical significance of alignment scores in the next lecture (BLAST). A basic question is how to determine whether a particular alignment score is likely to have occurred by chance. According to the null hypothesis, two aligned sequences are not homologous (evolutionarily related). Can we reject the null hypothesis at a particular significance level alpha?

Page 61: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

True positives False positives

False negatives

Sequences reportedas related

Sequences reportedas unrelated

True negatives

Page 76

Page 62: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

True positives False positives

False negatives

Sequences reportedas related

Sequences reportedas unrelated

True negatives

homologoussequences

non-homologoussequences

Page 76

Page 63: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

True positives False positives

False negatives

Sequences reportedas related

Sequences reportedas unrelated

True negatives

homologoussequences

non-homologoussequences

Sensitivity:ability to findtrue positives

Specificity:ability to minimize

false positives

Page 64: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

RBP: 26 RVKENFDKARFSGTWYAMAKKDPEGLFLQDNIVAEFSVDETGQMSATAKGRVRLLNNWD- 84 + K++ + + +GTW++MA + L + A V T + +L+ W+ glycodelin: 23 QTKQDLELPKLAGTWHSMAMA-TNNISLMATLKAPLRVHITSLLPTPEDNLEIVLHRWEN 81

Randomization test: scramble a sequence

• First compare two proteins and obtain a score

• Next scramble the bottom sequence 100 times,and obtain 100 “randomized” scores (+/- standard deviation)

• Composition and length are maintained

• If the comparison is “real” we expect the authentic score to be several standard deviations above the mean of the “randomized” scores

Page 76

Page 65: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

0

2

4

6

8

10

12

14

16

1 10 19 28 37

100 random shufflesMean score = 8.4Std. dev. = 4.5

Quality score

Num

ber

of in

stan

ces

A randomization test shows that RBP is significantly related to -lactoglobulin

Real comparisonScore = 37

But this test assumes a normal distribution of scores!In the BLAST lecture we will consider the distributionof scores and more appropriate significance tests.

Page 77

Page 66: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

You can perform this randomization test using the UVA FASTA programs(http://fasta.bioch.virginia.edu/).

Z = (Sreal – Xrandomized score) standard deviation

Page 67: Pairwise sequence alignment. Pairwise alignment: protein sequences can be more informative than DNA protein is more informative (20 vs 4 characters);

The PRSS program performsa scramble test for you(http://fasta.bioch.virginia.edu/fasta/prss.htm)

Badscores

Good scores

But these scores are notnormally distributed!