def clumpFinding(genome, k, L, t):

    genomeLen = len(genome)
    ltClumps = set()

    for i in range(genomeLen - L):
        for pattern in fasterMostFrequentsKMers(genome[i:i+L], k, t):
            ltClumps.add(pattern)

    return ltClumps
Example #2
0
    def test_frequentWordProblem(self):
        text = "ACGTTGCATGTCGCATGATGCATGAGAGCT"
        k = 4
        result = ["CATG", "GCAT"]

        self.assertListEqual(sorted(result), sorted(fasterMostFrequentsKMers(text, 4)))