def test5(self): pdb_5 = self.pdb.filter( polymerComposition(polymerComposition.DNA_STD_NUCLEOTIDES)) results_5 = pdb_5.keys().collect() self.assertFalse('2ONX' in results_5) self.assertFalse('1JLP' in results_5) self.assertTrue('5X6H' in results_5) self.assertFalse('5L2G' in results_5) self.assertFalse('2MK1' in results_5) self.assertFalse('5UZT' in results_5)
def test1(self): pdb_1 = self.pdb.filter( polymerComposition(polymerComposition.AMINO_ACIDS_20)) results_1 = pdb_1.keys().collect() self.assertTrue('2ONX' in results_1) self.assertFalse('1JLP' in results_1) self.assertTrue('5X6H' in results_1) self.assertFalse('5L2G' in results_1) self.assertFalse('2MK1' in results_1) self.assertFalse('5UZT' in results_1) self.assertFalse('1AA6' in results_1) self.assertFalse('1NTH' in results_1)
def test2(self): pdb_2 = self.pdb.filter( polymerComposition(polymerComposition.AMINO_ACIDS_20, exclusive=True)) results_2 = pdb_2.keys().collect() self.assertTrue('2ONX' in results_2) self.assertFalse('1JLP' in results_2) self.assertFalse('5X6H' in results_2) self.assertFalse('5L2G' in results_2) self.assertFalse('2MK1' in results_2) self.assertFalse('5UZT' in results_2) self.assertFalse('1AA6' in results_2) self.assertFalse('1NTH' in results_2)
def test4(self): pdb_4 = self.pdb.flatMap(structureToPolymerChains()) pdb_4 = pdb_4.filter( polymerComposition(polymerComposition.AMINO_ACIDS_22)) results_4 = pdb_4.keys().collect() self.assertTrue('2ONX.A' in results_4) self.assertFalse('1JLP.A' in results_4) self.assertTrue('5X6H.B' in results_4) self.assertFalse('5L2G.A' in results_4) self.assertFalse('5L2G.B' in results_4) self.assertFalse('2MK1.A' in results_4) self.assertFalse('5UZT.A' in results_4) self.assertTrue('1AA6.A' in results_4) self.assertTrue('1NTH.A' in results_4)