Beispiel #1
0
 def test_detect_start_stop(self):
     seq = {"aaa": "TAGGAGGCCGCTATGCCATTA"}
     args = self.mock_args.mock()
     args.start_codon = ["ATG"]
     args.stop_codon = ["TTA"]
     args.max_len = 20
     args.min_len = 3
     args.fuzzy_rbs = 2
     sorf = sd.detect_start_stop(self.example.tas, seq, args)
     self.assertListEqual(sorf, [{'strand': '+', 'type': 'intergenic', 'starts': ['13'],
                                  'print': False, 'seq': 'ATGCCATTA', 'ends': ['21'],
                                  'end': 21, 'start': 13, 'rbs': [2], 'strain': 'aaa'}])
     seq = {"aaa": "TTAAAGGCATTATCCTCCTA"}
     self.example.tas[0].strand = "-"
     sorf = sd.detect_start_stop(self.example.tas, seq, args)
     self.assertListEqual(sorf, [{'end': 10, 'starts': ['2'], 'strain': 'aaa', 'ends': ['10'],
                                  'type': 'intergenic', 'print': False, 'seq': 'TAAAGGCAT',
                                  'rbs': [19], 'strand': '-', 'start': 2}])
     self.example.tas[0].strand = "+"
 def test_detect_start_stop(self):
     seq = {"aaa": "TAGGAGGCCGCTATGCCATTA"}
     args = self.mock_args.mock()
     args.start_codon = ["ATG"]
     args.stop_codon = ["TTA"]
     args.max_len = 20
     args.min_len = 3
     args.fuzzy_rbs = 2
     sorf = sd.detect_start_stop(self.example.tas, seq, args)
     self.assertListEqual(sorf, [{'strand': '+', 'type': 'intergenic', 'starts': ['13'],
                                  'print': False, 'seq': 'ATGCCATTA', 'ends': ['21'],
                                  'end': 21, 'start': 13, 'rbs': [2], 'strain': 'aaa'}])
     seq = {"aaa": "TTAAAGGCATTATCCTCCTA"}
     self.example.tas[0].strand = "-"
     sorf = sd.detect_start_stop(self.example.tas, seq, args)
     self.assertListEqual(sorf, [{'end': 10, 'starts': ['2'], 'strain': 'aaa', 'ends': ['10'],
                                  'type': 'intergenic', 'print': False, 'seq': 'TAAAGGCAT',
                                  'rbs': [19], 'strand': '-', 'start': 2}])
     self.example.tas[0].strand = "+"