-
Notifications
You must be signed in to change notification settings - Fork 16
/
Arslan-Egecioglu-Pevzner.html
838 lines (751 loc) · 27.5 KB
/
Arslan-Egecioglu-Pevzner.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
<!--
University of Freiburg WS 2017/2018
Chair for Bioinformatics
Supervisor: Martin Raden
Authors: Alexander Mattheis, Martin Raden
-->
<div id="algorithm_description">
<div class="description">
The dynamic programming approach by
<a href="https://doi.org/10.1093/bioinformatics/17.4.327">
Abdullah N. Arslan, Ömer Eğecioğlu and Pavel A. Pevzner (2001)</a>
computes the best normalized local alignments of two sequences.
It identifies the local alignment that is best preserved with respect to the length of the aligned subsequences.
<br />
<br />
The normalized local alignment algorithm tries
to find the alignment $\mathcal{A}$ of two sequences
with the highest normalized score
$$\quad\lambda^* = ns(\mathcal{A}) = \frac{s(\mathcal{A})}{[\![\mathcal{A}]\!] + L}$$
where $[\![\mathcal{A}]\!]$ is the length
of the aligned subsequences (excluding gaps) and $L$ is a parameter
to control the length-dependence of the normalized similarity score.
<br />
<br />
To find a normalized local alignment,
the fractional programming algorithm by
<a href="https://doi.org/10.1287/mnsc.13.7.492">Werner Dinkelbach (1967)</a>
is used in concert with the 'standard' local alignment algorithm by
<a href="https://doi.org/10.1016/0022-2836(81)90087-5">Smith and Waterman (1981)</a>.
Fractional programming is a machine learning approach
to solve problems in which the objective function $ns(\mathcal{A})$ is a fraction as given above.
<br />
<br />
Given a similarity scoring function $s(a_i,b_j)$ for two sequences $a$ and $b$.
To find $\lambda^*$ and the according best normalized alignment $\mathcal{A}$,
the <a href="https://doi.org/10.1016/0022-2836(81)90087-5">Smith-Waterman</a>
algorithm is executed iteratively using an iteration-specific scoring-function $s^r$ (see below).
In iteration $r>0$, $s^r$ depends on the $\lambda^{r-1}$ estimate of the previous iteration,
where $\lambda^{0} = 0$.
Given this, the best local alignment $\mathcal{A}^r$ with score $S^r$ using $s^r$ is identified and
the new lambda estimate $\lambda^r$ is computed by $\lambda^r= S^r/([\![\mathcal{A}^r]\!]+L)$.
This is iterated until $\lambda$ converges or a certain number of iterations is exceeded.
<br />
<br />
For a given input, the according tables and scoring functions
are shown for up to 5 iterations (or convergence) along with a list
of according optimal local alignments.
On table cell selection, optimal traceback options are shown.
</div>
<div class="picture">
<img src="Arslan-Egecioglu-Pevzner-120x90.png" />
</div>
</div>
<h1>Input:</h1>
<div id="algorithm_input">
<div class="row">
<div class="colW100"><label>Sequence $a$:</label></div>
<div class="colW400"><input class="sequence" data-bind="value: input.sequence1" id="sequence_1" placeholder="EXAMPLE 'ATC'"
title="Allowed are A-Z and '-'." type="text"></div>
</div>
<div class="row">
<div class="colW100"><label>Sequence $b$:</label></div>
<div class="colW400"><input class="sequence" data-bind="value: input.sequence2" id="sequence_2" placeholder="EXAMPLE 'AGTC'"
title="Allowed are A-Z and '-'." type="text"></div>
</div>
<div class="row">
<div class="colW100"><label>Scoring in $s$:</label></div>
<div class="colW400">
<span class="group"> <!-- Microsoft Browsers will fallback on text-fields using following input type -->
Match <input class="fx_parameter" data-bind="value: input.match" id="match" type="number">
Mismatch <input class="fx_parameter" data-bind="value: input.mismatch" id="mismatch" type="number">
Gap <input class="fx_parameter" data-bind="value: input.gap" id="gap" type="number">
</span>
<div class="group_hint">
<b>Hint:</b> <br />
For similarity maximization, <br /> match scores should be positive and all other scores lower.
</div>
</div>
</div>
<div class="row">
<div class="colW100"><label>Length-scal. $L$:</label></div>
<div class="colW600"><input class="fx_parameter" data-bind="value: input.length" id="length" type="number"></div>
</div>
<div class="row">
<div class="colW100">
<br />
<br />
<label>
Recursion of
<br />iteration $r=1$:
</label>
</div>
<div class="colW600">
<span data-bind="text: $root.input.formula"></span>
<br />
<br />
with <br />
<span data-bind="text: $root.input.subFormula"></span>
<br />
<br />
where $\lambda^0 = 0$
<br />
<br />
</div>
</div>
</div>
<!-- Dynamic creation of iterations didn't work,
because of several problems with MathJax,
ObservableArrays of arrays and runtime for drawing. -->
<h1>Output:</h1>
<div id="algorithm_output">
<!-- ko if: $root.output.matrix5().length > 0 -->
<div class="iteration">
<h2>Iteration 5</h2>
<div class="output">
<div class="main_output">
<table class="calculation_5">
<thead>
<tr>
<th>$D^5$</th>
<th></th>
<!-- ko foreach: $root.input.sequence2 -->
<th data-bind="drawChar: [$data, $index()+1]"></th>
<!-- /ko -->
</tr>
</thead>
<tbody>
<!-- ko foreach: $root.output.matrix5 -->
<tr>
<!-- ko if: $index() == 0 -->
<th></th>
<!-- /ko -->
<!-- ko if: $index() > 0 -->
<th data-bind="drawChar: [$root.input.sequence1()[$index()-1], $index()]"></th>
<!-- /ko -->
<!-- ko foreach: $root.output.matrix5[0] -->
<td class="selectable_entry" data-bind="text: $root.output.matrix5()[$parentContext.$index()][$index()]"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="parameters">
Score $s(\mathcal{A}^5)$:
<span data-bind="text: $root.output.score5"></span> <br />
Length $[\![\mathcal{A}^5]\!]$:
<span data-bind="text: $root.output.length5"></span> <br />
Normalized score $\lambda^5$:
<span data-bind="text: $root.output.lambda5"></span> <br />
</div>
</div>
<div class="outcome">
<div class ="ancillary_output">
<table class="results_header">
<thead>
<tr>
<th>
Results <br />
<small>
The result for which the normalized score was computed is marked blue.
</small>
</th>
</tr>
</thead>
</table>
<div class="results_with_scrollbar">
<table class="results">
<tbody>
<!-- ko foreach: $root.output.alignments5 -->
<!-- ko if: $index() < 10 -->
<!-- ko if: $index() == $root.output.alignmentNumber5() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start selected">
<code data-bind="text: $root.output.alignments5()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry selected">
<code data-bind="text: $root.output.alignments5()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $index() != $root.output.alignmentNumber5() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start">
<code data-bind="text: $root.output.alignments5()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry">
<code data-bind="text: $root.output.alignments5()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments5()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</tbody>
</table>
</div>
<table class="results_footer">
<tr>
<th>
<small>
<!-- ko if: $root.output.moreTracebacks5 -->
<b>Hint:</b> Only the first ten results are computed. <br />
<!-- /ko -->
<!-- ko if: $root.output.alignments5().length > 1 && $root.output.maxNumberIterations -->
<b>Hint:</b> Not marked alignments aren't used and only listed for completeness.
<!-- /ko -->
</small>
</th>
</tr>
</table>
</div>
</div>
</div>
<!-- /ko -->
<!-- ko if: $root.output.matrix4().length > 0 -->
<div class="iteration">
<h2>Iteration 4</h2>
<div class="output">
<div class="main_output">
<table class="calculation_4">
<thead>
<tr>
<th>$D^4$</th>
<th></th>
<!-- ko foreach: $root.input.sequence2 -->
<th data-bind="drawChar: [$data, $index()+1]"></th>
<!-- /ko -->
</tr>
</thead>
<tbody>
<!-- ko foreach: $root.output.matrix4 -->
<tr>
<!-- ko if: $index() == 0 -->
<th></th>
<!-- /ko -->
<!-- ko if: $index() > 0 -->
<th data-bind="drawChar: [$root.input.sequence1()[$index()-1], $index()]"></th>
<!-- /ko -->
<!-- ko foreach: $root.output.matrix4[0] -->
<td class="selectable_entry" data-bind="text: $root.output.matrix4()[$parentContext.$index()][$index()]"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="parameters">
Score $s(\mathcal{A}^4)$:
<span data-bind="text: $root.output.score4"></span> <br />
Length $[\![\mathcal{A}^4]\!]$:
<span data-bind="text: $root.output.length4"></span> <br />
Normalized score $\lambda^4$:
<span data-bind="text: $root.output.lambda4"></span> <br />
</div>
</div>
<div class="outcome">
<div class ="ancillary_output">
<table class="results_header">
<thead>
<tr>
<th>
Results <br />
<small>
The result for which the normalized score was computed is marked blue.
</small>
</th>
</tr>
</thead>
</table>
<div class="results_with_scrollbar">
<table class="results">
<tbody>
<!-- ko foreach: $root.output.alignments4 -->
<!-- ko if: $index() < 10 -->
<!-- ko if: $index() == $root.output.alignmentNumber4() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start selected">
<code data-bind="text: $root.output.alignments4()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry selected">
<code data-bind="text: $root.output.alignments4()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $index() != $root.output.alignmentNumber4() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start">
<code data-bind="text: $root.output.alignments4()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry">
<code data-bind="text: $root.output.alignments4()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments4()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</tbody>
</table>
</div>
<table class="results_footer">
<tr>
<th>
<small>
<!-- ko if: $root.output.moreTracebacks4 -->
<b>Hint:</b> Only the first ten results are computed. <br />
<!-- /ko -->
<!-- ko if: $root.output.alignments4().length > 1 && $root.output.alignments5().length > 0 -->
<b>Hint:</b> Not marked alignments aren't used and only listed for completeness.
<!-- /ko -->
</small>
</th>
</tr>
</table>
</div>
</div>
</div>
<!-- /ko -->
<!-- ko if: $root.output.matrix3().length > 0 -->
<div class="iteration">
<h2>Iteration 3</h2>
<div class="output">
<div class="main_output">
<table class="calculation_3">
<thead>
<tr>
<th>$D^3$</th>
<th></th>
<!-- ko foreach: $root.input.sequence2 -->
<th data-bind="drawChar: [$data, $index()+1]"></th>
<!-- /ko -->
</tr>
</thead>
<tbody>
<!-- ko foreach: $root.output.matrix3 -->
<tr>
<!-- ko if: $index() == 0 -->
<th></th>
<!-- /ko -->
<!-- ko if: $index() > 0 -->
<th data-bind="drawChar: [$root.input.sequence1()[$index()-1], $index()]"></th>
<!-- /ko -->
<!-- ko foreach: $root.output.matrix3[0] -->
<td class="selectable_entry" data-bind="text: $root.output.matrix3()[$parentContext.$index()][$index()]"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="parameters">
Score $s(\mathcal{A}^3)$:
<span data-bind="text: $root.output.score3"></span> <br />
Length $[\![\mathcal{A}^3]\!]$:
<span data-bind="text: $root.output.length3"></span> <br />
Normalized score $\lambda^3$:
<span data-bind="text: $root.output.lambda3"></span> <br />
</div>
</div>
<div class="outcome">
<div class ="ancillary_output">
<table class="results_header">
<thead>
<tr>
<th>
Results <br />
<small>
The result for which the normalized score was computed is marked blue.
</small>
</th>
</tr>
</thead>
</table>
<div class="results_with_scrollbar">
<table class="results">
<tbody>
<!-- ko foreach: $root.output.alignments3 -->
<!-- ko if: $index() < 10 -->
<!-- ko if: $index() == $root.output.alignmentNumber3() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start selected">
<code data-bind="text: $root.output.alignments3()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry selected">
<code data-bind="text: $root.output.alignments3()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $index() != $root.output.alignmentNumber3() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start">
<code data-bind="text: $root.output.alignments3()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry">
<code data-bind="text: $root.output.alignments3()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments3()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</tbody>
</table>
</div>
<table class="results_footer">
<tr>
<th>
<small>
<!-- ko if: $root.output.moreTracebacks3 -->
<b>Hint:</b> Only the first ten results are computed. <br />
<!-- /ko -->
<!-- ko if: $root.output.alignments3().length > 1 && $root.output.alignments4().length > 0 -->
<b>Hint:</b> Not marked alignments aren't used and only listed for completeness.
<!-- /ko -->
</small>
</th>
</tr>
</table>
</div>
</div>
</div>
<!-- /ko -->
<!-- ko if: $root.output.matrix2().length > 0 -->
<div class="iteration">
<h2>Iteration 2</h2>
<div class="output">
<div class="main_output">
<table class="calculation_2">
<thead>
<tr>
<th>$D^2$</th>
<th></th>
<!-- ko foreach: $root.input.sequence2 -->
<th data-bind="drawChar: [$data, $index()+1]"></th>
<!-- /ko -->
</tr>
</thead>
<tbody>
<!-- ko foreach: $root.output.matrix2 -->
<tr>
<!-- ko if: $index() == 0 -->
<th></th>
<!-- /ko -->
<!-- ko if: $index() > 0 -->
<th data-bind="drawChar: [$root.input.sequence1()[$index()-1], $index()]"></th>
<!-- /ko -->
<!-- ko foreach: $root.output.matrix2[0] -->
<td class="selectable_entry" data-bind="text: $root.output.matrix2()[$parentContext.$index()][$index()]"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="parameters">
Score $s(\mathcal{A}^2)$:
<span data-bind="text: $root.output.score2"></span> <br />
Length $[\![\mathcal{A}^2]\!]$:
<span data-bind="text: $root.output.length2"></span> <br />
Normalized score $\lambda^2$:
<span data-bind="text: $root.output.lambda2"></span> <br />
</div>
</div>
<div class="outcome">
<div class ="ancillary_output">
<table class="results_header">
<thead>
<tr>
<th>
Results <br />
<small>
The result for which the normalized score was computed is marked blue.
</small>
</th>
</tr>
</thead>
</table>
<div class="results_with_scrollbar">
<table class="results">
<tbody>
<!-- ko foreach: $root.output.alignments2 -->
<!-- ko if: $index() < 10 -->
<!-- ko if: $index() == $root.output.alignmentNumber2() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start selected">
<code data-bind="text: $root.output.alignments2()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry selected">
<code data-bind="text: $root.output.alignments2()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $index() != $root.output.alignmentNumber2() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start">
<code data-bind="text: $root.output.alignments2()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry">
<code data-bind="text: $root.output.alignments2()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments2()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</tbody>
</table>
</div>
<table class="results_footer">
<tr>
<th>
<small>
<!-- ko if: $root.output.moreTracebacks2 -->
<b>Hint:</b> Only the first ten results are computed. <br />
<!-- /ko -->
<!-- ko if: $root.output.alignments2().length > 1 && $root.output.alignments3().length > 0 -->
<b>Hint:</b> Not marked alignments aren't used and only listed for completeness.
<!-- /ko -->
</small>
</th>
</tr>
</table>
</div>
</div>
</div>
<!-- /ko -->
<!-- ko if: $root.output.matrix1().length > 0 -->
<div class="iteration">
<h2>Iteration 1</h2>
<div class="output">
<div class="main_output">
<table class="calculation_1">
<thead>
<tr>
<th>$D^1$</th>
<th></th>
<!-- ko foreach: $root.input.sequence2 -->
<th data-bind="drawChar: [$data, $index()+1]"></th>
<!-- /ko -->
</tr>
</thead>
<tbody>
<!-- ko foreach: $root.output.matrix1 -->
<tr>
<!-- ko if: $index() == 0 -->
<th></th>
<!-- /ko -->
<!-- ko if: $index() > 0 -->
<th data-bind="drawChar: [$root.input.sequence1()[$index()-1], $index()]"></th>
<!-- /ko -->
<!-- ko foreach: $root.output.matrix1[0] -->
<td class="selectable_entry" data-bind="text: $root.output.matrix1()[$parentContext.$index()][$index()]"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="parameters">
Score $s(\mathcal{A}^1)$:
<span data-bind="text: $root.output.score1"></span> <br />
Length $[\![\mathcal{A}^1]\!]$:
<span data-bind="text: $root.output.length1"></span> <br />
Normalized score $\lambda^1$:
<span data-bind="text: $root.output.lambda1"></span> <br />
</div>
</div>
<div class="outcome">
<div class ="ancillary_output">
<table class="results_header">
<thead>
<tr>
<th>
Results <br />
<small>
The result for which the normalized score was computed is marked blue.
</small>
</th>
</tr>
</thead>
</table>
<div class="results_with_scrollbar">
<table class="results">
<tbody>
<!-- ko foreach: $root.output.alignments1 -->
<!-- ko if: $index() < 10 -->
<!-- ko if: $index() == $root.output.alignmentNumber1() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start selected">
<code data-bind="text: $root.output.alignments1()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry selected">
<code data-bind="text: $root.output.alignments1()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $index() != $root.output.alignmentNumber1() -->
<!-- ko if: $index() == 0 -->
<tr>
<td class="entry entry_start">
<code data-bind="text: $root.output.alignments1()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- ko if: $index() != 0 -->
<tr>
<td class="entry">
<code data-bind="text: $root.output.alignments1()[$index()][0]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][1]"></code> <br />
<code data-bind="text: $root.output.alignments1()[$index()][2]"></code>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</tbody>
</table>
</div>
<table class="results_footer">
<tr>
<th>
<small>
<!-- ko if: $root.output.moreTracebacks1 -->
<b>Hint:</b> Only the first ten results are computed. <br />
<!-- /ko -->
<!-- ko if: $root.output.alignments1().length > 1 && $root.output.alignments2().length > 0 -->
<b>Hint:</b> Not marked alignments aren't used and only listed for completeness.
<!-- /ko -->
</small>
</th>
</tr>
</table>
</div>
</div>
</div>
<!-- /ko -->
<div class="iteration_footer">
<b>Hints:</b> <br />
<!-- ko if: $root.output.maxNumberIterations -->
Only first five iterations are computed. <br />
<!-- /ko -->
Scores $s(\mathcal{A})$ and normalized scores $\lambda$ are rounded to four digits.
</div>
<div class="download_area">
<!-- ko if: $root.output.matrix5().length > 0 -->
<a class="table_download_5" href="#">Download Iteration 5 Table</a> <br />
<!-- /ko -->
<!-- ko if: $root.output.matrix4().length > 0 -->
<a class="table_download_4" href="#">Download Iteration 4 Table</a> <br />
<!-- /ko -->
<!-- ko if: $root.output.matrix3().length > 0 -->
<a class="table_download_3" href="#">Download Iteration 3 Table</a> <br />
<!-- /ko -->
<!-- ko if: $root.output.matrix2().length > 0 -->
<a class="table_download_2" href="#">Download Iteration 2 Table</a> <br />
<!-- /ko -->
<!-- ko if: $root.output.matrix1().length > 0 -->
<a class="table_download_1" href="#">Download Iteration 1 Table</a>
<!-- /ko -->
</div>
</div>