Joseph-Dixon1 / qbb2023-answers

0 stars 0 forks source link

Week 3 Feedback #4

Open dtaylo95 opened 10 months ago

dtaylo95 commented 10 months ago

Python script that performs alignment based on user input

6.75/8

Exercise Points Possible Grade
Read in inputs 2 2
Initialize matrices 1 0.75
Populate matrices 2 1.5
Perform traceback 2 1.5
Write alignment to file 0.5 0.5
Print out alignment score and number of gaps in each sequence 0.5 0.5

There are few small issues with your approach:

  1. When you initialize your traceback matrix, you also want to fill in the first row and column, like what you did with the F- matrix. For the traceback matrix, the first row should all be 'h' and the first column should be 'v'. This is to handle any leading gaps that might be in the alignment
  2. You're currently filling in the traceback matrix after you fill in the F-matrix. You're also filling it in based on which adjacent cell (upper left, left, or above) has the highest value. This is not correct. First, it's much faster to fill in the traceback matrix as you fill in the F-matrix. Each cell in the F-matrix has a corresponding cell in the traceback matrix, so as you're filling in the F-matrix you can also just fill in your traceback matrix with whichever of the three values (d, h, or v) you chose to fill in in the F-matrix. This leads to the second issue, which is that you shouldn't just be picking which of the three adjacent cells (upper left, left, or above) has the highest value. Rather, d, h, and v are all defined based on the adjacent cell AND either a match score or gap penalty. You're doing this fine when you fill in the F-matrix. So just figure out which value (d, h, or v) is largest, and fill in the corresponding cell of the traceback matrix with that choice. You should be able to just add a couple of lines to this section of the code to fill in the traceback matrix at the same time as the F-matrix. https://github.com/Joseph-Dixon1/qbb2023-answers/blob/08de3f76a91ccd63a6390d9fcf2f61b373ab90d6/Week3HW/Week3Script.py#L35-L41
  3. When you're doing traceback itself, check your while condition: https://github.com/Joseph-Dixon1/qbb2023-answers/blob/08de3f76a91ccd63a6390d9fcf2f61b373ab90d6/Week3HW/Week3Script.py#L84 What happens when row or column reaches 0 before the other does? Remember, we want to do traceback until we reach [0,0].

DNA alignment file

0.5/0.5

AA alignment file

0.5/0.5

README.md with alignment score and number of gaps in each sequence for each alignment

1/1

Total: 8.75/10

I know there's a lot of feedback up above, but this is actually almost perfect. For the most part, you actually did too much. Feel free to address these issues and resubmit for full credit. Great work!

Joseph-Dixon1 commented 8 months ago

Uploaded

dtaylo95 commented 8 months ago

Great work! Regraded and updated the rubric above. Feel free to address the issues and resubmit.