示例#1
0
 def testHelixThreeRepeats(self):
     """
     The find method must find a helix with a repeat count of three.
     """
     read = AARead('id', 'FRRRFRRRFRRRF')
     landmark = AlphaHelix()
     result = list(landmark.find(read))
     self.assertEqual([Landmark('AlphaHelix', 'A', 0, 13, 3)], result)
示例#2
0
 def testConversion(self):
     """
     The amino acid sequence must be converted to the right properties
     string.
     """
     landmark = AlphaHelix()
     result = landmark.convertAAToHydrophobicHydrophilic('ASDGEAHSDTDSCV')
     self.assertEqual('OIIIIOOIIOIIOO', result)
示例#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', 'AAAFRRRFRRRF')
     landmark = AlphaHelix()
     result = list(landmark.find(read))
     self.assertEqual([Landmark('AlphaHelix', 'A', 3, 9, 2)], result)
示例#4
0
 def testFindWithOneRepeat(self):
     """
     The find method must return an empty generator if there is only one
     instance of the OIII pattern
     """
     read = AARead('id', 'FRRR')
     landmark = AlphaHelix()
     result = list(landmark.find(read))
     self.assertEqual([], result)
示例#5
0
 def testFindWithoutHelix(self):
     """
     The find method must return an empty generator when no helix is
     present.
     """
     read = AARead('id', 'FRFRFRFRFRFRFRFRFRFF')
     landmark = AlphaHelix()
     result = list(landmark.find(read))
     self.assertEqual([], result)
示例#6
0
 def testTwoHelices(self):
     """
     The find method must find more than one helix.
     """
     read = AARead('id', 'FRRRFRRRFRFRFRFRFRFRFRFRFRFRFRFFRRRFRRRFRRRF')
     landmark = AlphaHelix()
     result = list(landmark.find(read))
     self.assertEqual([Landmark('AlphaHelix', 'A', 0, 9, 2),
                       Landmark('AlphaHelix', 'A', 31, 13, 3)],
                      result)