Beispiel #1
0
 def test_basic_isochizomers(self):
     """Test to be sure isochizomer and neoschizomers are as expected.
     """
     self.assertEqual(Acc65I.isoschizomers(), [Asp718I, KpnI])
     self.assertEqual(Acc65I.elucidate(), 'G^GTAC_C')
     self.assertEqual(Asp718I.elucidate(), 'G^GTAC_C')
     self.assertEqual(KpnI.elucidate(), 'G_GTAC^C')
Beispiel #2
0
 def test_basic_isochizomers(self):
     """Test to be sure isochizomer and neoschizomers are as expected."""
     self.assertEqual(Acc65I.isoschizomers(), [Asp718I, KpnI])
     self.assertEqual(Acc65I.elucidate(), 'G^GTAC_C')
     self.assertEqual(Asp718I.elucidate(), 'G^GTAC_C')
     self.assertEqual(KpnI.elucidate(), 'G_GTAC^C')
     self.assertTrue(Acc65I.is_isoschizomer(KpnI))
     self.assertFalse(Acc65I.is_equischizomer(KpnI))
     self.assertTrue(Acc65I.is_neoschizomer(KpnI))
     self.assertIn(Acc65I, Asp718I.equischizomers())
     self.assertIn(KpnI, Asp718I.neoschizomers())
     self.assertIn(KpnI, Acc65I.isoschizomers())
Beispiel #3
0
    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])
Beispiel #4
0
 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_basic_isochizomers(self):
     """Test to be sure isochizomer and neoschizomers are as expected."""
     self.assertEqual(Acc65I.isoschizomers(), [Asp718I, KpnI])
     self.assertEqual(Acc65I.elucidate(), 'G^GTAC_C')
     self.assertEqual(Asp718I.elucidate(), 'G^GTAC_C')
     self.assertEqual(KpnI.elucidate(), 'G_GTAC^C')
     self.assertTrue(Acc65I.is_isoschizomer(KpnI))
     self.assertFalse(Acc65I.is_equischizomer(KpnI))
     self.assertTrue(Acc65I.is_neoschizomer(KpnI))
     self.assertIn(Acc65I, Asp718I.equischizomers())
     self.assertIn(KpnI, Asp718I.neoschizomers())
     self.assertIn(KpnI, Acc65I.isoschizomers())
    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_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))