Exemplo n.º 1
0
 def testHelixThreeRepeats(self):
     """
     The find method must find a helix with a repeat count of three.
     """
     read = AARead('id', 'FRRRRFRRRRFRRRRF')
     landmark = AlphaHelix_pi()
     result = list(landmark.find(read))
     self.assertEqual([Landmark('AlphaHelix_pi', 'C', 0, 16, 3)], result)
Exemplo n.º 2
0
 def testConversion(self):
     """
     The amino acid sequence must be converted to the right properties
     string.
     """
     landmark = AlphaHelix_pi()
     result = landmark.convertAAToHydrophobicHydrophilic('ASDGEAHSDTDSCV')
     self.assertEqual('OIIIIOOIIOIIOO', result)
Exemplo n.º 3
0
 def testHelixTwoRepeatsWithNonZeroOffset(self):
     """
     The find method must find a helix with a repeat count of two when it
     is not at the start of the sequence.
     """
     read = AARead('id', 'AAAFRRRRFRRRRF')
     landmark = AlphaHelix_pi()
     result = list(landmark.find(read))
     self.assertEqual([Landmark('AlphaHelix_pi', 'C', 3, 11, 2)], result)
Exemplo n.º 4
0
 def testFindWithOneRepeat(self):
     """
     The find method must return an empty generator if there is only one
     instance of the OII pattern
     """
     read = AARead('id', 'FRRRR')
     landmark = AlphaHelix_pi()
     result = list(landmark.find(read))
     self.assertEqual([], result)
Exemplo n.º 5
0
 def testFindWithoutHelix(self):
     """
     The find method must return an empty generator when no helix is
     present.
     """
     read = AARead('id', 'FRFRFRFRFRFRFRFRFRFF')
     landmark = AlphaHelix_pi()
     result = list(landmark.find(read))
     self.assertEqual([], result)
Exemplo n.º 6
0
 def testTwoHelices(self):
     """
     The find method must find more than one helix.
     """
     read = AARead('id', 'FRRRRFRRRRFRFRFRFRFRFRFRFRFRFRFFRRRRFRRRRFRRRRF')
     landmark = AlphaHelix_pi()
     result = list(landmark.find(read))
     self.assertEqual([
         Landmark('AlphaHelix_pi', 'C', 0, 11, 2),
         Landmark('AlphaHelix_pi', 'C', 31, 16, 3)
     ], result)