Question: matlab code A k-mer is a string of length k. We define Count(Text, Pattern) as the number of times that a k-mer Pattem appears as

matlab code matlab code A k-mer is a string of length k. We define

A k-mer is a string of length k. We define Count(Text, Pattern) as the number of times that a k-mer Pattem appears as a substring of Text. For example. Count'ACAACTATGCATACTATCGGGAACT ATCCT", "ACTAT) -3. We note that count('CGATATATCCATAGCGATATATACCATAG," "ATATA') is equal to 3 (not 2) since we should account for overlapping occurrences of Pattem in Text. To compute Count(Text, Pattem), our plan is to "slide a window" down Text, checking whether each k-mer substring of Text matches Pattem. We will therefore refer to the k-mer starting at position i of Text as Text(, k). Throughout this example, we will often use 1-based indexing, meaning that we coumt starting at i instead of 0. In this case, Text begins at position 1 and ends at position |Texti (Text| denotes the number of symbols in Text). Note that the last k-mer of Text begins at position Text - k +1. e.g., the last 3-mer of GACCATACTG starts at position 10-3+1 = 8. Please implement the Count(Text,Pattern) function. Hint: You can use the strcmp(str1, str2) function of Matlab. Fonksiyonunuzun rnek kullanm aada verilmitir. Ltfen yazl ilevinizi bir m dosyas olarak ykleyin (.m do olarak ykleyin). ilevinizi test etmek iin aadaki Metinleri kullanabilirsiniz: Test = 'CGATATATCCATAGCGATATATACCATAG": Test = 'ACAACTATGCATACTATCGGGAACTATCCT'; rnek kullanm: >> Count (CATATATCCATAGCCATATATACCATAS, ATATA") >> Count('ACATATCONTACTATCGCGAACTATCCTACTAT)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!