DNA
RNA
PROTEIN
One gene = one protein Four bases: ATCG 3 bases = 1 amino acid N amino acids = one protein ATTTACAGATTACCC ATT TAC AGA TTA CCC Lys Xxx Yyy Zzz Ccc
ATCGTATACCCGAAT
Human genome
AACGTATTCCCAT
Fruit fly genome
ATCGTATACCCGAAT AACGTATTCCC--AT
Gaps and Mismatches
Needleman-Wunsch Algorithm
A A G T T C A G
C
T
T
T
C
A
Match +m Mismatch -s Gap -d
Needleman-Wunsch Algorithm
A G T T C A G
A C T T T C A 0 -1 -2 -3 -4 -5 -6 -7 -1 4 3 -2 3 3 -3 -4 -5 -6 -7
Match +4 Mismatch -1 Gap -1
Needleman-Wunsch Algorithm
A G T T C A G
0 -1 -2 -3 -4 -5 -6 -7
A C T -1 -2 -3 4 3 2 3 3 2 2 2 7 1 1 6 0 5 5 -1 4 4 -2 3 3
T -4 1 1 6 11 10 9 8
T -5 0 0 5 10 10 9 8
C -6 -1 -1 4 9 14 13 12
A -7 -2 -2 3 8 13 18 17
Match +4 Mismatch -1 Gap -1
Needleman-Wunsch Algorithm
A G T T C A G
0 -1 -2 -3 -4 -5 -6 -7
A C T -1 -2 -3 4 3 2 3 3 2 2 2 7 1 1 6 0 5 5 -1 4 4 -2 3 3
T -4 1 1 6 11 10 9 8
T -5 0 0 5 10 10 9 8
C -6 -1 -1 4 9 14 13 12
A -7 -2 -2 3 8 13 18 17
Match +4 Mismatch -1 Gap -1
Needleman-Wunsch Algorithm
A G T T C A G
0 -1 -2 -3 -4 -5 -6 -7
A C T -1 -2 -3 4 3 2 3 3 2 2 2 7 1 1 6 0 5 5 -1 4 4 -2 3 3
T -4 1 1 6 11 10 9 8
T -5 0 0 5 10 10 9 8
C -6 -1 -1 4 9 14 13 12
A -7 -2 -2 3 8 13 18 17
Match +4 Mismatch -1 Gap -1
ACTTTCAAGTT-CAG ACTTTCAAGTTC-AG
Genetics Sequence of nucleic acids Matching acids Mismatch Gaps
Source Code Revisions Sequence of source lines unmodified lines added or modified lines added or deleted lines
Double Needleman-Wunsch 1 st for line alignments 2 nd for detecting modifications
rev. 1.1 1 int i; 2 char * ch; 3 for (i=1;i<10;i++)
Rev. 1.2 1 int i; 2 int N; 3 char * ch; 4 for (i=1;i<10;i++)
rev. 1.1 1 int i;
Rev. 1.2 1 int i; 2 int N; 3 char * ch; 4 for (i=1;i<10;i++)
added
2 char * ch; 3 for (i=1;i<10;i++) rev. 1.1 1 int i; 2 char * ch;
modified added
3 for (i=1;i<10;i++)
Rev. 1.2 1 int i; 2 int N; 3 char * ch; 4 for (i=1;i<10;i++)
f
o
r
(
i
n
t
j
=
0
;
j
<
7
---------------------------------------------------------------|
0
-1
-2
-3
-4
-5
-6
-7
-8
-9 -10 -11 -12 -13 -14 -15
f|
-1
4
3
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9 -10
o|
-2
3
8
7
6
5
4
3
2
1
0
-1
-2
-3
-4
-5
r|
-3
2
7
12
11
10
9
8
7
6
5
4
3
2
1
0
(|
-4
1
6
11
16
15
14
13
12
11
10
9
8
7
6
5
j|
-5
0
5
10
15
15
14
13
12
16
15
14
13
12
11
10
=|
-6
-1
4
9
14
14
14
13
12
15
20
19
18
17
16
15
0|
-7
-2
3
8
13
13
13
13
12
14
19
24
23
22
21
20
;|
-8
-3
2
7
12
12
12
12
12
13
18
23
28
27
26
25
j|
-9
-4
1
6
11
11
11
11
11
16
17
22
27
32
31
30
<| -10
-5
0
5
10
10
10
10
10
15
16
21
26
31
36
35
7| -11
-6
-1
4
9
9
9
9
9
14
15
20
25
30
35
40
Actual score: 40
Theoretical maximum: 40
Solution goodness 1.00
for(int j=0;j<7 for(____j=0;j<7
Solution: Solution:S2 S2isisaasubset subsetofofS1 S1
f
o
r
(
i
n
t
j
=
0
;
j
<
7
---------------------------------------------------------------|
0
-1
-2
-3
-4
-5
-6
-7
-8
-9 -10 -11 -12 -13 -14 -15
f|
-1
4
3
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9 -10
o|
-2
3
8
7
6
5
4
3
2
1
0
-1
-2
-3
-4
-5
r|
-3
2
7
12
11
10
9
8
7
6
5
4
3
2
1
0
(|
-4
1
6
11
16
15
14
13
12
11
10
9
8
7
6
5
j|
-5
0
5
10
15
15
14
13
12
16
15
14
13
12
11
10
=|
-6
-1
4
9
14
14
14
13
12
15
20
19
18
17
16
15
0|
-7
-2
3
8
13
13
13
13
12
14
19
24
23
22
21
20
;|
-8
-3
2
7
12
12
12
12
12
13
18
23
28
27
26
25
j|
-9
-4
1
6
11
11
11
11
11
16
17
22
27
32
31
30
<| -10
-5
0
5
10
10
10
10
10
15
16
21
26
31
36
35
=| -11
-6
-1
4
9
9
9
9
9
14
19
20
25
30
35
35
5| -12
-7
-2
3
8
8
8
8
8
13
18
19
24
29
34
34
Actual score: 34
Theoretical maximum: 45
Solution goodness 0.76
for(int j=0;j<_7 for(____j=0;j<=5
Gaps Gapsininboth bothlines linesAND ANDmismatch mismatch
rev. A 1 char * ch; 2 for (i=1;i<10;i++)
rev. B added 1 int i; 2 char * ch; 3 for (i=1;i<10;i++)
rev. A 1 int i; deleted 2 char * ch; 3 for (i=1;i<10;i++) 4
rev. B 1 char * ch; 2 for (i=1;i<10;i++)
rev. A 1 char * ch; 2 for (int i=1;i<10;i++)
rev. B added 1 int i; 2 char * ch; 3 for (i=1;i<10;i++) modified
E.Bair, et.al. Computational Genomics , Stanford University W.H.Press et.al. Numerical Recipes in C++ , Cambridge University Press J.Neider et.al. OpenGL Programming Guide (Red Book) , AddisonWesley X.y OpenGL Tutorial , www.videotutorialsrock.com
This document was created with Win2PDF available at http://www.daneprairie.com. The unregistered version of Win2PDF is for evaluation or non-commercial use only.