Question: In the below python pInput sequence: ggg aug aaa ugu ucc cgg uaa aug aau gcc cgg gaa auv uag ccu gac aug a here
In the below python pInput sequence: ggg aug aaa ugu ucc cgg uaa aug aau gcc cgg gaa auv uag ccu gac aug a
here
here
rogram the code doesn't execute the loop but rather skip it
import re
class FindSomethingobject:
forwardpattern recompilerATG:::TGA:TAA:TAG
backwardpattern recompilerTGATAATAG:ATG
def initself:
pass
def Finditself sequence, modeTrue:
foundthings
if mode:
pattern FindSomething.forwardpattern
else:
pattern FindSomething.backwardpattern
count
match pattern.finditersequence reIGNORECASE
printhere
for m in match:
count
if count : # This is here just to avoid inadvertent infinite loops while you are testing
printQuitting too many times through the while loop! # and getting things figured out!
printHeres what I found before quiting:", foundthings
break
foundthings.appendmgroup
nextposition mstart
sequence sequencenextposition:
printMatches found:", m
foundthings.extendm
return foundthings
def main:
a FindSomething
seq ggg aug aaa ugu ucc cgg uaa aug aau gcc cgg gaa auu uag ccu gac aug a
printInput sequence: seq
printaFinditseq modeTrue
printaFinditseq modeFalse
if namemain:
main
The result I get is an empty list as nothing is found. Please help me fix the error.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
