Esempio n. 1
0
 def testEmptyRead(self):
     """
     An empty read must not return any landmarks.
     """
     read = SSAARead('id', '', '')
     landmark = PDB_ExtendedStrand()
     result = landmark.find(read)
     self.assertEqual([], list(result))
Esempio n. 2
0
 def testNoLandmarks(self):
     """
     A read that has no landmarks must result in an empty list.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'HHHHHHHHH')
     landmark = PDB_ExtendedStrand()
     result = landmark.find(read)
     self.assertEqual([], list(result))
Esempio n. 3
0
 def testNoLandmarks(self):
     """
     A read that has no landmarks must result in an empty list.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'GGGGGGGGG')
     landmark = PDB_AlphaHelix()
     result = landmark.find(read)
     self.assertEqual([], list(result))
 def testEmptyRead(self):
     """
     An empty read must not return any landmarks.
     """
     read = SSAARead('id', '', '')
     landmark = PDB_AlphaHelix_combined()
     result = landmark.find(read)
     self.assertEqual([], list(result))
Esempio n. 5
0
 def testOneLandmarkAtEnd(self):
     """
     If the structure sequence has the landmark at its end, the right
     landmark must be returned.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'HHHHHHEEE')
     landmark = PDB_ExtendedStrand()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB ExtendedStrand', 'PDB-ES', 6, 3)],
                      list(result))
Esempio n. 6
0
 def testOneLandmarkAtEnd(self):
     """
     If the structure sequence has the landmark at its end, the right
     landmark must be returned.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'GGGGGGHHH')
     landmark = PDB_AlphaHelix()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB AlphaHelix', 'PDB-A', 6, 3)],
                      list(result))
Esempio n. 7
0
 def testOneLandmarkInMiddle(self):
     """
     If the structure sequence has the landmark in the middle, the right
     landmark must be returned.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'GGHHHGGGG')
     landmark = PDB_AlphaHelix()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB AlphaHelix', 'PDB-A', 2, 3)],
                      list(result))
 def testOneLandmarkAtStart(self):
     """
     If the structure sequence has the landmark at its beginning, the right
     landmark must be returned.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'IIIHHHHHH')
     landmark = PDB_AlphaHelix_pi()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB AlphaHelix_pi', 'PDB-Api', 0, 3)],
                      list(result))
 def testAlphaHelixMixtureMustBeFound(self):
     """
     If the stucture sequence contains all alpha helix types ('H', 'G',
     'I'), the right landmark must be returned.
     """
     read = SSAARead('id', 'RFRFRFRFR', 'HGISSSSSS')
     landmark = PDB_AlphaHelix_combined()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB AlphaHelix_combined', 'PDB-AC', 0, 3)],
                      list(result))
Esempio n. 10
0
 def testTwoLandmarks(self):
     """
     The right landmarks must be returned when a structure sequence with
     two landmarks is given.
     """
     read = SSAARead(
         'id', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
         '-EEEEEEEEEEEEEEEEEEEEEEEEEET-TT-TTSS---TTT-TTEEEE-SS---')
     landmark = PDB_ExtendedStrand()
     result = landmark.find(read)
     self.assertEqual([
         Landmark('PDB ExtendedStrand', 'PDB-ES', 1, 26),
         Landmark('PDB ExtendedStrand', 'PDB-ES', 45, 4)
     ], list(result))
Esempio n. 11
0
 def testTwoLandmarks(self):
     """
     The right landmarks must be returned when a structure sequence with
     two landmarks is given.
     """
     read = SSAARead(
         'id',
         'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
         '-HHHHHHHHHHHHHHHHHHHHHHHHHHT-TT-TTSS---TTT-TTHHHH-SS---')
     landmark = PDB_AlphaHelix()
     result = landmark.find(read)
     self.assertEqual([Landmark('PDB AlphaHelix', 'PDB-A', 1, 26),
                       Landmark('PDB AlphaHelix', 'PDB-A', 45, 4)],
                      list(result))