Exemple #1
0
 def test_mixed(self):
     c = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.I, 2),
          (CIGAR.D, 1), (CIGAR.EQ, 2)]
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 4), (CIGAR.D, 2), (CIGAR.EQ, 2)]
     self.assertEqual(exp, _cigar.merge_indels(c))
Exemple #2
0
 def test_del_before_ins(self):
     c = [(CIGAR.EQ, 1), (CIGAR.D, 1), (CIGAR.I, 2), (CIGAR.EQ, 2)]
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.EQ, 2)]
     self.assertEqual(exp, _cigar.merge_indels(c))
Exemple #3
0
 def test_ins_before_del(self):
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.EQ, 2)]
     self.assertEqual(exp, _cigar.merge_indels(exp))
Exemple #4
0
    def test_no_events(self):
        c = [(CIGAR.EQ, 1)]
        self.assertEqual(c, _cigar.merge_indels(c))

        c = [(CIGAR.EQ, 1), (CIGAR.X, 3), (CIGAR.EQ, 10)]
        self.assertEqual(c, _cigar.merge_indels(c))
Exemple #5
0
 def test_mixed(self):
     c = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.EQ, 2)]
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 4), (CIGAR.D, 2), (CIGAR.EQ, 2)]
     assert _cigar.merge_indels(c) == exp
Exemple #6
0
 def test_ins_before_del(self):
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.EQ, 2)]
     assert _cigar.merge_indels(exp) == exp
Exemple #7
0
 def test_del_before_ins(self):
     c = [(CIGAR.EQ, 1), (CIGAR.D, 1), (CIGAR.I, 2), (CIGAR.EQ, 2)]
     exp = [(CIGAR.EQ, 1), (CIGAR.I, 2), (CIGAR.D, 1), (CIGAR.EQ, 2)]
     assert _cigar.merge_indels(c) == exp
Exemple #8
0
    def test_no_events(self):
        c = [(CIGAR.EQ, 1)]
        assert _cigar.merge_indels(c) == c

        c = [(CIGAR.EQ, 1), (CIGAR.X, 3), (CIGAR.EQ, 10)]
        assert _cigar.merge_indels(c) == c