Counting maximum k-mer repetition frequency

from nltk import ngrams
from collections import Counter


def simple(seq, n):
    return Counter(ngrams(seq, n)).most_common(1)[0][1] / float(len(seq) - n + 1)

Browse More Popular Posts

Leave a Comment