def test_adjust_by_cipos(self): entry1 = [ '1', '200', '300', '2', '300', '400', '777_1', '57', '+', '-', 'BND', 'PASS', 'SVTYPE=BND;AF=0.2', 'SVTYPE=BND;AF=0.2' ] b1 = Bedpe(entry1) self.assertEqual(self.converter.adjust_by_cipos(b1), 200) b1.o1 = '-' self.assertEqual(self.converter.adjust_by_cipos(b1), 201) b1.info1 = 'SVTYPE=BND;AF=0.2;CIPOS=-2,3' self.assertEqual(self.converter.adjust_by_cipos(b1), 203) b1.o1 = '+' self.assertEqual(self.converter.adjust_by_cipos(b1), 202)
def test_adjust_by_cipos(self): entry1 = [ '1', '200', '300', '2', '300', '400', '777_1', '57', '+', '-', 'BND', 'PASS', 'SVTYPE=BND;AF=0.2', 'SVTYPE=BND;AF=0.2' ] b1 = Bedpe(entry1) self.assertEqual(b1.b1, 200) b1.o1 = '-' b1.adjust_by_cipos() self.assertEqual(b1.b1, 201) b1.misc[0] = 'SVTYPE=BND;AF=0.2;CIPOS=-2,3' b1.adjust_by_cipos() self.assertEqual(b1.b1, 203) b1.o1 = '+' b1.adjust_by_cipos() self.assertEqual(b1.b1, 202)