-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexercise_sheet5.py
64 lines (52 loc) · 1.76 KB
/
exercise_sheet5.py
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
from typing import List, Tuple, Dict
########################################################
############## Programming tasks #######################
########################################################
def sw_init(seq1, seq2):
"""
Exercise 3 a
Implement the function sw_init() which takes two sequences S1 and S2 and
creates the Smith-Waterman matrix and initiates all the matrix values
with zeroes. Hereby S1 should be represented by the rows and S2 by
the columns.
"""
return None
def sw_forward(seq1, seq2, scoring: Dict[str, int]):
"""
Exercise 3 b
Implement the function sw_forward() which takes the two sequences S1 and
S2 and the scoring function and output the complete matrix filled with
the Smith-Waterman approach.
"""
match, mismatch, gap = (
scoring["match"],
scoring["mismatch"],
scoring["gap_introduction"],
)
return None
def previous_cells(
seq1, seq2, scoring, sw_matrix, cell: Tuple[int, int]
) -> List[Tuple[int, int]]:
"""
Exercise 3 c
Implement the function previous_cells() which takes two sequences S1 and
S2, scoring function, the filled in recursion matrix from the step c) and
the cell coordinates (row, column). The function should output the list
of all possible previous cells.
"""
return None
def build_all_traceback_paths(
seq1, seq2, scoring, sw_matrix
) -> List[List[Tuple[int, int]]]:
"""
Exercise 3 d
Implement the function which builds all possible traceback paths.
"""
return None
def build_alignment(seq1, seq2, traceback_path) -> Tuple[str, str]:
"""
Exercise 3 e
Implement the function build_alignment() which takes two sequences and
outputs the alignment.
"""
return None