ipl-logo

Pt1420 Unit 4 Test Paper

784 Words4 Pages

1. At every step we compare S[x+i] with P[i] and move forward only if they are equal. This is depicted, at the beginning of the run as show below x 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 S A T C A T C G A T C A T G A T C G A T C G A P A T C G i 0 1 2 3 2. In the next step we move forward by comparing successive characters of pattern P to "parallel" characters of genome String S, moving from one character to the next if they match. 3. However, in the fourth step, we get genome string S[3] as a space and the pattern P[3] = 'G', which is clearly a mismatch. And instead of beginning the search again at S[1], we make a note that no 'A' occurs in between positions 0 and 3 in S except at 0.Having checked all those characters in the …show more content…

Now again there is a discrepancy at P[3] (S[14]), but again prior to the end of the current partial match, we passed on "A" which could be the beginning of a new match, so we simply reset x= 14, i = 1 and continue matching the current character. x 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 S A T C A T C G A T C A T G A T C G A T C G A P A T C G i 0 1 2 3 7. This time we are able to complete the match "ATCG" whose first character is S[14]. Here we again increase the count by 1 and also append position x = 14 in the list to record position of occurrences of matches. Now we begin searching at the next character of genome string S: x = 18, reset i = 0 8. Once again we immediately hit upon a match "ATCG" at x = 18, where we increment the count by 1 and append position x = 18 into the list.Next set x = 22 and reset i = 0 to continue searching. Search fails immediately, however, the string terminates at x = 22. x 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 S A T C A T C G A T C A T G A T C G A T C G

More about Pt1420 Unit 4 Test Paper

Open Document