Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 2 Restriction Endonucleases are nzymes that split a DNA sequence where a ce

ID: 3589072 • Letter: P

Question

Part 2 Restriction Endonucleases are nzymes that split a DNA sequence where a certain combination or pattern of nulceotides occurs. These patterns are called restriction sites. We are going to mimic basic endonuclease enzyme functionality in silico in this part of the assignment. In the following code cell, write a function named endonuclease) that takes two strings, dna seq and res site, and returns the a tuple of sequences that have been split at the restriction sites Assumption: The restriction site will always be roughly in the middle of the sequence and not in the beginning or end of the sequence Example >>> split-seq = endonuclease ('AGTTACAAAGTAACATGTTTAGCAA', >>print (split seq) 'TTT') 'AGTTACAAAGT'AACATG,AGCAA) In [ def endonuclease (dna seq, res site) Takea a DNA 3equence and a restriction site sequence then splits the dna sequence at points where the site is present. Paramters dna seg: String. res_ aite: Regex pattern Returns split_seq: tuple of strings. # YOUR CODE HERE return split sec In [ ] : 'TTT') split-3eq=endonuclea3e("AGTTACAAAGTAACATGTTTAGCAA', print (split_seq) In [ assert equal (endonuclease (ATATTAAAGAATAATTTTATAAAAATATGT'GAAT), ("ATATTAAA, AATTTTATAAAAATATGT) assert_equal (endonuclease ('GAAAAATAAACGAATGAATCTATTTATACT'ATG),'GAAAAATAAACGA',AATCTATTTATACT)) assert_equal (endonucleae'AGGACAACGTAAGTATAGCGCATATAAACA 'GTAAG', 'AGGACAAC,TATAGCGCATATAAACA)) assert equal (endonucleaseGCCATGCCGGCGCGCGGGGCACTCCGGTTG' GCGCGC, GCCATGCCG', GGGGCACTCCGGTTG'))

Explanation / Answer

def endonuclease(dna_seq,res_site):
#split method splits the dna_seq on res_site and returns a list.
#tuple method converts a list to tuple
split_seq = tuple(dna_seq.split(res_site))
#return the tuple split_seq
return split_seq

#call the endonuclease method with two params
print(endonuclease('AGTTACAAAGTAACATGATTTAGCAA','TTT'))

"""
sample output

('AGTTACAAAGTAACATGA', 'AGCAA')
"""