예제 #1
0
    def gibbsSearchOut(self):
        k=15
        N=2000   
        data = [ d.strip() for d in list(open('/home/giannis/Downloads/dataset_43_4.txt'))[1:] ]

        t=len(data)
        r,s = gibbsSearchFull(data, k, t, N)
        
        print("\n".join(r))
        print(score(r, k))
예제 #2
0
    def testGibbsSearch(self):
        k=8
        t=5
        N=100
        data =["CGCCCCTCTCGGGGGTGTTCAGTAAACGGCCA",
               "GGGCGAGGTATGTGTAAGTGCCAAGGTGCCAG",
               "TAGTACCGAGACCGAAAGAAGTATACAGGCGT",
               "TAGATCAAGTTTCAGGTGCACGTCGGTGAACC",
               "AATCCACCAGCTCCACGTGCAATGTTGGCCTA"]

        out= ["TCTCGGGG",
              "CCAAGGTG",
              "TACAGGCG",
              "TTCAGGTG",
              "TCCACGTG"]
        
        res = gibbsSearchFull(data, k, t, N)
        
        so = score(out, k)
        sr = score(res,k)
        assert  sr <= so