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

 A k-mer is a string of length k. We define Count(Text,

A k-mer is a string of length k. We define Count(Text, Pattern) as the number of times that a k-mer Pattern appears as a substring of Text. For example, Count'ACAACTATGCATACTATCGGGAACTATCCT", "ACTAT') = 3. We note that count(CGATATATCCATAGCGATATATACCATAG, "ATATA") is equal to 3 (not 2) since we should account for overlapping occurrences of Pattern in Text. To compute Count(Text, Pattern), our plan is to "slide a window" down Text, checking whether each k-mer substring of Text matches Pattern. We will therefore refer to the k-mer starting at position i of Text as Texti, k). Throughout this example, we will often use 1-based indexing, meaning that we count starting at 1 instead of 0. In this case, Text begins at position 1 and ends at position Text (Text denotes the number of symbols in Text). Note that the last k- mer of Text begins at position (Text-k+1, eg.. 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 stremp(str1, str2) function of Matlab. Fonksiyonunuzun rnek kullanm aada verilmitir. Ltfen yazl ilevinizi bir m dosyas olarak ykleyin (m dos olarak ykleyin). Ilevinizi test etmek iin aadaki Metinleri kullanabilirsiniz: Test = 'CGATATATCCATAGCGATATATACCATAG: Test = 'ACAACTATGCATACTATCGGGAACTATCCT": rnek kullanm: >>> Count('CONTATATOCNTAGCGATATNIACCATAG TATATA')

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!