コード例 #1
0
 def test_truncate(self):
     instance = quality_filter.AmbiguousBaseFilter('truncate')
     actual = list(instance.filter_records(self.records))
     self.assertEqual(5, len(actual))
     self.assertEqual(0, instance.failed)
     self.assertEqual(5, instance.passed)
     self.assertEqual(['ACGT', '', '', 'ACGT', 'GG'],
                      [str(s.seq) for s in actual])
コード例 #2
0
 def test_drop(self):
     """
     Test that the first record (with no Ns) does not get filtered
     """
     instance = quality_filter.AmbiguousBaseFilter('drop')
     actual = list(instance.filter_records(self.records))
     self.assertEqual(1, len(actual))
     self.assertEqual(1, instance.passed)
     self.assertEqual(4, instance.failed)
     self.assertEqual(self.records[0], actual[0])