The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A, T, G, C. An example DNA sequence could be: ATGAG An interesting phenomena here is that when two DNA sequences are attempted to combine, A can only pair with T whereas G can only pair with C. Two DNA sequences for example ATGC and TACG are considered fully complementary' because the bases (letters) in every index position can be paired to each other (see the image). ATGC ATGC TACG TACC ATGC XX TTCA Fully Complementary SNP Non Complementary Two DNA sequences for example ATGC and TACC are considered 'SNP type' because there is exactly one index position (last position in this case) in which the bases(letters) can not be paired. Two DNA sequences for example ATGC and TTCA are considered 'non complementary' because there are more than one index position (second and fourth in this case) in which the bases can not be paired. Write a program that will ask the user to input two DNA Sequences. The program must check the following: 1. The first sequence must contain letters only, the letters must be upper case, it must contain only A, T, G, C letters) 2. The second sequence must satisfy the same requirementrs as sequence 1> In additon to that it maust have the same length as sequnce 1. If any of the above condition is violated, the program will prompt the user to correct his/her input With two valid DNA Sequences codes the program will try to identify if the given sequences are 'Fully Complementary, "Non Complementary', 'SNP type' Suggestive Steps: a. Accept two DNA sequences from the user as strings and validate them as shown above b. scan through the index position (0 to length-1) of both the strings c. in every index position match the letters from the two strings d. if the letters in a position are 'A' vs 'T' or T vs 'A' or 'G' vs 'C' or 'C' vs 'G' they are considered as pair e keep a count of no. of pairings to finally decide if the sequences are fully complementary, SNP or non complementary Sample run #1 Enter the DNA Sequence 1:ATGC Enter the DNA Sequence 2:AAAA The sequences are non complementary Sample run #2 Enter the DNA Sequence 1:AATTG Enter the DNA Sequence 2:TTAAC The sequences are fully complementary Sample run #3 Edit Metadata

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
icon
Related questions
Question
T
The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A, T, G, C. An example DNA
sequence could be: ATGAG
An interesting phenomena here is that when two DNA sequences are attempted to combine, A can only pair with T whereas G can only pair with C.
Two DNA sequences for example ATGC and TACG are considered 'fully complementary' because the bases (letters) in every index position can be
paired to each other (see the image).
ATGC
ATGC
ATGC
XX
TACG
Fully Complementary
TACC
SNP
TTCA
CA
Non Complementary
Two DNA sequences for example ATGC and TACC are considered 'SNP type' because there is exactly one index position (last position in this case) in
which the bases(letters) can not be paired.
Two DNA sequences for example ATGC and TTCA are considered "non complementary' because there are more than one index position (second and
fourth in this case) in which the bases can not be paired.
Write a program that will ask the user to input two DNA Sequences. The program must check the following:
1. The first sequence must contain letters only, the letters must be upper case, it must contain only A, T, G, C letters)
2. The second sequence must satisfy the same requirements as sequence 1> In additon to that it maust have the same length as sequnce 1.
If any of the above condition is violated, the program will prompt the user to correct his/her input
With two valid DNA Sequences codes the program will try to identify if the given sequences are 'Fully Complementary', 'Non Complementary, "SNP type'
Suggestive Steps:
a. Accept two DNA sequences from the user as strings and validate them as shown above
b. scan through the index position (0 to length-1) of both the strings
c. in every index position match the letters from the two strings
d. if the letters in a position are 'A' vs 'T or 'T' vs 'A' or 'G' vs 'C' or 'C' vs 'G' they are considered as pair
e. keep a count of no. of pairings to finally decide if the sequences are fully complementary, SNP or non complementary
Sample run #1
Enter the DNA Sequence 1:ATGC
Enter the DNA Sequence 2:AAAA
The sequences are non complementary
Sample run #2
Enter the DNA Sequence 1:AATTG
Enter the DNA Sequence 2:TTAAC
The sequences are fully complementary
Sample run #3
Enter the DNA Sequence 1:GCCTA
Enter the DNA Sequence 2:CGAAT
The sequences are SNP type
Sample run #4
Enter the DNA Sequence 1:ase
Please input uppercase letters
Enter the DNA Sequence 1:ASE
Please input only letters: A, T, G, C
Enter the DNA Sequence 1:GCCCA
Enter the DNA Sequence 2:123
Please input only letters
Enter the DNA Sequence 2:1AS
Please input only letters
Enter the DNA Sequence 2:CTTA
sequence 2 must have same length of sequence 1
Enter the DNA Sequence 2:CTTAA
The sequences are non complementary
Edit Metadata
Transcribed Image Text:T The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A, T, G, C. An example DNA sequence could be: ATGAG An interesting phenomena here is that when two DNA sequences are attempted to combine, A can only pair with T whereas G can only pair with C. Two DNA sequences for example ATGC and TACG are considered 'fully complementary' because the bases (letters) in every index position can be paired to each other (see the image). ATGC ATGC ATGC XX TACG Fully Complementary TACC SNP TTCA CA Non Complementary Two DNA sequences for example ATGC and TACC are considered 'SNP type' because there is exactly one index position (last position in this case) in which the bases(letters) can not be paired. Two DNA sequences for example ATGC and TTCA are considered "non complementary' because there are more than one index position (second and fourth in this case) in which the bases can not be paired. Write a program that will ask the user to input two DNA Sequences. The program must check the following: 1. The first sequence must contain letters only, the letters must be upper case, it must contain only A, T, G, C letters) 2. The second sequence must satisfy the same requirements as sequence 1> In additon to that it maust have the same length as sequnce 1. If any of the above condition is violated, the program will prompt the user to correct his/her input With two valid DNA Sequences codes the program will try to identify if the given sequences are 'Fully Complementary', 'Non Complementary, "SNP type' Suggestive Steps: a. Accept two DNA sequences from the user as strings and validate them as shown above b. scan through the index position (0 to length-1) of both the strings c. in every index position match the letters from the two strings d. if the letters in a position are 'A' vs 'T or 'T' vs 'A' or 'G' vs 'C' or 'C' vs 'G' they are considered as pair e. keep a count of no. of pairings to finally decide if the sequences are fully complementary, SNP or non complementary Sample run #1 Enter the DNA Sequence 1:ATGC Enter the DNA Sequence 2:AAAA The sequences are non complementary Sample run #2 Enter the DNA Sequence 1:AATTG Enter the DNA Sequence 2:TTAAC The sequences are fully complementary Sample run #3 Enter the DNA Sequence 1:GCCTA Enter the DNA Sequence 2:CGAAT The sequences are SNP type Sample run #4 Enter the DNA Sequence 1:ase Please input uppercase letters Enter the DNA Sequence 1:ASE Please input only letters: A, T, G, C Enter the DNA Sequence 1:GCCCA Enter the DNA Sequence 2:123 Please input only letters Enter the DNA Sequence 2:1AS Please input only letters Enter the DNA Sequence 2:CTTA sequence 2 must have same length of sequence 1 Enter the DNA Sequence 2:CTTAA The sequences are non complementary Edit Metadata
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
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
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education