Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Program 4 Assignment Overview This assignment will give you more experience with while loops and if statements, and give you an opportunity to work

image text in transcribed

Python Program 4 Assignment Overview This assignment will give you more experience with while loops and if statements, and give you an opportunity to work with strings. The Problem Scientists measure how closely related a species is by looking at the DNA scquences for key proteins and seeing how similar'dissimilar they are. If the two sequences of DNA are essentially the same, the two species are considered to be evolutionarily closer since there is a relationship between changes and time. This process is called sequence alignment. Consider the two strings of DNA below (completely made up, miss matches in red) Species 1: AATAACGAAA Species 2: AAAACGAAAA A scientist can change the alignment by assuming that an insertion or deletion, of one of the bases has occurred. They could make such a change, called an indel for short, to see if it improves the alignment: Species 1: AATAACGAAA Species 2: AA-AACGAAAA Assuming two indels, marked as two dashes(-), the alignment is greatly improved. The scientist would assume that two changes happened, one change in each specics. While complex algorithms exist to do sequence alignment, it is also useful to support a researcher and allow them to do an alignment by hand. Program Specifications: 1. You will prompt for two strings. The strings can have any characters you like, but to be "biological" it should consist of: "A", "T", "C", "G", The strings do not have to be of the same length. You will then prompt for one of 3 commands: 2. a, "a" for add. Add an indel b. "d" for dclete. Delete an indel "s" for score. Score the present alignment d. c. "q" for quit. Stop the process. 3. Adding an Indel. When you add an indel, you must prompt for two pieces of information: a. which string to change b. at what index (starting at 0) do you wish to place the indel (placement is before the given index, Error if the index is out of range). The string should then be modifled and a dash-) added. 4. Delete an Indel: If you can add an indel, you should be able to delete it if it doesn't do what you want. Again, you must prompt for two picces of information a. which string to change b. the index (starting at 0) to delete the indel. It is an Error to delete a character that is not an indel. 5. Scoring. You will report the number of matches and the number of mismatches. a. Any indcl is automatically a mismatch. b. Ifone string is shorter than the other, the shorter string is filled out with indels c. After you score, you print both strings i. Matching characters are printed in lower case. If the user entered upper case letters, you convert them to lower case on a match. ii. All mismatches are printed in upper case iii. Indels are printed as dashes

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

Students also viewed these Databases questions

Question

6-13 Explain the role of the database in SAPs threetier system.

Answered: 1 week ago

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago