def test_single_merge(self): self.e5 = gimme.ExonObj('chr1', 500, 8200) self.align_db.single_exons_db['chr1'].append(self.e5) self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 1)
def test_no_merge_single_exons(self): self.align_db.single_exons_db = {'chr1': []} self.align_db.single_exons_db['chr1'].append(self.e1) self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 1)
def test_extend_front(self): self.e5 = gimme.ExonObj('chr1', 500, 1800) self.align_db.single_exons_db['chr1'].append(self.e5) self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 4)
def test_extend_back_first_last(self): self.e5 = gimme.ExonObj('chr1', 7100, 8200) self.e6 = gimme.ExonObj('chr1', 1100, 2200) self.align_db.single_exons_db['chr1'].append(self.e5) self.align_db.single_exons_db['chr1'].append(self.e6) self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 4)
def test_no_merge_multiple_exons(self): self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 4)
def test_merge_two_exons_extend(self): self.e5 = gimme.ExonObj('chr1', 1300, 4200) self.align_db.single_exons_db['chr1'].append(self.e5) self.merged_exons = gimme.merge_exon(self.align_db) self.assertEqual(len(self.merged_exons['chr1']), 3)