Project 6: Global Sequence Alignment
Start: Tuesday, 11/12; Due: Monday, 11/25, by the start of class
Overview
This assignment is taken from the project here. The assignment is Global Sequence Alignment. Be sure to read the comments below for some clarifications and suggestions.
Getting Started
You should get started by reading through Global Sequence Alignment and work through one or two examples by hand. In other words, come up with some short DNA sequences and compute their edit distance using the table method illustrated in the write-up for the sequences AACAGTTACC and TAAGGTCA. You do not have to hand this in. Note that one of the formulas includes 0/1
; this does not mean the division of 0 by 1, but rather means either 0 or 1 depending on a condition listed earlier.
Tasks
Your job is to do the first two tasks in Global Sequence Alignment: A recursive solution, and A dynamic programming approach (if you have time, you can do Recovering the alignment itself for bonus points). We are going to have you create the code from scratch. However, in order to enforce some uniformity (which will make the grading easier), we request that you do certain things:
- The file in which you solve the problem (recursively and by dynamic programming) should be called
"EditDistance.py"
. - The file in which you do testing should be called
test.py
. Your test should consists of a few examples varifying the correctness of your recursive solution and your dynamic programming solution.
Below is an example of how the EditDistance.py
output should be given an input. You can also do testing using the input/output example from the Global Sequence Alignment page.
Edit distance = 7 A T 1 A A 0 C - 2 A A 0 G G 0 T G 1 T T 0 A - 2 C C 0 C A 1
Required Methods
Here I give you a suggestion of the methods you should create inEditDistance.py
""
# @param x a non-null String # @param y a non-null String # @return the the edit distance between x and y # # This procedure should use a recursive, not dynamic # programming, approach to compute the edit distance recursiveEditDistance(x, y) # @param x a non-null String # @param y a non-null String # @return the the edit distance between x and y # # This procedure should dynamic programming to compute the edit distance editDistance(x, y)
Gradesheet
Code (50 pts)
recursiveEditDistance
(25 pts)editDistance
(25 pts)
Comments and Style (10 pts)
- Adequate comments (5 pts)
- Choice of names, indentation, other style issues (5 pts)
Testing
- All exception cases and at lease two normal cases were tested in
test.py
for each function; comments were given labeling each test case (10 pts).
Total: 70 pts
Submission
You should submit EditDistance.py
(with recursiveEditDistance
and editDistance
function) and test.py
via Moodle.