Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The information in DNA is stored as a code made up of four chemical bases which are represented by four upper case letters A ,

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).
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:
The first sequence must contain letters only, the letters must be upper case, it must contain only A,T,G,C
letters)
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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

Explain in detail the developing and developed economy of India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = X 52+7 - 1)(x+2) dx

Answered: 1 week ago

Question

What is gravity?

Answered: 1 week ago

Question

What is the Big Bang Theory?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago