コード例 #1
0
ファイル: reaction.py プロジェクト: ecell/libmoleculizer
    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
コード例 #2
0
ファイル: reaction.py プロジェクト: lxm1117/libmoleculizer
    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
コード例 #3
0
ファイル: matchobject.py プロジェクト: ecell/libmoleculizer
    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..."
コード例 #4
0
    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..."