Minsu Kim/python/Rosalind /problem4
From Biolecture.org
Revision as of 20:38, 12 December 2017 by imported>Minsukim (Created page with "<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2020-33-43-453.jpg" style="height:304px; width:1129px" /></p> <p>f = open('rosalind_ba1e.txt', '...")
f = open('rosalind_ba1e.txt', 'r')
lines = f.readlines()
f.close()
seq = lines[0]
data = lines[1].split()
k = int(data[0])
L = int(data[1])
t = int(data[2])
count = 0
a = list()
for i in range(len(seq)-L-1):
b = list()
for j in range(i,i+L-k-1):
pattern = seq[j:j+k]
if(patterncount(seq, pattern) >= t):
if a.count(pattern) == 0:
a.append(pattern)
count = count + 1
for q in a:
print(q)