Ejemplo n.º 1
0
    def test_nopad(self):
        read = Read(seq=self.read.seq[8:8+13],
                    pos=48)
        read.cigar = [(0, 13)]

        trim_short_cigars(self.read, match_len_min=5, trim_pad=0)
        self.assertEqual(read, self.read)
Ejemplo n.º 2
0
    def test_pad(self):
        read = Read(seq=self.read.seq[8+2:8+13-2],
                    pos=50)
        read.cigar = [(0, 9)]

        trim_short_cigars(self.read, match_len_min=5, trim_pad=2)
        self.assertEqual(read, self.read)
Ejemplo n.º 3
0
    def setUp(self):
        read = Read(seq=''.join(chr(i) for i in xrange(65, 91)))
        read.cigar = [(1, 3), (0, 3), (2, 45), (1, 2), (0, 13), (1, 3)]
        read.cigar.append(
            (0, (len(read.seq) -
                 sum(bl for (bt, bl) in read.cigar if bt in (0, 1)))))

        self.read = read
Ejemplo n.º 4
0
 def setUp(self):
     readf = Read('GGCCAACCCAAAGGG', pos=0,
                  qname='startsbefore')
     readf.cigar = [(1, 6), (0, len(readf.seq) - 6)]
     readr = Read('CCAAAGGGCCCTTT', pos=1,
                  qname='startsbefore',
                  is_reverse=True)
     self.pair = (readf, readr)
Ejemplo n.º 5
0
 def setUp(self):
     readf = Read('GGCCAACCCAAAGGG', pos=0, qname='startsbefore')
     readf.cigar = [(1, 6), (0, len(readf.seq) - 6)]
     readr = Read('CCAAAGGGCCCTTT',
                  pos=1,
                  qname='startsbefore',
                  is_reverse=True)
     self.pair = (readf, readr)
Ejemplo n.º 6
0
 def setUp(self):
     readf = Read('AAAGGGCCCTTT', pos=3, qname='matchonly')
     readr = Read('AGGGCCCTTTCCC',
                  pos=5,
                  qname='matchonly',
                  is_reverse=True)
     fix_pair((readf, readr))
     self.pair = (readr, readf)
Ejemplo n.º 7
0
    def setUp(self):
        read = Read(seq=''.join(chr(i) for i in xrange(65, 91)))
        read.cigar = [(1, 3), (0, 3), (2, 45), (1, 2), (0, 13), (1, 3)]
        read.cigar.append((0,
                           (len(read.seq) -
                            sum(bl for (bt, bl) in read.cigar if bt in (0, 1)))
                          ))

        self.read = read
Ejemplo n.º 8
0
    def test_pad(self):
        read = Read(seq=self.read.seq[8 + 2:8 + 13 - 2], pos=50)
        read.cigar = [(0, 9)]

        trim_short_cigars(self.read, match_len_min=5, trim_pad=2)
        self.assertEqual(read, self.read)
Ejemplo n.º 9
0
    def test_nopad(self):
        read = Read(seq=self.read.seq[8:8 + 13], pos=48)
        read.cigar = [(0, 13)]

        trim_short_cigars(self.read, match_len_min=5, trim_pad=0)
        self.assertEqual(read, self.read)
Ejemplo n.º 10
0
 def setUp(self):
     read = Read('AAAGGGTTTCCC', pos=1)
     read.cigar = [(0, 3), (1, 2), (0, 7)]
     self.read = read
Ejemplo n.º 11
0
 def setUp(self):
     self.read = Read('AAAGGGTTTCCC', pos=1)