for k in range(0,len(genome)): #this loop1 is to suggest a primer for genome[k] and store in primer[].
primer.append(substring(genome[k]))
for j in range(k+1,len(genome)): # this loop2 is to check if the primer is unique to genome[j]
if genome[j].find(primer[-1])!=-1:
del primer[-1] #if primer[-1] is also present in other genomes, remove it!
But after I corrected it, another error came up.
Traceback (most recent call last):
File "./primer.py", line 34, in <module>
if genome[j].find(primer[-1])!=-1:
IndexError: list index out of range
Besides that, I found loop2 was wrong to check if the primer is unique. It always delete the last element of the list primer[] each time the primer was found in other genome. I will work on the problem.
No comments:
Post a Comment