Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

www.swamiyer.net/cs110/project3.pdf Problem 2. (Recovering the Alignment) Now that we know bow to compute the edit distance between two strings, we next want to recover the

image text in transcribed
image text in transcribed
www.swamiyer.net/cs110/project3.pdf Problem 2. (Recovering the Alignment) Now that we know bow to compute the edit distance between two strings, we next want to recover the optimal aligument iteelf. The key idoa is to retrace the stepe of the dynamic programming algorithm backwards, re discovering the path of choices (highlighted in rod in the table above) from opt to) to) to opt 0O 03. To determine the choioe that lod to ope ta) tg], we consider the throe posibilitios: 1. The optimal alignment matches xta] up with a gap. In this case, we must have epeta-ope 130)2 2. The optimal alignment mathes , up with a gap. In this case, we must have optiuj)-opt tut + 1] + 2. 3. The optimal aligament matches [A] up with yt). In this case, we must have opt (41111 opeta 1+1 if x(1) equals 3), or optag opes 11 otherwise. Write a program lsaeat. py that reads from standard inpat, the output produced by otie distance.r, ie, input strings and y, and the opt matrix. The program should then recover an optimal alignment using the procedure described above, and write to standard output the edit distance between z and y and the alignmeut itself, using the following format The first line should contain the edit distance, preceded by the text Bait distaace-. Each subeequent lise should coutain a character from the first string, followed by the paired character from the second string, followed by the associated penalty. Use the duaracter e to indicate a gap in either string. 3 of 5 CS110 Project 3 (Global Sequence Alignment) Swami lyer s rthens edis aistance Py data/exsapleto.txt Ipyhon3 aligaest py Edit diataace 7 ! c 2 TG1 cco CAI

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

use root cause analysis to improve patient safety, and AppendixLO1

Answered: 1 week ago

Question

6. Is all Internet training the same? Explain.

Answered: 1 week ago