• No results found

2.5 Alignment Methods

2.5.1 Sequence Alignment

The most simple case of aligning two amino acid sequences by using only the order and the type of amino acids has been investigated for decades. In the following, we start with

2.5 Alignment Methods 17

this case and, based on it, explain techniques like profile-profile alignment and secondary structure element alignment.

Representation of Alignments

In order to find such similarities between amino acid sequences, it is necessary to find a suitable representation for protein sequences. Firstly, one needs an alphabet of amino acids:

Definition (Amino Acid Alphabet). The alphabet of amino acids ΣA in its one-letter

representation is defined as{A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y}, based on the 20 most usual amino acids in protein sequences. Sometimes this alphabet is com- bined with an additional character ”X”, which stands for any other, non-standard amino acid.

As stated in the introduction to this section, given two sequences S1, S2 Σ∗A built from

the alphabet of standard amino acids, the aim of sequence alignment is to derive a measure of similarity (or, in some cases, difference) between these sequences, the alignment score, and to align the sequences such that an amino acid from S1 is either mapped to an amino

acid from S2 or left unmapped (and vice versa). Thereby, in case of sequence alignments,

the sequential order of amino acids is preserved, i.e. it is not possible to map the residue at position 1 of S1 to the residue at position 2 of S2 as well as the residue at position 2 of

S1 to the residue at position 1 of S2 in the same alignment:

Definition (Extended Alphabet)Theextended alphabet of amino acids ΣA,− is defined as ΣA∪ {−}, were the so-called gap symbol ”-” stands for ”unmatched”.

Definition (Alignment)Apairwise alignmentof two amino acid sequencesS1, S2 Σ∗Ais

defined as a tuple{A1, A2}, whereA1 ΣlA,− results fromS1 after insertion of gap symbols

(and A2 from S2 analogously). Here, l N denotes the length of the alignment, as both

extended sequences A1, A2 must have the same length. Aligned positions i ∈ {1, ..,l}, i.e.

positions where neither extended sequence contains a gap symbol, can either be matches

(i.e. A1[i] =A2[i]) ormismatches (A1[i]6=A2[i]). At anunaligned position orgap position,

either A1 or A2 contains the gap symbol ”-”. Please note that it is not allowed for both

A1 and A2 to contain the gap symbol at the same position.

Scoring of Alignments

The basis for aligning amino acids is usually a so-called scoring matrix, which contains a score value for each pair of amino acids a and b based on observations such as point mutations or frequencies of occurring amino acid pairs obtained from superpositions of similar protein structures.

Stretches of unmatched residues are called gap regions or simply gaps and may occur in both A1 or A2, as described above. In alignment methods which try to maximize a

similarity score (in contrast to minimizing the difference score), gap positions are usually punished by a negative score. Further, one categorizes so-called gap costs as e.g. linear

(i.e. each unmatched residue contributes the same score) oraffine, where both agap open

score (the punishment for opening a new stretch of unmatched residues) and a gap extend

score (the punishment for elongating a gap) are used.

Each alignment between two amino acid sequences can be assigned an overall score, the so-called alignment score, given a scoring matrix M and gap costs, by summing over the values in the matrix corresponding to the aligned positions and applying the gap costs depending on the distribution of gap symbols in the alignment. The computation of the gap punishment further depends on the alignment model that has been chosen, such as

global orlocal alignment (see below).

Computation of Alignments

The computation of alignments usually means the search for the optimal alignment with respect to a certain alignment scoring scheme. For global alignment, the computation of the optimal alignment score with affine gap costs can be done by recursive equations, which can be found in a similar manner in many papers and books about bioinformatics. Here, we use a similar notation to Gusfield’s in [Gusfield, 1997]:

Definition. Let i and j N denote positions on amino acid sequences S1, S2. Define

E(i, j) as the maximum value of any alignment of prefix S1[1..i] with prefix S2[1..j] that

ends with a gap in the extended sequence A1. Define F(i, j) as the maximum value of

any alignment that ends with a gap in the extended sequence A2. Define G(i, j) as the

maximum value of any alignment that ends with a match or mismatch. Finally, define

V(i, j) as the maximum value of E(i, j), F(i, j) and G(i, j).

The base cases of the necessary recurrence equations for global alignment can be written as

V(i,0) = E(i,0) = gapopen−igapextend, V(0, j) = F(0, j) = gapopen−jgapextend.

The recurrences themselves are

V(i, j) = max{E(i, j), F(i, j), G(i, j)},

E(i, j) = max{E(i, j−1), V(i, j−1)gapopen} −gapextend, F(i, j) = max{F(i−1, j), V(i−1, j)gapopen} −gapextend, G(i, j) = V(i−1, j−1) + score(S1(i), S2(j)).

2.5 Alignment Methods 19 Definition. The score of a global alignment given affine gap costs is the score obtained af- ter having aligned both sequencesS1, S2 completely according to the equations given above.

The aim of global alignment [Needleman and Wunsch, 1970] is to align the whole input sequences S1, S2, and therefore each gap position is punished based on the assigned gap

costs. For local alignment [Smith and Waterman, 1981], the aim is to find a local, highly similar region. Everything surrounding this region is ignored, and match/mismatch scores as well as gap costs apply only for positions in the corresponding part of the alignment. This means that the initialization as well as any other value computed in the recurrences is never below 0. So-called freeshift alignments are a special case. Here, it is assumed that a long part of the two sequences is similar, but can occur at different positions of the whole sequences. Therefore, leading and trailing gaps are free, and in between the mechanisms of global alignment are applied. Intuitively, this means that the two sequences can be slided along each other (or shifted) without costs.

Having computed the optimal score, one chooses one or more alignments that achieve this score by following the path that is given by the choices in the maximum operations backwards to the beginning of the recursion, as each choice defines either a match/mismatch between two residues or an insertion of a gap symbol in one of the two aligned sequences. Multiple optimal alignments are possible when the maximum operations can choose from equal values.

Alignments can usually be computed quite efficiently by a relatively simple technique called dynamic programming. Here, one makes use of the fact that many results in the recursions are computed over and over again in different instances and can thus be com- puted only once and then stored for efficiency. Then, as can be seen for the equations shown above, in a naive implementation the effort for alignment computation with affine gap costs is reduced to filling matricesE, F, G, and V, where thei and j in the equations correspond to the rows and columns of these matrices. The details of this technique are described in most of the available bioinformatics textbooks, including [Gusfield, 1997], and will not be discussed here.

Further, so far we have only introduced pairwise alignments, i.e. alignments between two protein instances. So-called multiple alignments, alignments between more than two proteins, require more elaborate techniques, e.g. to determine the order by which instances are incorporated in an incrementally growing alignment and so forth. In fact, the exact multiple alignment problem for the so-called sum of pairs-score has even been shown to be NP-complete [Wang and Jiang, 1994]. Prominent software tools using heuristics are ClustalW [Thompson et al., 1994] and T-Coffee [Notredame et al., 2000]. Again, the cor- responding techniques are well-documented in the literature and will not be discussed here.