Example #1
0
class TestRestrictionSite(object):
    '''Test RestrictionSite class.'''
    def __init__(self):
        self.ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
        self.foki = RestrictionSite(DNA('GGATG'), (14, 18), name='FokI')

    def test_cuts_outside(self):
        '''Test cuts_outside method.'''
        assert_false(self.ecorv.cuts_outside())
        assert_true(self.foki.cuts_outside())

    def test_len(self):
        '''Test len function.'''
        assert_equal(len(self.ecorv), 6)
        assert_equal(len(self.foki), 5)
Example #2
0
class TestRestrictionSite(object):
    '''Test RestrictionSite class.'''
    def __init__(self):
        self.ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
        self.foki = RestrictionSite(DNA('GGATG'), (14, 18), name='FokI')

    def test_cuts_outside(self):
        '''Test cuts_outside method.'''
        assert_false(self.ecorv.cuts_outside())
        assert_true(self.foki.cuts_outside())

    def test_len(self):
        '''Test len function.'''
        assert_equal(len(self.ecorv), 6)
        assert_equal(len(self.foki), 5)
Example #3
0
 def test_psti_cut(self):
     '''Test 3\' cutter.'''
     psti = RestrictionSite(DNA('CTGCAG'), (5, 1), name='PstI')
     assert_equal(
         reaction.digest(DNA('ACTGCAGA'), psti),
         [DNA('ACTGCA', bottom='----GT'),
          DNA('----GA', bottom='TCTGCA')])
Example #4
0
 def test_ncoi_cut(self):
     '''Test standard TypeII cutter.'''
     ncoi = RestrictionSite(DNA('CCATGG'), (1, 5), name='NcoI')
     assert_equal(reaction.digest(self.dna, ncoi), [
         DNA('TGAC----', bottom='CATGGTCA'),
         DNA('CATGGAAA', bottom='TTTC----')
     ])
     assert_equal(reaction.digest(self.dna.circularize(), ncoi),
                  [DNA('CATGGAAATGAC----', bottom='CATGGTCATTTC----')])
Example #5
0
 def __init__(self):
     self.ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
     self.foki = RestrictionSite(DNA('GGATG'), (14, 18), name='FokI')
Example #6
0
 def __init__(self):
     self.ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
     self.foki = RestrictionSite(DNA('GGATG'), (14, 18), name='FokI')
Example #7
0
 def test_ecorv_cut(self):
     '''Test blunt-end cutter.'''
     ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
     assert_equal(reaction.digest(DNA('GATATC'), ecorv),
                  [DNA('GAT'), DNA('ATC')])
Example #8
0
 def test_not_found(self):
     '''If site not found, should return input sequence in list.'''
     ecorv = RestrictionSite(DNA('GATATC'), (3, 3), name='EcoRV')
     assert_equal(self.dna, reaction.digest(self.dna, ecorv)[0])