def test_kpn_cutting(self): """Test basic cutting with KpnI (3'overhang).""" self.assertTrue(KpnI.is_3overhang()) self.assertFalse(KpnI.is_5overhang()) self.assertFalse(KpnI.is_blunt()) self.assertEqual(KpnI.overhang(), "3' overhang") parts = KpnI.catalyse(self.kpnsite_seq) self.assertEqual(len(parts), 2) self.assertEqual(KpnI.catalyse(self.kpnsite_seq), KpnI.catalyze(self.kpnsite_seq))
def test_kpn_cutting(self): """Test basic cutting with KpnI (3'overhang).""" self.assertTrue(KpnI.is_3overhang()) self.assertFalse(KpnI.is_5overhang()) self.assertFalse(KpnI.is_blunt()) self.assertEqual(KpnI.overhang(), "3' overhang") parts = KpnI.catalyse(self.kpnsite_seq) self.assertEqual(len(parts), 2) self.assertEqual(KpnI.catalyse(self.kpnsite_seq), KpnI.catalyze(self.kpnsite_seq))
def test_circular_sequences(self): """Deal with cutting circular sequences.""" parts = EcoRI.catalyse(self.ecosite_seq, linear=False) self.assertEqual(len(parts), 1) locations = EcoRI.search(parts[0], linear=False) self.assertEqual(locations, [1]) parts = KpnI.catalyse(self.kpnsite_seq, linear=False) self.assertEqual(len(parts), 1) locations = KpnI.search(parts[0], linear=False) self.assertEqual(locations, [1]) parts = SmaI.catalyse(self.smasite_seq, linear=False) self.assertEqual(len(parts), 1) locations = SmaI.search(parts[0], linear=False) self.assertEqual(locations, [1]) self.assertEqual( EarI.search(FormattedSeq(Seq('CTCTTCAAAAA')), linear=False), [8]) self.assertEqual( SnaI.search(FormattedSeq(Seq('GTATACAAAAA')), linear=False), [1])
def test_circular_sequences(self): """Deal with cutting circular sequences.""" parts = EcoRI.catalyse(self.ecosite_seq, linear=False) self.assertEqual(len(parts), 1) locations = EcoRI.search(parts[0], linear=False) self.assertEqual(locations, [1]) parts = KpnI.catalyse(self.kpnsite_seq, linear=False) self.assertEqual(len(parts), 1) locations = KpnI.search(parts[0], linear=False) self.assertEqual(locations, [1]) parts = SmaI.catalyse(self.smasite_seq, linear=False) self.assertEqual(len(parts), 1) locations = SmaI.search(parts[0], linear=False) self.assertEqual(locations, [1]) self.assertEqual(EarI.search(FormattedSeq(Seq('CTCTTCAAAAA')), linear=False), [8]) self.assertEqual(SnaI.search(FormattedSeq(Seq('GTATACAAAAA')), linear=False), [1])