C++ Code: This function will print out the information that has been previously read (using the function readData) in a format that aligns an individual's STR counts along a column. For example, the output for the above input will be: name Alice Bob Charlie ---------------------------------------- AGAT 5 3 6 AATG 2 7 1 TATC 8 4 5 This output uses text manipulators to left-align each name and counts within 10 characters. The row of dashes is set to 40 characters. /** * Computes the longest consecutive occurrences of several STRs in a DNA sequence * * @param sequence a DNA sequence of an individual * @param nameSTRs the STRs (eg. AGAT, AATG, TATC) * @returns the count of the longest consecutive occurrences of each STR in nameSTRs **/ vector getSTRcounts(string& sequence, vector& nameSTRs) For example, if the sequence is AACCCTGCGCGCGCGCGATCTATCTATCTATCTATCCAGCATTAGCTAGCATCAAGATAGATAGATGAATTTCGAAATGAATGAATGAATGAATGAATGAATG and the vector namesSTRs is {"AGAT", "AATG", "TATC"}, then the output is the vector {3, 7, 4} /** * Compares if two vectors of STR counts are identical or not * * @param countQuery STR counts that is being queried (such as that computed from an input DNA sequence) * @param countDB STR counts that are known for an individual (such as that stored in a database) * @returns a boolean indicating whether they are the same or not **/ bool compareSTRcounts(vector& countQuery, vector& countDB) For example, if countQuery is the vector {3, 7, 4}, and countDB is the vector {3, 3, 4}, the function returns false.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question

C++ Code:

This function will print out the information that has been previously read (using the function readData) in a format that aligns an individual's STR counts along a column. For example, the output for the above input will be:

name Alice Bob Charlie ---------------------------------------- AGAT 5 3 6 AATG 2 7 1 TATC 8 4 5

This output uses text manipulators to left-align each name and counts within 10 characters. The row of dashes is set to 40 characters.

  1. /** * Computes the longest consecutive occurrences of several STRs in a DNA sequence * * @param sequence a DNA sequence of an individual * @param nameSTRs the STRs (eg. AGAT, AATG, TATC) * @returns the count of the longest consecutive occurrences of each STR in nameSTRs **/ vector<int> getSTRcounts(string& sequence, vector<string>& nameSTRs)

For example, if the sequence is

AACCCTGCGCGCGCGCGATCTATCTATCTATCTATCCAGCATTAGCTAGCATCAAGATAGATAGATGAATTTCGAAATGAATGAATGAATGAATGAATGAATG


and the vector namesSTRs is {"AGAT", "AATG", "TATC"}, then the output is the vector {3, 7, 4}

/** * Compares if two vectors of STR counts are identical or not * * @param countQuery STR counts that is being queried (such as that computed from an input DNA sequence) * @param countDB STR counts that are known for an individual (such as that stored in a database) * @returns a boolean indicating whether they are the same or not **/ bool compareSTRcounts(vector<int>& countQuery, vector<int>& countDB)

For example, if countQuery is the vector {3, 7, 4}, and countDB is the vector {3, 3, 4}, the function returns false.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,