Question: must be in c++ Question 5(10pt): findBestSimScore Write a function called findBestSimScore that takes a genome and a sequence and returns the highest similarity score
must be in c++
Question 5(10pt): findBestSimScore Write a function called findBestSimScore that takes a genome and a sequence and returns the highest similarity score found in the genome as a double. Note: the term genome refers to the string that represents the complete set of genes in an organism, and sequence to refer to some substring or sub-sequence in the genome. Function specifications: The function name: findBestSimScore The function parameters(in this order): o a string parameter for the genome (complete set of genes) o a string parameter for the sequence (sub-sequence of the genome) The function should return the highest similarity score as a double. If the length of the sequence is longer than the genome, then the function should return 0. (the best similarity score is 0) The function should not print anything. The best similarity scores is (0.0, 1.0] Note: Our sequence is "ACT", which is a string of length 3. That means we need to compare our sequence with all the 3 character long sub-sequences (substrings) in the genome. Follow the example below: genome sub-sequence sequence similarity score ATACGC ACT ATACGC 0.33 | 0.66 ACT ACT ACT ATACGC ATACGC findBestSimScore returns 0.66, since that is the highest similarity score found Once you have tested your code on Cloud 9 /VS code, then head over to code runner on Moodle and only your functions in the answer box! Make sure that your unit tests are in the main function (commented out)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
