コード例 #1
0
ファイル: observable.py プロジェクト: okadalabipr/biomass
    def simulate(self, x, y0, _perturbation={}):
        if _perturbation:
            self.perturbation = _perturbation

        for gene_name in self.obs_names:
            x = self._set_gene_param(gene_name, x)
            for i, condition in enumerate(self.conditions):
                if condition == "WT":
                    y0[V.S2] = x[C.S2tot]
                    y0[V.S3] = x[C.S3tot]
                    y0[V.S4] = x[C.S4tot]
                elif condition == "Smad2OE":
                    y0[V.S2] = 2 * x[C.S2tot]
                    y0[V.S3] = x[C.S3tot]
                    y0[V.S4] = x[C.S4tot]
                elif condition == "Smad3OE":
                    y0[V.S2] = x[C.S2tot]
                    y0[V.S3] = 16 * x[C.S3tot]
                    y0[V.S4] = x[C.S4tot]
                elif condition == "Smad4OE":
                    y0[V.S2] = x[C.S2tot]
                    y0[V.S3] = x[C.S3tot]
                    y0[V.S4] = 3 * x[C.S3tot]

                sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

                if sol is None:
                    return False
                else:
                    self.simulations[self.obs_names.index(gene_name), :,
                                     i] = np.log2(sol.y[V.gene, :])
コード例 #2
0
    def simulate(self, x, y0, _perturbation=None):
        if _perturbation is not None:
            self.perturbation = _perturbation
        for i, condition in enumerate(self.conditions):
            if condition == "control":
                pass
            """
            elif condition == 'cooperative':
                x[C.n] = 2
                x[C.KI] = 18
                x[C.K1] = 50
                x[C.K2] = 40
                x[C.K3] = 100
                x[C.K4] = 100
                x[C.K5] = 100
                x[C.K6] = 100
                x[C.K7] = 100
                x[C.K8] = 100
                x[C.K9] = 100
                x[C.K10] = 100
                x[C.V9] = 1.25
                x[C.V10] = 1.25
            """

            sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

            if sol is None:
                return False
            else:
                self.simulations[self.obs_names.index("biphosphorylated_MAPK"), :, i] = sol.y[
                    V.MAPK_PP, :
                ]
                self.simulations[self.obs_names.index("unphosphorylated_MAPK"), :, i] = sol.y[
                    V.MAPK, :
                ]
コード例 #3
0
ファイル: observable.py プロジェクト: okadalabipr/biomass
    def simulate(self, x, y0, _perturbation={}):
        if _perturbation:
            self.perturbation = _perturbation
        for i, condition in enumerate(self.conditions):
            if condition == "TNFa":
                pass
            elif condition == "TNFa_DCF":
                x[C.uptake] = 1.0000
                x[C.TNF] = 1.0000
                x[C.trigger_iIkk] = 0.0195
                x[C.deact_TNFR] = 0.0010
                x[C.deact_ppIkk] = 0.1660
                x[C.deact_pnNfk] = 1000.0000
                x[C.act_Ikk_by_TNF] = 0.0347
                x[C.act_pIkk] = 0.1603
                x[C.act_Ikb_by_Ikk] = 0.1562
                x[C.act_Nfk_by_Ikk] = 0.6438
                x[C.act_Nfk_by_Ikk_complex] = 0.2816
                x[C.act_Ikb_complex] = 1.3897
                x[C.form_complex] = 2.8390
                x[C.form_complex_nuc] = 1000.0000
                x[C.ext_nNfkIkb] = 1000.0000
                x[C.Vnuc] = 1.0000
                x[C.split_NfkpIkb] = 0.0811
                x[C.split_NfkIkb] = 1.0000
                x[C.int_Nfk] = 0.0100
                x[C.int_Ikb] = 0.1226
                x[C.eta_int_pNfk] = 17.9585
                x[C.degrad_Ikb] = 0.6308
                x[C.degrad_mIkb] = 0.0053
                x[C.degrad_RnaA20] = 0.0089
                x[C.degrad_A20] = 0.0116
                x[C.prod_Ikb] = 1.0000
                x[C.prod_mIkb_by_nNfk] = 0.0020
                x[C.build_RnaA20] = 1.0000
                x[C.build_A20] = 0.0006
                x[C.shuttle_RnaA20] = 0.0119

            sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

            if sol is None:
                return False
            else:
                self.simulations[self.obs_names.index("nuclear_IkBa"), :,
                                 i] = x[C.Vnuc] * (sol.y[V.nNfkIkb, :] +
                                                   sol.y[V.nIkb, :])
                self.simulations[self.obs_names.index("nuclear_NFkB"), :,
                                 i] = x[C.Vnuc] * (sol.y[V.pnNfk, :] +
                                                   sol.y[V.nNfk, :] +
                                                   sol.y[V.nNfkIkb, :])
コード例 #4
0
ファイル: observable.py プロジェクト: okadalabipr/biomass
    def simulate(self, x, y0, _perturbation={}):
        if _perturbation:
            self.perturbation = _perturbation
        for i, condition in enumerate(self.conditions):
            if condition == "DD":
                pass

            sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

            if sol is None:
                return False
            else:
                self.simulations[self.obs_names.index("Per_mRNA"), :, i] = sol.y[V.MP, :]
                self.simulations[self.obs_names.index("Cry_mRNA"), :, i] = sol.y[V.MC, :]
                self.simulations[self.obs_names.index("Bmal1_mRNA"), :, i] = sol.y[V.MB, :]
コード例 #5
0
    def simulate(self, x, y0, _perturbation={}):
        if _perturbation:
            self.perturbation = _perturbation

        y0[V.Ins] = 0.01  # 0.01 nM of insulin during starvation
        sol = solve_ode(self.diffeq, y0, range(2400 + 1), tuple(x))
        if sol is None:
            return False
        else:
            y0 = sol.y[:, -1].tolist()

        for i, condition in enumerate(self.conditions):
            if condition == "Insulin 0.01":
                y0[V.Ins] = 0.01
            elif condition == "Insulin 0.03":
                y0[V.Ins] = 0.03
            elif condition == "Insulin 0.1":
                y0[V.Ins] = 0.1
            elif condition == "Insulin 0.3":
                y0[V.Ins] = 0.3
            elif condition == "Insulin 1.0":
                y0[V.Ins] = 1.0

            sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

            if sol is None:
                return False
            else:
                self.simulations[self.obs_names.index("pAKT"), :,
                                 i] = sol.y[V.pAKT, :]
                self.simulations[self.obs_names.index("pS6K"), :,
                                 i] = (sol.y[V.pS6K, :] * 83.8672192461257)
                self.simulations[self.obs_names.index("pGSK3B"), :,
                                 i] = (sol.y[V.pGSK3B, :] * 0.111097316860158)
                self.simulations[self.obs_names.index("G6Pase"), :,
                                 i] = (sol.y[V.G6Pase, :] * 0.0363622452066626)
コード例 #6
0
    def simulate(self, x, y0, _perturbation=None):
        if _perturbation is not None:
            self.perturbation = _perturbation
        # get steady state
        x[C.Ligand] = x[C.no_ligand]  # No ligand
        y0 = get_steady_state(self.diffeq, y0, tuple(x))
        if not y0:
            return False
        # add ligand
        for i, condition in enumerate(self.conditions):
            if condition == "EGF":
                x[C.Ligand] = x[C.EGF]
            elif condition == "HRG":
                x[C.Ligand] = x[C.HRG]

            sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

            if sol is None:
                return False
            else:
                self.simulations[
                    self.obs_names.index("Phosphorylated_MEKc"), :,
                    i] = sol.y[V.ppMEKc, :]
                self.simulations[
                    self.obs_names.index("Phosphorylated_ERKc"), :,
                    i] = (sol.y[V.pERKc, :] + sol.y[V.ppERKc, :])
                self.simulations[
                    self.obs_names.index("Phosphorylated_RSKw"), :,
                    i] = sol.y[V.pRSKc, :] + sol.y[V.pRSKn, :] * (x[C.Vn] /
                                                                  x[C.Vc])
                self.simulations[
                    self.obs_names.index("Phosphorylated_CREBw"), :,
                    i] = sol.y[V.pCREBn, :] * (x[C.Vn] / x[C.Vc])
                self.simulations[self.obs_names.index("dusp_mRNA"), :,
                                 i] = sol.y[V.duspmRNAc, :]
                self.simulations[self.obs_names.index("cfos_mRNA"), :,
                                 i] = sol.y[V.cfosmRNAc, :]
                self.simulations[self.obs_names.index("cFos_Protein"), :,
                                 i] = (
                                     (sol.y[V.pcFOSn, :] + sol.y[V.cFOSn, :]) *
                                     (x[C.Vn] / x[C.Vc]) + sol.y[V.cFOSc, :] +
                                     sol.y[V.pcFOSc, :])
                self.simulations[
                    self.obs_names.index("Phosphorylated_cFos"), :,
                    i] = (sol.y[V.pcFOSn, :] * (x[C.Vn] / x[C.Vc]) +
                          sol.y[V.pcFOSc, :])