Esempio n. 1
0
 def test_merge(self):
     seq = {"aaa": "TAGGAGGCCGCTATGCCATTA"}
     sorfs = [{"strain": "aaa", "strand": "+", "start": 2, "end": 6,
               "starts": [str(2)], "ends": [str(10)], "seq": "ATGTA",
               "type": "3utr", "print": False, "rbs": [1], "start_TSS": "1"},
              {"strain": "aaa", "strand": "+", "start": 5, "end": 15,
               "starts": [str(5)], "ends": [str(15)], "seq": "ATGTA",
               "type": "3utr", "print": False, "rbs": [2], "start_TSS": "2"}]
     finals = sd.merge(sorfs, seq)
     self.assertDictEqual(finals[0], {'rbs': [1], 'end': 6, 'starts': ['2'], 'strand': '+',
                                      'start_TSS': '1', 'type': '3utr', 'start': 2, 'seq': 'AGGAG',
                                      'candidate': ['2-6_TSS:1_RBS:1'], 'ends': ['10', '6'],
                                      'strain': 'aaa'})
 def test_merge(self):
     seq = {"aaa": "TAGGAGGCCGCTATGCCATTA"}
     sorfs = [{"strain": "aaa", "strand": "+", "start": 2, "end": 6,
               "starts": [str(2)], "ends": [str(10)], "seq": "ATGTA",
               "type": "3utr", "print": False, "rbs": [1], "start_TSS": "1"},
              {"strain": "aaa", "strand": "+", "start": 5, "end": 15,
               "starts": [str(5)], "ends": [str(15)], "seq": "ATGTA",
               "type": "3utr", "print": False, "rbs": [2], "start_TSS": "2"}]
     finals = sd.merge(sorfs, seq)
     self.assertDictEqual(finals[0], {'rbs': [1], 'end': 6, 'starts': ['2'], 'strand': '+',
                                      'start_TSS': '1', 'type': '3utr', 'start': 2, 'seq': 'AGGAG',
                                      'candidate': ['2-6_TSS:1_RBS:1'], 'ends': ['10', '6'],
                                      'strain': 'aaa'})