Question: Write a complete C++ program to analyze a set of DNA strands input from the keyboard. For each strand, output the strand followed by validity,
Write a complete C++ program to analyze a set of DNA strands input from the keyboard. For each strand, output the strand followed by validity, CG percentage, and overall stability. For example, given this input sequence:
CCGA ACTGATGC ACTGATTX TTCAA #
Your program should output the following:
CCGA: valid,CG=75%,highly stable ACTGATGC: valid,CG=50%,stable ACTGATXC: invalid TTCAA: valid,CG=20%,unstable
In terms of overall stability, if the CG percentage is 75 or greater, than the DNA strand is considered "highly stable". If the CG percentage is < 75 but 50 or greater, it's considered "stable". Less than 50 but 25 or greater is considered "less stable". And a CG percentage < 25 is considered "unstable".
Recall that validity and CG percentage were the focus on lab this week. You will need a loop to input and process the strands one by one. Here's a skeleton loop structure to build upon:
cin >> DNA; // read first DNA strand: while (DNA != "#") // if not end of input marker #, process input: { . . . cin >> DNA; // read next DNA strand: } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
