In this final submission, you will build on checkpoint B to load the database and DNA sequence from files. There will be two databases and several sequences that will be available for download below. An example of the database is the file small.txt: name, AGATC, AATG, TATC Alice, 2, 8,3 Bob, 4, 1,5 Charlie, 3, 2,5 Note the difference in the format of the database from checkpoint B. An example of the sequence is the file 1. txt: AAGGTAAGTTTAGAATATAAAAGGTGAGTTAAATAGAATAGGTTAAAATTAAAGGAGATCAGATCAGATCAGATCTATCTATCTATCTATCTATCAGAAA You will implement/modify the following functions: 1. Modify the function readData, which will now take an additional parameter: a string representing the filename containing the database of individuals and their STR counts. It will also return a bool indicating if opening the file was successful or not: bool readData (string filename, vector& nameSTRS, vector& name Individuals, vector>& STRcounts) Update the function documentation accordingly. 2. Implement a new function getSequenceFromFile that takes two parameters: a string representing the sequence filename (such as 1. txt), and a string that will store the DNA sequence contained in the file. It will return a bool indicating if opening the file was successful or not. The function's prototype is not provided on purpose (you should be able to decipher it from the description). You must also write the complete function documentation. 3. Update the main () function to prompt the user for the filename of the sequence. If the file doesn't open, print an error message and return. Next, prompt the user for the filename of the database. If the file doesn't open, print an error message and return. See the sample output below for the format of the error messages. Next, prompt the user for an integer. If it is equal to 0, do not print the data (i.e. do not call the function printData), otherwise print it. The rest of the main () continues as before (displaying the counts for each STR read from the data in the provided DNA sequence and displaying the match, if there is one). Example input 1: sequence1.txt small.txt 1 Expected output: Error in reading DNA sequence from the file: sequencel.txt Example input 2: 1.txt db.txt 1 Expected output: Error in reading DB file: db.txt Example input 3: 1.txt small.txt 1 |||
In this final submission, you will build on checkpoint B to load the database and DNA sequence from files. There will be two databases and several sequences that will be available for download below. An example of the database is the file small.txt: name, AGATC, AATG, TATC Alice, 2, 8,3 Bob, 4, 1,5 Charlie, 3, 2,5 Note the difference in the format of the database from checkpoint B. An example of the sequence is the file 1. txt: AAGGTAAGTTTAGAATATAAAAGGTGAGTTAAATAGAATAGGTTAAAATTAAAGGAGATCAGATCAGATCAGATCTATCTATCTATCTATCTATCAGAAA You will implement/modify the following functions: 1. Modify the function readData, which will now take an additional parameter: a string representing the filename containing the database of individuals and their STR counts. It will also return a bool indicating if opening the file was successful or not: bool readData (string filename, vector& nameSTRS, vector& name Individuals, vector>& STRcounts) Update the function documentation accordingly. 2. Implement a new function getSequenceFromFile that takes two parameters: a string representing the sequence filename (such as 1. txt), and a string that will store the DNA sequence contained in the file. It will return a bool indicating if opening the file was successful or not. The function's prototype is not provided on purpose (you should be able to decipher it from the description). You must also write the complete function documentation. 3. Update the main () function to prompt the user for the filename of the sequence. If the file doesn't open, print an error message and return. Next, prompt the user for the filename of the database. If the file doesn't open, print an error message and return. See the sample output below for the format of the error messages. Next, prompt the user for an integer. If it is equal to 0, do not print the data (i.e. do not call the function printData), otherwise print it. The rest of the main () continues as before (displaying the counts for each STR read from the data in the provided DNA sequence and displaying the match, if there is one). Example input 1: sequence1.txt small.txt 1 Expected output: Error in reading DNA sequence from the file: sequencel.txt Example input 2: 1.txt db.txt 1 Expected output: Error in reading DB file: db.txt Example input 3: 1.txt small.txt 1 |||
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education