def entropy_score(kmer):
    '\n    Schmieder and Edwards. Quality control and preprocessing of metagenomic datasets. (2011) Bioinformatics\n    https://academic.oup.com/bioinformatics/article/27/6/863/236283/Quality-control-and-preprocessing-of-metagenomic\n    '
    l = (len(kmer) - 2)
    k = (l if (l < 64) else 64)
    counts = defaultdict(int)
    for i in range(l):
        trinuc = kmer[i:(i + 3)]
        counts[trinuc] += 1
    logk = math.log(k)
    res = 0
    for (k, v) in counts.items():
        f = ((v * 1.0) / l)
        res += ((f * math.log(f)) / logk)
    return (res * (- 100))
Schmieder and Edwards. Quality control and preprocessing of metagenomic datasets. (2011) Bioinformatics
https://academic.oup.com/bioinformatics/article/27/6/863/236283/Quality-control-and-preprocessing-of-metagenomic
def entropy_score(kmer):
    '\n    Schmieder and Edwards. Quality control and preprocessing of metagenomic datasets. (2011) Bioinformatics\n    https://academic.oup.com/bioinformatics/article/27/6/863/236283/Quality-control-and-preprocessing-of-metagenomic\n    '
    l = (len(kmer) - 2)
    k = (l if (l < 64) else 64)
    counts = defaultdict(int)
    for i in range(l):
        trinuc = kmer[i:(i + 3)]
        counts[trinuc] += 1
    logk = math.log(k)
    res = 0
    for (k, v) in counts.items():
        f = ((v * 1.0) / l)
        res += ((f * math.log(f)) / logk)
    return (res * (- 100))