def constructGenericBinding(self): #### FORWARD # let rxn = # "Far1(MAPK_site,T306~none) + Fus3(target_site,T180~PO4,Y182~PO4) -> \Far1(MAPK_site!1,T306~none).Fus3(target_site!1,T180~PO4,Y182~PO4) kon_Fus3pTpY_Far1" # Then this function should return (("Far1", "MAPK_site"), ("Fus3, "target_site")) # This is the "generic binding that is formed. #### DECOMPOSITION # Let rxn = # "Far1(MAPK_site!1,T306~none).Fus3(target_site!1,T180~PO4,Y182~PO4) -> Far1(MAPK_site,T306~none) + Fus3(target_site,T180~PO4,Y182~PO4) koff_Fus3pTpY_Far1" # Then this function should return (("Far1", "MAPK_site"), ("Fus3, "target_site")). #### MODIFICATION # Let rxn = "Dig1(PO4_site~PO4) -> Dig1(PO4_site~none) kcat_nonspecific_dephosph" # Should return (Dig1, PO4_site, PO4), I *think*. if self.modificationRxn: self.genericBinding = util.calculateSignificantModificationSite(self.reactants, self.products) return self.genericBinding elif self.dimerizationRxn: self.genericBinding = util.calculateSignificantBinding(self.reactants, self.products) elif self.decompositionRxn: self.genericBinding = util.calculateSignificantBinding(self.products, self.reactants) else: raise ValueError self.genericBinding = list(self.genericBinding) self.genericBinding.sort() self.genericBinding = tuple(self.genericBinding) return self.genericBinding
def constructGenericBinding(self): #### FORWARD # let rxn = # "Far1(MAPK_site,T306~none) + Fus3(target_site,T180~PO4,Y182~PO4) -> \Far1(MAPK_site!1,T306~none).Fus3(target_site!1,T180~PO4,Y182~PO4) kon_Fus3pTpY_Far1" # Then this function should return (("Far1", "MAPK_site"), ("Fus3, "target_site")) # This is the "generic binding that is formed. #### DECOMPOSITION # Let rxn = # "Far1(MAPK_site!1,T306~none).Fus3(target_site!1,T180~PO4,Y182~PO4) -> Far1(MAPK_site,T306~none) + Fus3(target_site,T180~PO4,Y182~PO4) koff_Fus3pTpY_Far1" # Then this function should return (("Far1", "MAPK_site"), ("Fus3, "target_site")). #### MODIFICATION # Let rxn = "Dig1(PO4_site~PO4) -> Dig1(PO4_site~none) kcat_nonspecific_dephosph" # Should return (Dig1, PO4_site, PO4), I *think*. if self.modificationRxn: self.genericBinding = util.calculateSignificantModificationSite( self.reactants, self.products) return self.genericBinding elif self.dimerizationRxn: self.genericBinding = util.calculateSignificantBinding( self.reactants, self.products) elif self.decompositionRxn: self.genericBinding = util.calculateSignificantBinding( self.products, self.reactants) else: raise ValueError self.genericBinding = list(self.genericBinding) self.genericBinding.sort() self.genericBinding = tuple(self.genericBinding) return self.genericBinding
def initialize(self): if len(self.reactantList) == 1 and len(self.productList) == 2: self.decomposition, self.dimerization, self.modificationReaction = True, False, False elif len(self.reactantList) == 2 and len(self.productList) == 1: self.decomposition, self.dimerization, self.modificationReaction = False, True, False elif len(self.reactantList) == 1 and len(self.productList) == 1: self.decomposition, self.dimerization, self.modificationReaction = False, False, True else: raise ValueError, "Reaction not properly formed in MatchObject initializer..." if self.modificationReaction: self.significantBinding = util.calculateSignificantModificationSite(self.reactantList, self.productList) else: try: self.significantBinding = util.calculateSignificantBinding(self.reactantList, self.productList) except: # Whoops bad reaction thingy. print "Poorly formed reaction..."
def initialize(self): if len(self.reactantList) == 1 and len(self.productList) == 2: self.decomposition, self.dimerization, self.modificationReaction = True, False, False elif len(self.reactantList) == 2 and len(self.productList) == 1: self.decomposition, self.dimerization, self.modificationReaction = False, True, False elif len(self.reactantList) == 1 and len(self.productList) == 1: self.decomposition, self.dimerization, self.modificationReaction = False, False, True else: raise ValueError, "Reaction not properly formed in MatchObject initializer..." if self.modificationReaction: self.significantBinding = util.calculateSignificantModificationSite( self.reactantList, self.productList) else: try: self.significantBinding = util.calculateSignificantBinding( self.reactantList, self.productList) except: # Whoops bad reaction thingy. print "Poorly formed reaction..."