Matlab Code:

hw4.m
HW4 Matlab script
alignGapOpenExt.m
Perform sequence alignment with gap opening and extension

Alignment Score Matrices:

Alignment scores with fixed gap penalties:
------------------------------------------
        1003         686         361         905          92          59
         686        1002         359         718          68          32
         361         359         938         368          68          21
         905         718         368        1012          68          52
          92          68          68          68         939          90
          59          32          21          52          90         963

Alignment scores with gap opening and extension:
------------------------------------------------
        1003         686         390         905         133          95
         686        1002         388         718         105          82
         390         388         938         391         133          73
         905         718         391        1012         118          79
         133         105         133         118         939         116
          95          82          73          79         116         963

Question 6: Analyzing alignments

The alignments can be seen here. As we can see, the two alignments for 1MBC and 1YMC are identical, whereas the two alignments for 1LHS and 1LH1 are quite different from one another, with the gap opening and extension method producing long stretches of gaps, and scoring higher than the fixed gap penalty method.

The reason why the first two alignments are so similar, while the latter two are so different, can be found in either alignment score matrix above. Note that 1MBC and 1YMC score very highly against one another (905), suggesting a high degree of similarity between the two sequences. Since the two sequences are so similar, it is unlikely that we will need mutliple insertions and deletions to successfully establish a high degree of identity between them. Therefore, a smaller the gap extension penalty is unlikely to make gaps more attractive to the alignment of 1MBC and 1YMC.

On the other hand, the alignment score for 1LHS vs. 1LH1 is relatively low (32), suggesting that the sequences are not very similar. We are likely to need multiple insertions and deletions in order locate regions where the two sequences are somewhat similar, and improve the overall alignment. The gap opening and extension method allows us to both introduce more gaps into the alignment and make use of the fact that gaps tend to cluster together, by using a large gap opening penalty and a much less sharp gap extension penalty. The result is an alignment with long contiguous gap regions, and a larger overall score.