# hw1sol - BCB 567/CprE 548 Bioinformatics I Fall 2007...

This preview shows pages 1–2. Sign up to view the full content.

BCB 567/CprE 548 Bioinformatics I Fall 2007 Homework 1 Solutions 1. 2. 3. Run the algorithm for Flling in the dynamic programming table, keeping track of exactly two rows, as per the method described in class. In addition, keep track of the current maximum, max , and the coordinates of the cell that corresponds to the maximum: r and t . To update max,r, and t , after calculating S [ i,j ], we must make the following check: if S [ i,j ] > max then { max S [ i,j ]; r i ; j t } . Once we have Flled in the entire table, ( r,t ) will be the coordinates of the maximum value in the table. To Fnd the starting cell of the best local alignment, we will run the dynamic programming algorithm backwards, keeping track of exactly two rows at a time, on the subtable S [0 ...r, 0 ...t ]. This means that we initialize the last row an last column and use the reverse recursion, as described in class. We stop Flling the table when S [ i,j ] = max . We have now found r , t , i , and j . The substrings A [ i + 1 ,r ] and B [ j + 1 ,t ] are aligned in the optimal local alignment. Because we only store the strings, two rows of the dynamic programming table at a time, and a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

hw1sol - BCB 567/CprE 548 Bioinformatics I Fall 2007...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online