Anda di halaman 1dari 87

Bioinformatics

A collection of sequences does not, by itself, increase the scientist's understanding of the biology of organisms. However, comparing sequences with known functions with these new sequences is one way of understanding the biology of that organism from which the new sequence comes. Thus, sequence analysis can be used to assign function to genes and proteins by the study of the similarities between the compared sequences. Nowadays there are many tools and techniques that provide the sequence comparisons (sequence alignment) and analyze the alignment product to understand the biology. Sequence analysis in molecular biology and bioinformatics is an automated, computerbased examination of characteristic fragments, e.g. of a DNA strand. It basically includes relevant topics: 1. The comparison of sequences in order to nd similarity and dissimilarity in compared sequences (sequence alignment) 2. Identication of gene-structures, reading frames, distributions of introns and exons and regulatory elements 3. Finding and comparing point mutations or the single nucleotide polymorphism (SNP) in organism in order to get the genetic marker. 4. Revealing the evolution and genetic diversity of organisms. 5. Function annotation of genes.
Bioinformtica e Estrutura Molecular

73

Bioinformatics - BLAST
What we really want to be able to do is go from DNA sequence to protein function!
1st step: Are there other proteins with similar sequences ? To nd out we must search the existing protein sequence databases and compare our sequence with all the other sequences in the database
>sp|P00974|BPT1_BOVIN Pancreatic trypsin inhibitor OS=Bos taurus PE=1 SV=2 MKMSRLCLSVALLVLLGTLAASTPGCDTSNQAKAQRPDFCLEPPYTGPCKARIIRYFYNA KAGLCQTFVYGGCRAKRNNFKSAEDCMRTCGGAIGPWENL

Basic Local Alignment Search Tool


http://blast.ncbi.nlm.nih.gov/Blast.cgi

Bioinformtica e Estrutura Molecular

74

Bioinformatics - BAST
Basic Local Alignment Search Tool
http://blast.ncbi.nlm.nih.gov/Blast.cgi

Bioinformtica e Estrutura Molecular

75

Bioinformatics - BLAST
Basic Local Alignment Search Tool

http://www.nature.com/scitable/topicpage/Basic-Local-Alignment-Search-Tool-BLAST-29096
Bioinformtica e Estrutura Molecular

76

Bioinformatics - BLAST
Basic Local Alignment Search Tool

The bit score gives an indication of how good the alignment is; the higher the score, the better the alignment. In general terms, this score is calculated from a formula that takes into account the alignment of similar or identical residues, as well as any gaps introduced to align the sequences.
Bioinformtica e Estrutura Molecular

The E-value gives an indication of the statistical signicance of a given pairwise alignment and reects the size of the database and the scoring system used. The lower the E-value, the more signicant the hit. A sequence alignment that has an E-value of 0.05 means that this similarity has a 5 in 100 (1 in 20) chance of occurring by chance alone.

77

Bioinformatics - BLAST
Basic Local Alignment Search Tool

Number of identical residues in this alignment (Identities), the number of conservative substitutions (Positives), and if applicable, the number of gaps in the alignment

One or more dashes () within a sequence indicate insertions or deletions.


Bioinformtica e Estrutura Molecular

The line between the two sequences indicates the similarities between the sequences. If the query and the subject have the same amino acid at a given location, the residue itself is shown. Conservative substitutions, as judged by the substitution matrix, are indicated with +.

78

Bioinformatics - BLAST
Basic Local Alignment Search Tool
What is a substitution matrix ?

Bioinformtica e Estrutura Molecular

79

Bioinformatics - BLAST
Basic Local Alignment Search Tool

What is a substitution matrix ?

BLOSUM (BLOcks of Amino Acid SUbstitution Matrix[1]) is a substitution matrix used for sequence alignment of proteins.
Bioinformtica e Estrutura Molecular

80

Bioinformatics - BLAST
Basic Local Alignment Search Tool
Why do we run sequence alignments ?

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

- To observe patterns of conservation (or variability). To nd the common motifs present in both sequences. - To assess whether it is likely that two sequences evolved from the same sequence. - To nd out which sequences from the database are similar to the sequence at hand. Alignment involves: 1. Construction of the best alignment between the sequences. 2. Assessment of the similarity from the alignment. There are three different types of sequence alignment: Global alignment/Local alignment/Multiple sequence alignment
Bioinformtica e Estrutura Molecular

81

Bioinformatics - BLAST
Basic Local Alignment Search Tool
Why do we run sequence alignments ?

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

- to infer homology from similarity measurements. If 2 sequences are homologous then they should have regions of similarity If 2 sequences are similar then they are not necessarily homologous. Homology - Two genes share a common evolutionary history - Divergence from a common ancestral sequence. Similarity - Observable quantity - Two sequences have regions containing similar terms

Homologies can be inferred from similarity measurements. - Relationship is putative (more evidence required) - Human (zeta) Crystallin and quinone oxidoreductase sequence similarity suggests homology and experimental evidence shows that they have different function
Bioinformtica e Estrutura Molecular

82

Bioinformatics - BLAST
Basic Local Alignment Search Tool
Why do we run sequence alignments ?

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

- to infer homology from similarity measurements. If 2 sequences are homologous then they should have regions of similarity If 2 sequences are similar then they are not necessarily homologous.

Conserved regions in pairwise alignments: - Conserved regions within distantly related organisms are usually most responsible for structure, function or gene expression. - Substrate binding site, disulde bridges, etc. - For conserved regions between recent divergent organisms this may not be the case. - EX) mouse and rat - Higher number of conserved regions overall
Bioinformtica e Estrutura Molecular

83

Bioinformatics - BLAST alignment


Basic Local Alignment Search Tool

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Global Alignment: the best alignment over the entire length of two sequences and is suitable when the two sequences are of similar length, with a signicant degree of similarity throughout. Example:! !
S P I I M I L L L A R A R I T Y -

Local alignment: Involving stretches that are shorter than the entire sequences, possibly more than one. Suitable when comparing substantially different sequences, which possibly differ signicantly in length, and have only a short patches of similarity.
M I I L L L A R A R

Bioinformtica e Estrutura Molecular

82

Bioinformatics - BLAST alignment


Basic Local Alignment Search Tool

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Multiple alignment: Simultaneous alignment of more than two sequences. Suitable when searching for subtle conserved sequence patterns in a protein family, and when more than two sequences of the protein family are available.
S P I I M I L L L A R A R A R I I T Y T Y

M O L

Bioinformtica e Estrutura Molecular

83

Bioinformatics - BLAST alignment


Alignment by eye !

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Consider the best alignment of ATGGCGT and ATGAGT


A * A T * T G * G G C ! A G * G T * T

Intuitively we seek an alignment to maximize the number of residue-to-residue matches. Sequence alignment is the establishment of residue-to-residue correspondence between two or more sequences such that the order of residues in each sequence is preserved. A gap, which indicates a residue-to-nothing match, may be introduced in either sequence. A gap-to-gap match is meaningless and is not allowed.
Bioinformtica e Estrutura Molecular

84

Bioinformatics - BLAST alignment


Now we must introduce mathematics and a scoring system

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Denition: Sequence alignment is the establishment of residue-to-residue correspondence between two or more sequences such that the order of residues in each sequence is preserved. A gap, which indicates a residue-to-nothing match, may be introduced in either sequence. A gap-to-gap match is meaningless and is not allowed.

Bioinformtica e Estrutura Molecular

85

Bioinformatics - BLAST alignment


The scoring scheme

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Give two sequences we need a number to associate with each possible alignment (i.e. the alignment score = goodness of alignment). The scoring scheme is a set of rules which assigns the alignment score to any given alignment of two sequences. 1. The scoring scheme is residue based: it consists of residue substitution scores (i.e. score for each possible residue alignment), plus penalties for gaps. 2. The alignment score is the sum of substitution scores and gap penalties.

Bioinformtica e Estrutura Molecular

86

Bioinformatics - BLAST alignment


A simple scheme

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Use +1 as a reward for a match, -1 as the penalty for a mismatch, and ignore gaps The best alignment by eye from before:
A A T T G G G C A G G T T

score: +1+1+1+01+1+1=4

An alternative alignment:

A A

T -

G T

G G

C A

G G

T T

score: +1+01+11+1+1=2

Bioinformtica e Estrutura Molecular

87

Bioinformatics - BLAST alignment


The substitution matrix

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A concise way to express the residue substitution costs can be achieved with a N N matrix (N is 4 for DNA and 20 for proteins). The substitution matrix for the simple scoring scheme:
C T A G C 1 -1 -1 -1 C C T A G 2 1 -1 -1 T -1 1 -1 -1 T 1 2 -1 -1 A -1 -1 1 -1 A -1 -1 2 1 G -1 -1 -1 1 G -1 -1 1 2

A better scheme A, G are purines (pyrimidine ring fused to an imidazole ring), T, C are pyrimidines (one six-membered ring). Assume we believe that from evolutionary standpoint purine/pyrimidine mutations are less likely to occur compared to purine/purine (pyrimidine/pyrimidine) mutations. Can we capture this in a substitution matrix?

Bioinformtica e Estrutura Molecular

88

Bioinformatics - BLAST alignment

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Protein substitution matrices are signicantly more complex than DNA scoring matrices. Proteins are composed of twenty amino acids, and physico-chemical properties of individual amino acids vary considerably. A protein substitution matrix can be based on any property of amino acids: size, polarity, charge, hydrophobicity. In practice the most important are evolutionary substitution matrices.

Bioinformtica e Estrutura Molecular

89

Bioinformatics - Evolutionary substitution matrix


PAM (point accepted mutation) family PAM250, PAM120, etc. BLOSUM (Blocks substitution matrix) family BLOSUM62, BLOSUM50, etc. The substitution scores of both PAM and BLOSUM matrices are derived from the analysis of known alignments of closely related proteins. The BLOSUM matrices are newer and considered better.

Bioinformtica e Estrutura Molecular

90

Bioinformatics - Evolutionary substitution matrix


Sequence changes over long evolutionary time scales are not well approximated by compounding small changes that occur over short time scales. For the BLOSUM matrices, Henikoff and Henikoff used multiple alignments of evolutionarily divergent proteins. The probabilities used in the matrix calculation are computed by looking at "blocks" of conserved sequences found in multiple protein alignments. These conserved sequences are assumed to be of functional importance within related proteins. To reduce bias from closely related sequences, segments in a block with a sequence identity above a certain threshold were clustered giving weight 1 to each such cluster. For the BLOSUM62 matrix, this threshold was set at 62%. Pairs frequencies were then counted between clusters, hence pairs were only counted between segments less than 62% identical. It turns out that the BLOSUM62 matrix does an excellent job detecting similarities in distant sequences, and this is the matrix used by default in most recent alignment applications such as BLAST.
Bioinformtica e Estrutura Molecular

91

Bioinformatics - BLAST alignment


BLOSUM62 Substitution matrix
A A R N D C Q E G H I L K M F P S T W Y V
4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0

R
-1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3

N
-2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3

D
-2 -2 1 6 -3 0 2 -1 -1 -3 -4 -1 -3 -3 -1 0 -1 -4 -3 -3

C
0 -3 -3 -3 9 -3 -4 -3 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1

Q
-1 1 0 0 -3 5 2 -2 0 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2

E
-1 0 0 2 -4 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2

G
0 -2 0 -1 -3 -2 -2 6 -2 -4 -4 -2 -3 -3 -2 0 -2 -2 -3 -3

H
-2 0 1 -1 -3 0 0 -2 8 -3 -3 -1 -2 -1 -2 -1 -2 -2 2 -3

I
-1 -3 -3 -3 -1 -3 -3 -4 -3 4 2 -3 1 0 -3 -2 -1 -3 -1 3

L
-1 -2 -3 -4 -1 -2 -3 -4 -3 2 4 -2 2 0 -3 -2 -1 -2 -1 1

K
-1 2 0 -1 -3 1 1 -2 -1 -3 -2 5 -1 -3 -1 0 -1 -3 -2 -2

M
-1 -1 -2 -3 -1 0 -2 -3 -2 1 2 -1 5 0 -2 -1 -1 -1 -1 1

F
-2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6 -4 -2 -2 1 3 -1

P
-1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7 -1 -1 -4 -3 -2

S
1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 1 -3 -2 -2

T
0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -2 -2 0

W
-3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 11 2 -3

Y
-2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1

V
0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4

Bioinformtica e Estrutura Molecular

92

Bioinformatics - BLAST alignment


BLOSUM62 Substitution matrix
A A R N D C Q E G H I L K M F P S T W Y V
Bioinformtica e Estrutura Molecular 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 -3 1 1 -2 -1 -3 -2 5

M
-1 -1 -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

93

Bioinformatics - BLAST alignment Gaps


So far we ignored gaps (amounts to gap penalty of 0) A gap corresponds to an insertion or a deletion of a residue

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A conventional wisdom dictates that the penalty for a gap must be several times greater than the penalty for a mutation. That is because a gap/extra residue - Interrupts the entire polymer chain - In DNA shifts the reading frame

Bioinformtica e Estrutura Molecular

94

Bioinformatics - BLAST alignment Gap initiation and extension

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

The conventional wisdom: the creation of a new gap should be strongly disfavored. However, once created insertions/deletions of chunks of more than one residue should be much less expensive (i.e. insertion of domains often occurs). A simple yet effective solution is afne gap penalties: ! ! ! ! ! ! ! ! ! ! ! ! ! (n) = o (n 1)e where o is opening penalty and e is extension penalty encourages gap extension

Bioinformtica e Estrutura Molecular

95

Bioinformatics - BLAST alignment Afne gaps: a physical insight


Afne gaps favor the alignment:

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A TG T AG TG T A T AG T AC A TGC A A TG T AG - - - - - - - T AC A TGC A

Over the alignment:

A TG T AG TG T A T AG T AC A TGC A A TG T A - - G - - T A - - - CA TGCA

Exactly what we want from the biological viewpoint.

Bioinformtica e Estrutura Molecular

96

Bioinformatics - BLAST alignment The alignment score with BLOSUM62

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Consider two alternative alignments of ANRGDFS and ANREFS with the gap opening penalty of 10 (-10 score):
A A N N R R G D E F F S S

score: 4+6+510+2+6+4 = 17

score: 4+6+5210+6+4 = 13

A A

N N

R R

G E

D -

F F

S S

The scoring scheme provides us with the quantitative measure of how good is some alignment relative to alternative alignments. However the scoring scheme does not tell us how to nd the best alignment.

Bioinformtica e Estrutura Molecular

97

Bioinformatics - BLAST alignment How do we nd the best alignment?


Brute-force approach:

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Generate the list all possible alignments between two sequences, score them Select the alignment with the best score The number of possible global alignments between two sequences of length N is

22N N
For two sequences of 250 residues this is 10
1078 number of atoms in the universe
149

Bioinformtica e Estrutura Molecular

98

Bioinformatics - BLAST alignment The Needleman-Wunsch algorithm

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A smart way to reduce the massive number of possibilities that need to be considered, yet still guarantees that the best solution will be found (Saul Needleman and Christian Wunsch, 1970). The basic idea is to build up the best alignment by using optimal alignments of smaller subsequences. The Needleman-Wunsch algorithm is an example of dynamic programming, a discipline invented by Richard Bellman (an American mathematician) in 1953!

Bioinformtica e Estrutura Molecular

99

Bioinformatics - BLAST alignment How does dynamic programming work?

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A divide-and-conquer strategy: Break the problem into smaller subproblems. Solve the smaller problems optimally. Use the sub-problem solutions to construct an optimal solution for the original problem. Dynamic programming can be applied only to problems exhibiting the properties of overlapping subproblems (e.g. nding the best chess move)

Bioinformtica e Estrutura Molecular

100

Bioinformatics - BLAST alignment The mathematics

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A matrix D(i,j) indexed by residues of each sequence is built recursively, such that

D(i1,j1) + s(xi,yj) D(i,j) = max D(i1,j) + g D(i,j1) + g subject to a boundary conditions. s(i, j) is the substitution score for residues i and j, and g is the gap penalty.

Bioinformtica e Estrutura Molecular

101

Bioinformatics - BLAST alignment A walk-through: an overview

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

We consider all possible pairs of residue from two sequences (this gives rise to a 2D matrix representation). We will have two matrices: the score matrix and traceback matrix. The Needleman-Wunsch algorithm consists of three steps: 1. Initialization of the score matrix 2. Calculation of scores and lling the traceback matrix 3. Deducing the alignment from the traceback matrix

Bioinformtica e Estrutura Molecular

102

Bioinformatics - BLAST alignment Consider the simple example

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

The alignment of two sequences SEND and AND with the BLOSUM62 substitution matrix and gap opening penalty of 10 (no gap extension):

S A A A

E A N N

N N N D

D D D D -

score: +1 +3 the best score -3 -8

Bioinformtica e Estrutura Molecular

103

Bioinformatics - BLAST alignment The score and traceback matrices

D(i1,j1)+s(xi,yj) D(i,j) = max D(i1,j)+g D(i,j1)+g

The cells of the score matrix are labelled C(i,j) where i = 1,2,...,N and j = 1,2,...,M

C(1,1) C(1,2) C(1,3) C(1,4) C(1,5)

A N D

C(2,1) C(2,2) C(2,3) C(2,4) C(2,5) C(3,1) C(3,2) C(3,3) C(3,4) C(3,5) C(4,1) C(4,2) C(4,3) C(4,4) C(4,5)

A N D

Bioinformtica e Estrutura Molecular

104

Bioinformatics - BLAST alignment Initialization

D(i1,j1)+s(xi,yj) D(i,j) = max D(i1,j)+g D(i,j1)+g

The rst row and column of the two matrices are lled in the initialization step qdiag! =! C(0,1) + s(1,2) qup! =! C(0,2) + g qleft! =! C(1,1) + g = 0 - 10 = -10
diag ! left !! up !! ! the letters from two sequences are aligned ! a gap is introduced in the left sequence ! a gap is introduced in the top sequence

S
0 -10

E
-20

N
-30

D
-40 done

S
left

E
left

N
left

D
left

A N D

-10 -20 -30

C(2,2) C(2,3) C(2,4) C(2,5) C(3,2) C(3,3) C(3,4) C(3,5) C(4,2) C(4,3) C(4,4) C(4,5)

A N D

up up up

Bioinformtica e Estrutura Molecular

105

Bioinformatics - BLAST alignment Initialization

D(i1,j1)+s(xi,yj) D(i,j) = max D(i1,j)+g D(i,j1)+g

The rst row and column of the two matrices are lled in the initialization step qdiag! =! C(0,2) + s(1,3) qup! =! C(0,3) + g qleft! =! C(1,2) + g = -10 - 10 = -20
diag ! left !! up !! ! the letters from two sequences are aligned ! a gap is introduced in the left sequence ! a gap is introduced in the top sequence

S
0 -10

E
-20

N
-30

D
-40 done

S
left

E
left

N
left

D
left

A N D

-10 -20 -30

C(2,2) C(2,3) C(2,4) C(2,5) C(3,2) C(3,3) C(3,4) C(3,5) C(4,2) C(4,3) C(4,4) C(4,5)

A N D

up up up

Bioinformtica e Estrutura Molecular

106

Bioinformatics - BLAST alignment Scoring


The cells are lled starting from cell C(2,2) The score is the maximum value for:

D(i1,j1)+s(xi,yj) D(i,j) = max D(i1,j)+g D(i,j1)+g

qdiag! =! C(i-1,j-1) + s(i,j) qup! =! C(i-1,j) + g qleft! =! C(i,j-1) + g

where S(i,j) is the substitution score for letters i and j and g is the gap penalty
S
0 -10

E
-20

N
-30

D
-40 done

S
left

E
left

N
left

D
left

A N D

-10 -20 -30

C(2,2) C(2,3) C(2,4) C(2,5) C(3,2) C(3,3) C(3,4) C(3,5) C(4,2) C(4,3) C(4,4) C(4,5)

A N D

up up up

Bioinformtica e Estrutura Molecular

107

Bioinformatics - BLAST alignment Scoring a pictorial representation

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

The value of the cell C(i,j) depends only on the values of the immediately adjacent northwest diagonal, up, and left cells:

C(i-1,j-1)

C(i-1,j)

C(i,j-1)

C(i,j)

Bioinformtica e Estrutura Molecular

108

Bioinformatics - BLAST alignment The Needleman-Wunsch progression


The rst step is to calculate the value of C(2,2):
diag ! left !! up !!

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

! the letters from two sequences are aligned ! a gap is introduced in the left sequence ! a gap is introduced in the top sequence

S
0 -10 ?

E
-20

N
-30

D
-40 done

S
left ?

E
left

N
left

D
left

A N D

-10 -20 -30

A N D

up up up

Bioinformtica e Estrutura Molecular

109

Bioinformatics - BLAST alignment The Needleman-Wunsch progression


For cell C(2,2) qdiag! =! C(i-1,j-1) + s(i,j) qup! =! C(i-1,j) + g qleft! =! C(i,j-1) + g

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

from the BLOSUM62 matrix

qdiag! =! C(1,1) + S(S,A)! =! 0 + 1 ! ! = 1 qup! =! C(1,2) + g!! ! ! = -10 + (-10) != -20 qleft! =! C(2,1) + g!! ! ! = -10 + (-10)! = -20

S
0 -10 ?

E
-20

N
-30

D
-40 done

S
left ?

E
left

N
left

D
left

A N D

-10 -20 -30

A N D

up up up

Bioinformtica e Estrutura Molecular

110

Bioinformatics - BLAST alignment The Needleman-Wunsch progression


For cell C(2,2) qdiag! =! C(i-1,j-1) + s(i,j) qup! =! C(i-1,j) + g qleft! =! C(i,j-1) + g

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

from the BLOSUM62 matrix

qdiag! =! C(1,1) + S(S,A)! =! 0 + 1 ! ! = 1 qup! =! C(1,2) + g!! ! ! = -10 + (-10) != -20 qleft! =! C(2,1) + g!! ! ! = -10 + (-10)! = -20 Highest score is 1 from the diag cell

S
0 -10 1

E
-20

N
-30

D
-40 done

S
left diag

E
left

N
left

D
left

A N D

-10 -20 -30

A N D

up up up

Bioinformtica e Estrutura Molecular

111

Bioinformatics - BLAST alignment The Needleman-Wunsch progression


Go on to cell C(2,3) qdiag! =! C(i-1,j-1) + s(i,j) qup! =! C(i-1,j) + g qleft! =! C(i,j-1) + g

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

from the BLOSUM62 matrix

qdiag! =! C(1,2) + S(E,A)! = -10 + -1 ! = -11 qup! =! C(1,3) + g!! ! ! = -20 + (-10) != -30 qleft! =! C(2,2) + g!! ! ! = 1 + (-10)! = -9 !

S
0 -10 1

E
-20 ?

N
-30

D
-40 done

S
left diag

E
left ?

N
left

D
left

A N D

-10 -20 -30

A N D

up up up

Bioinformtica e Estrutura Molecular

112

Bioinformatics - BLAST alignment The Needleman-Wunsch progression

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Finally when all cells in the scores and traceback matrices are lled in

S
0 -10 1 -9 -19

E
-20 -9 -1 -11

N
-30 -19 -3 2

D
-40 -29 -13 3 done

S
left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

-10 -20 -30

A N D

up up up

Bioinformtica e Estrutura Molecular

113

Bioinformatics - BLAST alignment The traceback

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

Traceback = the process of deduction of the best alignment from the traceback matrix. The traceback always begins with the last cell to be lled with the score, i.e. the bottom right cell. One moves according to the traceback value written in the cell. There are three possible moves: diagonally (toward the top-left corner of the matrix), up, or left. The traceback is completed when the rst, top-left cell of the matrix is reached (done cell).

Bioinformtica e Estrutura Molecular

114

Bioinformatics - BLAST alignment The traceback path


The traceback performed on the completed traceback matrix:

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

S
done left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

The traceback starts here

Bioinformtica e Estrutura Molecular

115

Bioinformatics - BLAST alignment The best alignment

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

The alignment is deduced from the values of cells along the traceback path, by taking into account the values of the cell in the traceback matrix: diag ! !the letters from two sequences are aligned left ! !a gap is introduced in the left sequence up ! !a gap is introduced in the top sequence Sequences are aligned backwards.
done

S
left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D
Bioinformtica e Estrutura Molecular

up up up

The traceback starts here

116

Bioinformatics - BLAST alignment The traceback step by step


First is - diag (aligned)

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

S
done left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

D D

Bioinformtica e Estrutura Molecular

117

Bioinformatics - BLAST alignment The traceback step by step


First is - diag (aligned) Second is also - diag (aligned)

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

S
done left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

N D N D

Bioinformtica e Estrutura Molecular

118

Bioinformatics - BLAST alignment The traceback step by step


First is - diag (aligned) Second is also - diag (aligned) Third is - left (gap in left sequence)

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

S
done left diag diag up

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

E N D - N D

Bioinformtica e Estrutura Molecular

119

Bioinformatics - BLAST alignment The traceback step by step


First is - diag (aligned) Second is also - diag (aligned) Third is - left (gap in left sequence) Fourth is - diag (aligned)
S
done left diag diag up

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

S E N D A - N D

Bioinformtica e Estrutura Molecular

120

Bioinformatics - BLAST alignment The traceback step by step


First is - diag (aligned) Second is also - diag (aligned) Third is - left (gap in left sequence) Fourth is - diag (aligned) Fifth is done
S
done left diag diag up

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

S E N D A - N D

Bioinformtica e Estrutura Molecular

121

Bioinformatics - BLAST alignment Comparison S E N D


So our exhaustive search gave: And our alignment using the NW algorithm:
S
done left diag diag up

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

A A A

A N N

N N D

D D D -

score: +1 +3 the best score -3 -8

E
left left diag diag

N
left left diag diag

D
left left left diag

A N D

up up up

S E N D A - N D

Bioinformtica e Estrutura Molecular

122

Bioinformatics - BLAST alignment A few observations

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

It was much easier to align SEND and AND by the exhaustive search! As we consider longer sequences the situation quickly turns against the exhaustive search: Two 12 residue sequences would require considering 1 million alignments. Two 150 residue sequences would require considering 1088 alignments ( 1078 is the estimated number of atoms in the Universe).

For two 150 residue sequences the Needleman-Wunsch algorithm requires lling a 150 150 matrix. Assuming it takes 0.01 s to calculate the score and traceback for all possible alignments it would still take............. ca. 3 x 1079 years to complete
Bioinformtica e Estrutura Molecular

123

Bioinformatics - BLAST alignment The summary

The Needleman-Wunsch algorithm for sequence alignment 7th Melbourne Bioinformatics Course Vladimir Likc, The University of Melbourne

The alignment is over the entire length of two sequences: the traceback starts from the lower right corner of the traceback matrix, and completes in the upper left cell of the matrix. The Needleman-Wunsch algorithm works in the same way regardless of the length or complexity of sequences, and guarantees to nd the best alignment. The Needleman-Wunsch algorithm is appropriate for nding the best alignment of two sequences which are (i) of the similar length; (ii) similar across their entire lengths.

Bioinformtica e Estrutura Molecular

124

Bioinformatics - BLAST alignment


Basic Local Alignment Search Tool

http://www.nature.com/scitable/topicpage/Basic-Local-Alignment-Search-Tool-BLAST-29096
Bioinformtica e Estrutura Molecular

125

Bioinformatics - BLAST alignment


The BLAST Heuristic BLAST increases the speed of alignment by decreasing the search space or number of comparisons it makes. Instead of comparing every residue against every other, BLAST uses short "word" (w) segments to create alignment "seeds." Requiring three residues to match in order to seed an alignment means that fewer sequence regions need to be compared. Larger word sizes usually mean that there are even fewer regions to evaluate. BLAST is designed to create a
I R S T F I R S D F I R S E N D F I R S T T I M E D F I F I R I R S
word list from the query sequence with words of a specic length, as dened by the user.

Bioinformtica e Estrutura Molecular

126

Bioinformatics - BLAST alignment


The BLAST Heuristic* Once an alignment is seeded, BLAST extends the alignment according to a threshold (T) that is set by the user. When performing a BLAST query, the computer extends words with a neighborhood score greater than T. A cutoff score (S) is used to select alignments over the cutoff, which means the sequences share signicant homologies. If a hit is detected, then the algorithm checks whether w is contained within a longer aligned segment pair that has a cutoff score greater than or equal to S (Altschul et al., 1990). When an alignment score starts to decrease past a lower threshold score (X), the alignment is terminated. These and many other variables can be adjusted to either increase the speed of the algorithm or emphasize its sensitivity.
*A heuristic method is used to rapidly come to a solution that is hoped to be close to the best possible answer, or 'optimal solution'.

Bioinformtica e Estrutura Molecular

127

Bioinformatics - BLAST alignment


Basic Local Alignment Search Tool

Number of identical residues in this alignment (Identities), the number of conservative substitutions (Positives), and if applicable, the number of gaps in the alignment

One or more dashes () within a sequence indicate insertions or deletions.


Bioinformtica e Estrutura Molecular

The line between the two sequences indicates the similarities between the sequences. If the query and the subject have the same amino acid at a given location, the residue itself is shown. Conservative substitutions, as judged by the substitution matrix, are indicated with +.

128

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

129

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

130

Bioinformatics - Clustal alignment


>sp|P61626|LYSC_HUMAN Lysozyme C OS=Homo sapiens GN=LYZ PE=1 SV=1 MKALIVLGLVLLSVTVQGKVFERCELARTLKRLGMDGYRGISLANWMCLAKWESGYNTRA TNYNAGDRSTDYGIFQINSRYWCNDGKTPGAVNACHLSCSALLQDNIADAVACAKRVVRD PQGIRAWVAWRNRCQNRDVRQYVQGCGV >sp|P00698|LYSC_CHICK Lysozyme C OS=Gallus gallus GN=LYZ PE=1 SV=1 MRSLLILVLCFLPLAALGKVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQA TNRNTDGSTDYGILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDG NGMNAWVAWRNRCKGTDVQAWIRGCRL >sp|P05105|LYS_HYACE Lysozyme OS=Hyalophora cecropia PE=2 SV=2 MTKYVILLAVLAFALHCDAKRFTRCGLVQELRRLGFDETLMSNWVCLVENESGRFTDKIG KVNKNGSRDYGLFQINDKYWCSKGTTPGKDCNVTCNQLLTDDISVAATCAKKIYKRHKFD AWYGWKNHCQHGLPDISDC >sp|Q7LZQ1|LYSC_TRISI Lysozyme C OS=Trionyx sinensis GN=LYZ PE=1 SV=3 GKIYEQCELAREFKRHGMDGYHGYSLGDWVCTAKHESNFNTAATNYNRGDQSTDYGILQI NSRWWCNDGKTPKAKNACGIECSELLKADITAAVNCAKRIVRDPNGMGAWVAWTKYCKGK DVSQWIKGCKL >sp|P30201|LYSC_MACMU Lysozyme C OS=Macaca mulatta GN=LYZ PE=2 SV=1 MKAVIILGLVLLSVTVQGKIFERCELARTLKRLGLDGYRGISLANWVCLAKWESNYNTQA TNYNPGDQSTDYGIFQINSHYWCNNGKTPGAVNACHISCNALLQDNIADAVTCAKRVVSD PQGIRAWVAWRNHCQNRDVSQYVQGCGV >sp|P09963|LYS_BPP22 Lysozyme OS=Enterobacteria phage P22 GN=19 PE=1 SV=1 MMQISSNGITRLKREEGERLKAYSDSRGIPTIGVGHTGKVDGNSVASGMTITAEKSSELL KEDLQWVEDAISSLVRVPLNQNQYDALCSLIFNIGKSAFAGSTVLRQLNLKNYQAAADAF LLWKKAGKDPDILLPRRRRERALFLS

Bioinformtica e Estrutura Molecular

131

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

132

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

133

Bioinformatics - Clustal alignment


Color ORANGE BLUE RED GREEN Residue GPST FWY HKR ILMV

Bioinformtica e Estrutura Molecular

134

Bioinformatics - Clustal alignment


Clustal X Default Colouring Residue at position A,I,L,M,F,W,V R,K N C C Q E D G H,Y P S,T Applied Colour BLUE RED GREEN BLUE PINK GREEN MAGENTA MAGENTA ORANGE CYAN YELLOW GREEN { Threshhold, Residue group } {+60%, WLVIMAFCHP} {+60%,KR},{+80%, K,R,Q} {+50%, N}, {+85%, N,Y} {+60%, WLVIMAFCHP} {100%, C} {+60%,KR},{+50%,QE},{+85%,Q,E,K,R} {+60%,KR},{+50%,QE},{+85%,E,Q,D} {+60%,KR}, {+85%, K,R,Q}, {+50%,ED} {+0%, G} {+60%, WLVIMAFCHP}, {+85%, W,Y,A,C,P,Q,F,H,I,L,M,V} {+0%, P} {+60%, WLVIMAFCHP}, {+50%, TS}, {+85%,S,T}

Bioinformtica e Estrutura Molecular

135

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

136

Bioinformatics - Clustal alignment

Bioinformtica e Estrutura Molecular

137

Bioinformatics - Clustal alignment


Can also run using ignore gaps - this compares like with like

Bioinformtica e Estrutura Molecular

138

Bioinformatics - Clustal alignment


BLAST v Clustal
ClustalW and BLAST are designed to obtain and identify sequence similarities ClustalW measures similarity between several input sequences. These are used to construct a phylogenic tree to depict evolutionary relationships BLAST on the other hand identies similarities between and input sequence and all sequences in a database. BLAST returns all sequences and doesnt worry about origin.

Bioinformtica e Estrutura Molecular

139

Bioinformatics - Clustal alignment


The ClustalW algorithm
ClustalW is a sequence alignment method used to build phylogenic trees by pairwise sequence alginments which are used to construct a mutilple sequence alignment (MSA) The algorithm functions by:

! aligning all sequences in pairs ! placing the most similar sequence pairs (highest % sequence identity) close
! together in a phylogenic tree and the most dissimilar farther apart

! building a MSA using the most similar sequence pair and aligning them ! extending the MSA by aliogning pairs in decreasing order of similarity
A phylogenetic tree or evolutionary tree is a tree showing the evolutionary relationships among various biological species or other entities that are known to have a common ancestor.

Bioinformtica e Estrutura Molecular

140

Bioinformatics - Clustal alignment


Clustering analysis - the problem
Let us consider 4 sequences - they are homologus from 4 different species

Species A Species B Species C Species D

ATSS ATGS TTSG TSGG

By measuring the number of differences between each pair of species (Hamming distances) we can deveop a clustering proceedure to develop an unrooted phylogenic tree

Bioinformtica e Estrutura Molecular

141

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
We need to rst determine the number of differences between the sequences

ATSS
Species A Species B Species C Species D

ATGS

TTSG

TSGG

ATSS ATGS TTSG TSGG

Bioinformtica e Estrutura Molecular

142

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
We need to rst determine the number of differences between the sequences

ATSS
Species A Species B Species C Species D

ATGS

TTSG

TSGG

ATSS ATGS TTSG TSGG

0 0 0 0

Bioinformtica e Estrutura Molecular

143

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
We need to rst determine the number of differences between the sequences

ATSS
Species A Species B Species C Species D

ATGS 1 0

TTSG 2

TSGG 4

ATSS ATGS TTSG TSGG

0 0

Bioinformtica e Estrutura Molecular

144

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
We need to rst determine the number of differences between the sequences

ATSS
Species A Species B Species C Species D

ATGS 1 0

TTSG 2 3 0

TSGG 4 3

ATSS ATGS TTSG TSGG

Bioinformtica e Estrutura Molecular

145

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
We need to rst determine the number of differences between the sequences

ATSS
Species A Species B Species C Species D

ATGS 1 0

TTSG 2 3 0

TSGG 4 3 2 0

ATSS ATGS TTSG TSGG

Bioinformtica e Estrutura Molecular

146

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
smallest distance is 1 between ATSS and ATGS

ATSS
Species A Species B Species C Species D

ATGS 1 0

TTSG 2 3 0

TSGG 4 3 2 0

ATSS ATGS TTSG TSGG

Bioinformtica e Estrutura Molecular

147

Bioinformatics - Clustal alignment


Forming a sequence cluster
Smallest distance is 1 between ATSS and ATGS So our rst cluster will be {ATSS, ATGS} Our tree will contain:

ATSS

ATGS

Bioinformtica e Estrutura Molecular

148

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
Using the cluster {ATSS, ATGS} we now calculate a second distance matrix

{ATSS, ATGS} {ATSS, ATGS} TTSG TSGG

TTSG

TSGG

Bioinformtica e Estrutura Molecular

149

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
Using the cluster {ATSS, ATGS} we now calculate a second distance matrix

{ATSS, ATGS} {ATSS, ATGS} TTSG TSGG 0

TTSG

TSGG

0 0

Bioinformtica e Estrutura Molecular

150

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
Using the cluster {ATSS, ATGS} we now calculate a second distance matrix

{ATSS, ATGS} {ATSS, ATGS} TTSG TSGG 0

TTSG

TSGG

0.5(2+3)=2.5 0.5(4+3)=3.5 0 2 0

Bioinformtica e Estrutura Molecular

151

Bioinformatics - Clustal alignment


Determining pairwise Hamming distances
The smallest distance is now 2 between TTSG and TSGG

{ATSS, ATGS} {ATSS, ATGS} TTSG TSGG 0

TTSG 2.5 0

TSGG 3.5 2 0

Bioinformtica e Estrutura Molecular

152

Bioinformatics - Clustal alignment


Forming another sequence cluster
Smallest distance is 2 between TTSG and TSGG So our second cluster will be {TTSG, TSGG} Our tree will contain the fragment:

TTSG

TSGG

Bioinformtica e Estrutura Molecular

153

Bioinformatics - Clustal alignment


Making the tree
Now we have 2 clusters and we can link them to produce a tree

ATSS

ATGS

TTSG

TSGG

Bioinformtica e Estrutura Molecular

154

Bioinformatics - Clustal alignment


Branch lengths
Now we have to calculate the branch length: ! The length between 2 sequences is half the Hamming distance between them

ATSS

ATGS

TTSG

TSGG

Bioinformtica e Estrutura Molecular

155

Bioinformatics - Clustal alignment


Branch lengths
Now we have to calculate the branch length: !
Species A Species B Species C Species D

The length between 2 sequences is half the Hamming distance between them
ATSS ATSS ATGS TTSG TSGG 0 ATGS 1 0 TTSG 2 3 0 TSGG 4 3 2 0 {ATSS, ATGS} {ATSS, ATGS} 0 TTSG 2.5 0 TSGG 3.5 2 0

1.5

1.5

TTSG TSGG

0.5

0.5

ATSS

ATGS

TTSG

TSGG

Bioinformtica e Estrutura Molecular

156

Bioinformatics - Clustal alignment


Branch lengths
We have created an unrooted phylogenic tree using a clustering method Why is this useful ? Can predict evolutionary relationships The proceedure is similar to the start of a ClustalW search

Bioinformtica e Estrutura Molecular

157

Anda mungkin juga menyukai