@@ -128,11 +128,11 @@ def getParticipatingReactions(self, molecule, componentPair, reactionDictionary)
128128 for x in reactionDictionary [moleculeName ][component ]
129129 if x in componentPair
130130 ]:
131- correlationList [
132- ( component [ 0 ], componentComplement )
133- ] = reactionDictionary [ moleculeName ][ component ][
134- componentComplement
135- ]
131+ correlationList [( component [ 0 ], componentComplement )] = (
132+ reactionDictionary [ moleculeName ][ component ][
133+ componentComplement
134+ ]
135+ )
136136 return correlationList
137137
138138 def getPairsFromMotif (self , motif1 , motif2 , excludedComponents ):
@@ -146,10 +146,10 @@ def getPairsFromMotif(self, motif1, motif2, excludedComponents):
146146 if len (self .motifMoleculeDict [element ][molecule ]) > 0 :
147147 for componentPair in self .motifMoleculeDict [element ][molecule ]:
148148 if not any (x in excludedComponents for x in componentPair ):
149- correlationList [
150- componentPair
151- ] = self .getParticipatingReactions (
152- molecule , componentPair , self . patternXreactions
149+ correlationList [componentPair ] = (
150+ self . getParticipatingReactions (
151+ molecule , componentPair , self .patternXreactions
152+ )
153153 )
154154 moleculeCorrelationList [molecule ].update (correlationList )
155155 return dict (moleculeCorrelationList )
@@ -283,10 +283,13 @@ def getClassification(keys, translator):
283283 localAnalysisFlag = True
284284 if not any (
285285 [
286- molecule
287- in database .prunnedDependencyGraph [x ][0 ]
288- if len (database .prunnedDependencyGraph [x ]) > 0
289- else molecule in x
286+ (
287+ molecule
288+ in database .prunnedDependencyGraph [x ][0 ]
289+ if len (database .prunnedDependencyGraph [x ])
290+ > 0
291+ else molecule in x
292+ )
290293 for x in difference
291294 ]
292295 ):
@@ -372,9 +375,9 @@ def getContextMotifInformation(self):
372375 "nullrequirement" ,
373376 "exclusion" ,
374377 ]:
375- motifDictionary [
376- frozenset ([ requirementClass , requirementClass ])
377- ] = self . getPairsFromMotif ( requirementClass , requirementClass , [] )
378+ motifDictionary [frozenset ([ requirementClass , requirementClass ])] = (
379+ self . getPairsFromMotif ( requirementClass , requirementClass , [ ])
380+ )
378381 return motifDictionary
379382
380383 def getComplexReactions (self , threshold = 2 ):
@@ -548,10 +551,10 @@ def runTests():
548551 "nullrequirement" ,
549552 "exclusion" ,
550553 ]:
551- motifDictionary [
552- ( requirementClass , requirementClass )
553- ] = modelLearning . getPairsFromMotif (
554- requirementClass , requirementClass , [ "imod" ]
554+ motifDictionary [( requirementClass , requirementClass )] = (
555+ modelLearning . getPairsFromMotif (
556+ requirementClass , requirementClass , [ "imod" ]
557+ )
555558 )
556559 if len (motifDictionary [(requirementClass , requirementClass )]) > 0 :
557560 print (
0 commit comments