Example #1
0
 def test_single_cpg(self, algorithm):
     seq_str = 'CG'
     computed = algorithm(make_seq_record(seq_str), 2, 1, 2)
     expected = make_algo_results(seq_str, [(0, 2, 1, 2)])
     print computed.seq_record.features[0].extract(computed.seq_record.seq)
     for a in [computed, expected]:
         print a.island_metadata_list[0].gc_ratio
     assert computed == expected
 def test_single_cpg(self, algorithm):
     seq_str = 'CG'
     computed = algorithm(make_seq_record(seq_str), 2, 1, 2)
     expected = make_algo_results(seq_str, [(0, 2, 1, 2)])
     print computed.seq_record.features[0].extract(computed.seq_record.seq)
     for a in [computed, expected]:
         print a.island_metadata_list[0].gc_ratio
     assert computed == expected
Example #3
0
 def test_island_at_end(self, algorithm):
     seq_str = 'GCATAACGGTAATCTATCGTATCATATT'
     computed = algorithm(make_seq_record(seq_str), 2, 0.5, 0.6)
     expected = make_algo_results(
         seq_str, [(6, 12, 0.5, 3), (17, 21, 0.5, 4)])
     assert computed == expected
Example #4
0
 def test_island_at_end(self, algorithm):
     seq_str = 'ATATATTATTCAACGAGG'
     computed = algorithm(make_seq_record(seq_str), 5, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(10, 18, 0.625,  4 / 3)])
     assert computed == expected
Example #5
0
 def test_island_in_middle(self, algorithm):
     seq_str = 'ATATACACGGAATATT'
     computed = algorithm(make_seq_record(seq_str), 4, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(5, 13, 0.5, 2)])
     assert computed == expected
Example #6
0
 def test_island_at_beginning(self, algorithm):
     seq_str = 'CGGATATATA'
     computed = algorithm(make_seq_record(seq_str), 3, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(0, 6, 0.5, 3)])
     assert computed == expected
 def test_island_at_end(self, algorithm):
     seq_str = 'GCATAACGGTAATCTATCGTATCATATT'
     computed = algorithm(make_seq_record(seq_str), 2, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(6, 12, 0.5, 3),
                                            (17, 21, 0.5, 4)])
     assert computed == expected
 def test_island_at_end(self, algorithm):
     seq_str = 'ATATATTATTCAACGAGG'
     computed = algorithm(make_seq_record(seq_str), 5, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(10, 18, 0.625, 4 / 3)])
     assert computed == expected
 def test_island_in_middle(self, algorithm):
     seq_str = 'ATATACACGGAATATT'
     computed = algorithm(make_seq_record(seq_str), 4, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(5, 13, 0.5, 2)])
     assert computed == expected
 def test_island_at_beginning(self, algorithm):
     seq_str = 'CGGATATATA'
     computed = algorithm(make_seq_record(seq_str), 3, 0.5, 0.6)
     expected = make_algo_results(seq_str, [(0, 6, 0.5, 3)])
     assert computed == expected