Function for PatternCount Below: function count = PatternCount(Text,Pattern) count = 0; for i = 0:length(Text) - length(Pattern) substring = Text(i+1:i+length(Pattern)); if strcmp(substring,Pattern) == 1 count
Function for PatternCount Below:
function count = PatternCount(Text,Pattern)
count = 0;
for i = 0:length(Text) - length(Pattern)
substring = Text(i+1:i+length(Pattern));
if strcmp(substring,Pattern) == 1 count = count+1;
end
end
end
Pseudo Codes for rest of functions given below
ComputingFrequencies Function: Also create a function for PatternToNumber
Pattern = 'AATTT' % If needed for PatternCount
k-mer
k = 4
OriC of Vibrio Cholerea
VC = 'ATCAATGATCAACGTAAGCTTCTAAGCATGATCAAGGTGCTCACACAGTTTATCCACAACCTGAGTGGATGACATCAAGATAGGTCGTTGTATCTCCTTCCTCTCGTACTCTCATGACCACGGAAAGATGATCAAGAGAGGATGATTTCTTGGCCATATCGCAATGAATACTTGTGACTTGTGCTTCCAATTGACATCTTCAGCGCCATATTGCGCTGGCCAAGGTGACGGAGCGGGATTACGAAAGCATGATCATGGCTGTTGTTCTGTTTATCTTGTTTTGACTGAGACTTGTTAGGATAGACGGTTTTTCATCACTGACTAGCCAAAGCCTTACTCTGCCTGACATCGACCGTAAATTGATAATGAATTTACATGCTTCCGCGACGATTTACCTCTTGATCATCGATCCGATTGAAGATCTTCAATTGTTAATTCTCTTGCCTCGACTCATAGCCATGATGAGCTCTTGATCATGTTTCCTTAACCCTCTATTTTTTACGGAAGAATGATCAAGCTGCTGCTCTTGATCATCGTTTC'
Hw#2 (Due Feb 21) (1 point) Write a Matlab code for PatternCount algorithm. (1 point) Write a Matlab code for FrequentWords algorithm. (3 points) Run FrequentWords on the OriC of Vibrio Cholerea genome (uploaded on Beachboard) and fill out the following table 3 6 # times repeated k-mers (1 point) Write a Matlab code for ComputingFrequencies algorithm. (2 points) Run both algorithms on the OriC of Vibrio Cholerea and calculate their running times when we replicate OriC consecutively for 10 times. (1 point) Plot the running time results on a single figure. Are the results consistent with what you expect from the theoretical running time? Why? Hw#2 (Due Feb 21) (1 point) Write a Matlab code for PatternCount algorithm. (1 point) Write a Matlab code for FrequentWords algorithm. (3 points) Run FrequentWords on the OriC of Vibrio Cholerea genome (uploaded on Beachboard) and fill out the following table 3 6 # times repeated k-mers (1 point) Write a Matlab code for ComputingFrequencies algorithm. (2 points) Run both algorithms on the OriC of Vibrio Cholerea and calculate their running times when we replicate OriC consecutively for 10 times. (1 point) Plot the running time results on a single figure. Are the results consistent with what you expect from the theoretical running time? WhyStep by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started