Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

image text in transcribed

ComputingFrequencies Function: Also create a function for PatternToNumber

image text in transcribed

image text in transcribed

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? Why

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions