Question
Most of your DNA sequence is identical to every other human on the planet. However, certain locations in our DNA sequence are of special interest.
Most of your DNA sequence is identical to every other human on the planet. However, certain locations in our DNA sequence are of special interest. These locations, called genetic markers, can be used to uniquely identify someone, predict the likelihood of a genetic disorder, or help trace ancestry through time.
In the case of forensics, we are most interested in the genetic markers that are most variable. In other words, that change in every generation. This allows scientists to look at a fragment of DNA at a crime scene and compare it to the same section of DNA in a suspect and see if it matches up.
In the case of genealogy, we are most interested in the genetic markers that are the most conserved. In other words, those sections of DNA that remain relatively constant in each generation.
For tracing ancestry, genetic genealogy services such as Family Tree DNA and 23andMe use between 20 and 700,000 different markers that vary in length between 1 and 300 nucleotides each. By using these services, someone can find long-lost cousins that share the same paternal or maternal ancestry.
In this assignment, you'll write a C++ program that uses a single genetic marker to allow a user to search for relatives.
Note that unlike your previous checkpoint assignments, the code you write for your weekly programming assignments will also be evaluated for style and overall design / implementation.
Instructions
Write a C++ program to do the following:
-Prompt the user for a 10 character DNA marker sequence.
-Prompt the user for a number of potential relatives.
-Prompt for the names of each of these potential relatives and store them in an array of strings.
-Prompt for the 10 character DNA marker sequence of each of the potential relatives.
-Display each potential relative along with the percentage that their sequence matched the target user.
In this assignment, DNA marker sequences will be restricted to the standard nucleotide base symbols: A, T, C, and G. No error checking is required for this assignment.
You may assume that no more than 50 relatives will be entered.
Sample Output
The following is an example of output for this program:
Enter your DNA sequence: ATTCGACTGA
Enter the number of potential relatives: 3
Please enter the name of relative #1: Peter
Please enter the name of relative #2: James
Please enter the name of relative #3: John
Please enter the DNA sequence for Peter: TTTCGACTGA
Please enter the DNA sequence for James: AAACGTCAGT
Please enter the DNA sequence for John: ATTGCAGTCA
Percent match for Peter: 90%
Percent match for James: 50%
Percent match for John: 60%
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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