1) Compute the Number of Times a Pattern Appears in a Text : eg Count(GCGCG,GCG)=2
2) Find the Most Frequent Words in a String:
Given: A DNA string Text and an integer k.
Return: All most frequent k-mers in Text (in any order).
Eg: ACGTTGCATGTCGCATGATGCATGAGAGCT,4
Output= CATG GCAT
3) Find the Complement of a String and reverse the compliment : string only contains letters A,T,C,G.
So A's compliment is C & T's compliment is G.
So replace all A's with C & C's with A , and T's with G's and G's with A.
After that reverse the whole string.
Eg :AAAACCCGGT
output: ACCGGGTTTT
4) Find Patterns Forming Clumps in a String:
Given integers L and t, a string Pattern forms an (L, t)-clump inside a (larger) string Genome if there is an interval of Genome of length L in which Pattern appears at least t times. For example, TGCA forms a (25,3)-clump in the following Genome:
gatcagcataagggtcccTGCAacattggttagaggttgttttacgatcagcataagggtccc TGCAaTGCAttTGCAgttgttttac