Example #1
0
 def testTrimZero(self):
     """
     The trim function must work as expected when the trim quantity is 0.
     """
     ar = AlignedRead('id', '---ACGTACGT--')
     self.assertTrue(ar.trim(0))
     self.assertEqual('ACGTACGT', ar.sequence)
Example #2
0
 def testTrim(self):
     """
     The trim function must work as expected.
     """
     ar = AlignedRead('id', '---ACGTACGT--')
     self.assertEqual(8, len(ar))
     self.assertTrue(ar.trim(2))
     self.assertEqual('GTAC', ar.sequence)
Example #3
0
 def testTrimWithReadTooShort(self):
     """
     The trim function must return False if the read is too short.
     """
     ar = AlignedRead('id', '---ACGTACGT--')
     self.assertFalse(ar.trim(4))