Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (10 sloc) 305 Bytes
from collections import Counter
from itertools import product
from fasta import readFASTA
z=Counter()
s=readFASTA("rosalind_kmer.txt")
dna=s.values()[0]
for i in range(len(dna)-3):
z[dna[i:i+4]]+=1
for i in [''.join(s) for s in product("ACGT",repeat=4)]:
print i, z[i]
You can’t perform that action at this time.