Question

Write Matlab or Python scripts to solve. Output the aligned sequences with the maximum alignment score....

Write Matlab or Python scripts to solve. Output the aligned sequences with the maximum alignment score.

We would like to align two DNA sequences: (v) C G A T A C T, and (w) G A T T C G T based on the following scoring scheme as discussed in class:

i) s(i, j) = 1 if vi = wj (matches);

ii) s(i, j) = 0 if vi != wj (mismatches);

iii) d = 0 (indels: insertions or deletions).

What would be the maximum alignment score? Explain how you get the result.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The maximum Alignment Score is 5.

There are 2 ways of alignment:

Global Alignment: Where you take both entire sequences into account and find the alignment

Local Alignment: Where u take a small segment into consideration

# is used for comments. This is not a part of the code. The comment is used to give a clear understanding of the code.

The code is as:

pip3 install biopython #For installing the library named 'Biopython'

from Bio import pairwise2 #for Importing pairwise Module.
from Bio.pairwise2 import format_alignment
X= 'CGATACT' #your DNA sequence 1
Y = 'GATTCGT' #your DNA sequence 2

#Local alignment
alignments = pairwise2.align.localxx(X, Y)  

for a in alignments:
print(format_alignment(*a))

#Global Alignment

align = pairwise2.align.globalxx(X,Y)
for a in align:
print(format_alignment(*a))

Add a comment
Know the answer?
Add Answer to:
Write Matlab or Python scripts to solve. Output the aligned sequences with the maximum alignment score....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT