@stable(as_of="0.4.0")
    def kmer_frequencies(self, k, overlap=True, relative=False):
        kmers = self.iter_kmers(k, overlap=overlap)
        freqs = dict(collections.Counter((str(seq) for seq in kmers)))

        if relative:
            if overlap:
                num_kmers = len(self) - k + 1
            else:
                num_kmers = len(self) // k

            relative_freqs = {}
            for kmer, count in freqs.items():
                relative_freqs[kmer] = count / num_kmers
            freqs = relative_freqs

        return freqs
Return counts of words of length `k` from this sequence.
dataset/ETHPy150Open biocore/scikit-bio/skbio/sequence/_sequence.py/Sequence.kmer_frequencies