def setUp(self): Monomer('A', ['a']) Monomer('B', ['b']) Parameter('ksynthA', 100) Parameter('ksynthB', 100) Parameter('kbindAB', 100) Parameter('A_init', 0) Parameter('B_init', 0) Initial(A(a=None), A_init) Initial(B(b=None), B_init) Observable("A_free", A(a=None)) Observable("B_free", B(b=None)) Observable("AB_complex", A(a=1) % B(b=1)) Rule('A_synth', None >> A(a=None), ksynthA) Rule('B_synth', None >> B(b=None), ksynthB) Rule('AB_bind', A(a=None) + B(b=None) >> A(a=1) % B(b=1), kbindAB) self.model = model # This timespan is chosen to be enough to trigger a Jacobian evaluation # on the various solvers. self.time = np.linspace(0, 1) self.solver = Solver(self.model, self.time, integrator='vode')
def setUp(self): Monomer('A', ['a']) Monomer('B', ['b']) Parameter('ksynthA', 100) Parameter('ksynthB', 100) Parameter('kbindAB', 100) Parameter('A_init', 0) Parameter('B_init', 0) Initial(A(a=None), A_init) Initial(B(b=None), B_init) Observable("A_free", A(a=None)) Observable("B_free", B(b=None)) Observable("AB_complex", A(a=1) % B(b=1)) Rule('A_synth', None >> A(a=None), ksynthA) Rule('B_synth', None >> B(b=None), ksynthB) Rule('AB_bind', A(a=None) + B(b=None) >> A(a=1) % B(b=1), kbindAB) self.model = model # Convenience shortcut for accessing model monomer objects self.mon = lambda m: self.model.monomers[m] # This timespan is chosen to be enough to trigger a Jacobian evaluation # on the various solvers. self.time = np.linspace(0, 1) self.sim = ScipyOdeSimulator(self.model, tspan=self.time, integrator='vode')
def test_integrate_with_expression(): """Ensure a model with Expressions simulates.""" Monomer('s1') Monomer('s9') Monomer('s16') Monomer('s20') # Parameters should be able to contain s(\d+) without error Parameter('ks0', 2e-5) Parameter('ka20', 1e5) Initial(s9(), Parameter('s9_0', 10000)) Observable('s1_obs', s1()) Observable('s9_obs', s9()) Observable('s16_obs', s16()) Observable('s20_obs', s20()) Expression('keff', (ks0 * ka20) / (ka20 + s9_obs)) Rule('R1', None >> s16(), ks0) Rule('R2', None >> s20(), ks0) Rule('R3', s16() + s20() >> s16() + s1(), keff) time = np.linspace(0, 40) x = odesolve(model, time)
def test_integrate_with_expression(): """Ensure a model with Expressions simulates.""" Monomer('s1') Monomer('s9') Monomer('s16') Monomer('s20') # Parameters should be able to contain s(\d+) without error Parameter('ks0', 2e-5) Parameter('ka20', 1e5) Initial(s9(), Parameter('s9_0', 10000)) Observable('s1_obs', s1()) Observable('s9_obs', s9()) Observable('s16_obs', s16()) Observable('s20_obs', s20()) Expression('keff', (ks0 * ka20) / (ka20 + s9_obs)) Rule('R1', None >> s16(), ks0) Rule('R2', None >> s20(), ks0) Rule('R3', s16() + s20() >> s16() + s1(), keff) time = np.linspace(0, 40) sim = ScipyOdeSimulator(model, tspan=time) simres = sim.run() keff_vals = simres.expressions['keff'] assert len(keff_vals) == len(time) assert np.allclose(keff_vals, 1.8181818181818182e-05)
def test_integrate_with_expression(): """Ensure a model with Expressions simulates.""" Monomer('s1') Monomer('s9') Monomer('s16') Monomer('s20') # Parameters should be able to contain s(\d+) without error Parameter('ks0', 2e-5) Parameter('ka20', 1e5) Initial(s9(), Parameter('s9_0', 10000)) Observable('s1_obs', s1()) Observable('s9_obs', s9()) Observable('s16_obs', s16()) Observable('s20_obs', s20()) Expression('keff', (ks0 * ka20) / (ka20 + s9_obs)) Rule('R1', None >> s16(), ks0) Rule('R2', None >> s20(), ks0) Rule('R3', s16() + s20() >> s16() + s1(), keff) time = np.linspace(0, 40) solver = Solver(model, time) solver.run() assert solver.yexpr_view.shape == (len(time), len(model.expressions_dynamic())) assert solver.yobs_view.shape == (len(time), len(model.observables))
def _get_gk_model(): SelfExporter.do_export = True Model() Monomer('DUSP6', ['mapk1']) Monomer('MAP2K1', ['mapk1']) Monomer('MAPK1', ['phospho', 'map2k1', 'dusp6'], {'phospho': ['u', 'p']}) Parameter('kf_mm_bind_1', 1e-06) Parameter('kr_mm_bind_1', 0.001) Parameter('kc_mm_phos_1', 0.001) Parameter('kf_dm_bind_1', 1e-06) Parameter('kr_dm_bind_1', 0.001) Parameter('kc_dm_dephos_1', 0.001) Parameter('DUSP6_0', 100.0) Parameter('MAP2K1_0', 100.0) Parameter('MAPK1_0', 100.0) Rule('MAP2K1_phospho_bind_MAPK1_phospho_1', MAP2K1(mapk1=None) + \ MAPK1(phospho='u', map2k1=None) >> MAP2K1(mapk1=1) % MAPK1(phospho='u', map2k1=1), kf_mm_bind_1) Rule('MAP2K1_phospho_MAPK1_phospho_1', MAP2K1(mapk1=1) % \ MAPK1(phospho='u', map2k1=1) >> MAP2K1(mapk1=None) + MAPK1(phospho='p', map2k1=None), kc_mm_phos_1) Rule( 'MAP2K1_dissoc_MAPK1', MAP2K1(mapk1=1) % MAPK1(map2k1=1) >> MAP2K1(mapk1=None) + MAPK1(map2k1=None), kr_mm_bind_1) Rule( 'DUSP6_dephos_bind_MAPK1_phospho_1', DUSP6(mapk1=None) + MAPK1(phospho='p', dusp6=None) >> DUSP6(mapk1=1) % MAPK1(phospho='p', dusp6=1), kf_dm_bind_1) Rule( 'DUSP6_dephos_MAPK1_phospho_1', DUSP6(mapk1=1) % MAPK1(phospho='p', dusp6=1) >> DUSP6(mapk1=None) + MAPK1(phospho='u', dusp6=None), kc_dm_dephos_1) Rule( 'DUSP6_dissoc_MAPK1', DUSP6(mapk1=1) % MAPK1(dusp6=1) >> DUSP6(mapk1=None) + MAPK1(dusp6=None), kr_dm_bind_1) Initial(DUSP6(mapk1=None), DUSP6_0) Initial(MAP2K1(mapk1=None), MAP2K1_0) Initial(MAPK1(phospho='u', map2k1=None, dusp6=None), MAPK1_0) SelfExporter.do_export = False return model
def add_gf_bolus(model, name: str, created_monomers: List[str]): bolus = Monomer(f'{name}_ext') Initial(bolus(), Parameter(f'{name}_0', 0.0), fixed=True) for created_monomer in created_monomers: koff = Parameter(f'{name}_{created_monomer}_koff', 0.1) kd = Parameter(f'{name}_{created_monomer}_kd', 1.0) kon = Expression(f'{name}_{created_monomer}_kon', kd * koff) Rule(f'{name}_ext_to_{created_monomer}', bolus() | model.monomers[created_monomer](inh=None), kon, koff)
from pysb import Model, Monomer, Parameter, Compartment, Rule, Initial, Observable Model() Compartment('compartment') Monomer('A_') Monomer('B_') Parameter('a0', 1.0) Parameter('b0', 1.0) Parameter('k1', 0.0) Parameter('k2', 0.0) Rule('conversion', A_()**compartment | B_()**compartment, k1, k2) Initial(A_()**compartment, a0) Initial(B_()**compartment, b0) Observable("A", A_()) Observable("B", B_())
Ea0_RR, energy=True) #RAF and RAFi binding EnergyPattern('ep_RI', R(i=1) % I(r=1), Gf_RI) EnergyPattern('ep_RRI', R(r=1, i=None) % R(r=1, i=2) % I(r=2), f_Gf) EnergyPattern('ep_IRRI', I(r=3) % R(r=1, i=3) % R(r=1, i=2) % I(r=2), Expression('fg_G', f_Gf + g_Gf)) Rule('RAF_binds_RAFi', R(i=None) + I(r=None) | R(i=1) % I(r=1), phi, Ea0_RI, energy=True) #Initial concentrations, mol/L Parameter('R_0', 0.01) Parameter('I_0', 0) #Set initial concentrations Initial(R(r=None, i=None), R_0) Initial(I(r=None), I_0) #Observables (all possible R and I combination independent of A) Observable('R_obs', R(r=None, i=None)) Observable('I_obs', I(r=None)) Observable('RR_obs', R(r=1, i=None) % R(r=1, i=None)) Observable('RI_obs', R(r=None, i=1) % I(r=1)) Observable('RRI_obs', R(r=1, i=None) % R(r=1, i=2) % I(r=2)) Observable('IRRI_obs', I(r=2) % R(r=1, i=2) % R(r=1, i=3) % I(r=3))
# ============================================================================= Monomer('IFN_alpha2', ['r1', 'r2']) Monomer('IFNAR1', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) Monomer('IFNAR2', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) Monomer('STAT', ['j', 'loc', 'fdbk'], {'j': ['U', 'P'], 'loc': ['Cyt', 'Nuc']}) Monomer('SOCSmRNA', ['loc', 'reg'], {'loc': ['Nuc', 'Cyt']}) Monomer('SOCS', ['site']) Monomer('R2USP18', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) # ============================================================================= # # Seed Species # ============================================================================= Initial(IFN_alpha2(r1=None, r2=None), Ia) Initial(IFNAR1(re=None, ri=None, loc='out'), R1) Parameter('fracUSP18', 0) # 0.6 is reasonable when USP18 turned on Expression('R2_0', (1 - fracUSP18) * R2) Expression('R2USP18_0', fracUSP18 * R2) Initial(IFNAR2(re=None, ri=None, loc='out'), R2_0) Initial(R2USP18(re=None, ri=None, loc='out'), R2USP18_0) Initial(STAT(j='U', loc='Cyt', fdbk=None), S) # ============================================================================= # # Observables # Use 'WILD' for ?, use 'ANY' for + # =============================================================================
Rule('PhysicalInteractionRule_2', prot(dna=None, dw=2, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=2) + prot(dna=None, dw=1, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=1) | prot(dna=None, dw=1, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=4) % prot(dna=None, dw=2, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=1) % prot(dna=None, dw=3, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=2) % prot(dna=None, dw=4, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=3), fwd_PhysicalInteractionRule_2, rvs_PhysicalInteractionRule_2) Rule('PhysicalInteractionRule_3', prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) + prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) | prot(dna=None, dw=1, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=1), fwd_PhysicalInteractionRule_3, rvs_PhysicalInteractionRule_3) Rule('PhysicalInteractionRule_4', prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) + prot(dna=None, dw=1, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=1) | prot(dna=None, dw=1, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=3) % prot(dna=None, dw=2, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=1) % prot(dna=None, dw=3, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=2), fwd_PhysicalInteractionRule_4, rvs_PhysicalInteractionRule_4) Rule('PhysicalInteractionRule_5', prot(dna=None, dw=None, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=None) + prot(dna=None, dw=None, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=None) | prot(dna=None, dw=1, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=1), fwd_PhysicalInteractionRule_5, rvs_PhysicalInteractionRule_5) Rule('RXN0_5363', prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='alpha_lactose', loc='cyt', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='alpha_ALLOLACTOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN0_5363, rvs_RXN0_5363) Rule('RXN0_5363_beta', prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='beta_lactose', loc='cyt', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='beta_ALLOLACTOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN0_5363_beta, rvs_RXN0_5363_beta) Rule('RXN0_7215', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3561', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3561', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN0_7215, rvs_RXN0_7215) Rule('RXN0_7217', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3785', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3785', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN0_7217, rvs_RXN0_7217) Rule('RXN0_7219', prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='CPD_3785', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='WATER', loc='cyt', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='beta_GALACTOSE', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='D_ARABINOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN0_7219, rvs_RXN0_7219) Rule('RXN_17726', prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='CPD_3561', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='WATER', loc='cyt', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=ANY, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=ANY) + met(name='beta_GALACTOSE', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='Fructofuranose', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN_17726, rvs_RXN_17726) Rule('RXN_17755', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3801', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='CPD_3801', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_RXN_17755, rvs_RXN_17755) Rule('TRANS_RXN_24', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='alpha_lactose', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='alpha_lactose', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_TRANS_RXN_24, rvs_TRANS_RXN_24) Rule('TRANS_RXN_24_beta', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='beta_lactose', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='beta_lactose', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_TRANS_RXN_24_beta, rvs_TRANS_RXN_24_beta) Rule('TRANS_RXN_94', prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='per', dna=None, met=None, prot=None, rna=None) + met(name='MELIBIOSE', loc='per', dna=None, met=None, prot=None, rna=None) | prot(dna=None, dw=None, loc='imem', met=None, name='lacY', prot=None, rna=None, up=None) + met(name='PROTON', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='MELIBIOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_TRANS_RXN_94, rvs_TRANS_RXN_94) Initial(prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None), t0_prot_lacA_cyt) Initial(prot(dna=None, dw=None, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=None), t0_prot_lacI_cyt) Initial(prot(dna=None, dw=None, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=None), t0_prot_lacZ_cyt) Initial(prot(dna=None, dw=1, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) % prot(dna=None, dw=2, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=1) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=2), t0_cplx_lacAx3_cyt) Initial(prot(dna=None, dw=1, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacA', prot=None, rna=None, up=1), t0_cplx_lacAx2_cyt) Initial(prot(dna=None, dw=1, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacI', prot=None, rna=None, up=1), t0_cplx_lacIx2_cyt) Initial(prot(dna=None, dw=1, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=None) % prot(dna=None, dw=2, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=1) % prot(dna=None, dw=3, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=2) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=3), t0_cplx_lacZx4_cyt) Initial(prot(dna=None, dw=1, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=None) % prot(dna=None, dw=None, loc='cyt', met=None, name='lacZ', prot=None, rna=None, up=1), t0_cplx_lacZx2_cyt) Initial(met(name='ACETYL_COA', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_ACETYL_COA_cyt) Initial(met(name='CO_A', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CO_A_cyt) Initial(met(name='CPD_3561', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3561_cyt) Initial(met(name='CPD_3785', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3785_cyt) Initial(met(name='CPD_3801', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3801_cyt) Initial(met(name='D_ARABINOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_D_ARABINOSE_cyt) Initial(met(name='Fructofuranose', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_Fructofuranose_cyt) Initial(met(name='MELIBIOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_MELIBIOSE_cyt)
Rule('synthesis_EGF', None >> EGF(inh=None), EGF_synthesis_rate) Rule('degradation_EGF', EGF() >> None, EGF_degradation_rate) Rule('EGF_ext_to_EGF', EGF_ext() | EGF(inh=None), EGF_EGF_kon, EGF_EGF_koff) Rule('synthesis_EGFR', None >> EGFR(Y1173='u', inh=None), EGFR_synthesis_rate) Rule('degradation_EGFR', EGFR() >> None, EGFR_degradation_rate) Rule('EGFR_Y1173_base', EGFR(Y1173='p') | EGFR(Y1173='u'), EGFR_phosphorylation_Y1173_base_rate, EGFR_dephosphorylation_Y1173_base_rate) Rule('synthesis_ERBB2', None >> ERBB2(Y1248='u', inh=None), ERBB2_synthesis_rate) Rule('degradation_ERBB2', ERBB2() >> None, ERBB2_degradation_rate) Rule('ERBB2_Y1248_base', ERBB2(Y1248='p') | ERBB2(Y1248='u'), ERBB2_phosphorylation_Y1248_base_rate, ERBB2_dephosphorylation_Y1248_base_rate) Rule('EGFR_phosphorylation_Y1173_EGF', EGFR(Y1173='u') >> EGFR(Y1173='p'), EGFR_phosphorylation_Y1173_EGF_rate) Rule('ERBB2_phosphorylation_Y1248_EGF', ERBB2(Y1248='u') >> ERBB2(Y1248='p'), ERBB2_phosphorylation_Y1248_EGF_rate) Rule('iEGFR_inhibits_EGFR', EGFR(inh=None) + iEGFR(target=None) | EGFR(inh=1) % iEGFR(target=1), iEGFR_EGFR_kon, iEGFR_EGFR_koff) Initial(EGF(inh=None), EGF_ss) Initial(EGF_ext(), EGF_0, fixed=True) Initial(EGFR(Y1173='u', inh=None), EGFR_ss) Initial(ERBB2(Y1248='u', inh=None), ERBB2_ss) Initial(iEGFR(target=None), iEGFR_0, fixed=True)
# ============================================================================= # # Molecules # ============================================================================= Monomer('IFN_alpha2', ['r1', 'r2']) Monomer('IFNAR1', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) Monomer('IFNAR2', ['re', 'ri', 'rs', 'loc'], {'loc': ['in', 'out']}) Monomer('STAT', ['j', 'loc', 'fdbk'], {'j': ['U', 'P'], 'loc': ['Cyt', 'Nuc']}) Monomer('SOCSmRNA', ['loc', 'reg'], {'loc': ['Nuc', 'Cyt']}) Monomer('SOCS', ['site']) # ============================================================================= # # Seed Species # ============================================================================= Initial(IFN_alpha2(r1=None, r2=None), I) Initial(IFNAR1(re=None, ri=None, loc='out'), R1) Initial(IFNAR2(re=None, ri=None, rs=None, loc='out'), R2) Initial(STAT(j='U', loc='Cyt', fdbk=None), S) # ============================================================================= # # Observables # Use 'WILD' for ?, use 'ANY' for + # ============================================================================= Observable('Free_Ia', IFN_alpha2(r1=None, r2=None)) Observable('Free_R1', IFNAR1(re=None, ri=None, loc='out')) Observable('Free_R2', IFNAR2(re=None, ri=None, rs=None, loc='out')) Observable('R1Ia',
| cplx(name='GALACTOACETYLTRAN_CPLX', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='_6_Acetyl_beta_D_Galactose', loc='cyt', dna=None, met=None, prot=None, rna=None) + met(name='CO_A', loc='cyt', dna=None, met=None, prot=None, rna=None), fwd_GALACTOACETYLTRAN_RXN_galactose, rvs_GALACTOACETYLTRAN_RXN_galactose) Initial( met(name='ACETYL_COA', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_ACETYL_COA_cyt) Initial(met(name='CO_A', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CO_A_cyt) Initial( met(name='CPD_3561', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3561_cyt) Initial( met(name='CPD_3785', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3785_cyt) Initial( met(name='CPD_3801', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_CPD_3801_cyt) Initial( met(name='D_ARABINOSE', loc='cyt', dna=None, met=None, prot=None, rna=None), t0_met_D_ARABINOSE_cyt)
from pysb import ANY, WILD, Model, Monomer, Parameter, Expression, Initial, Observable, Rule from pysb.macros import * Model() ################################################################################################### # DNA Monomer('DNA_rpoA', ['type'], {'type': ['P1', 'RBS', 'CDS', 'T1']}) Initial(DNA_rpoA(type = 'P1'), Parameter('t0_DNA_rpoA_P1', 1)) Initial(DNA_rpoA(type = 'RBS'), Parameter('t0_DNA_rpoA_RBS', 1)) Initial(DNA_rpoA(type = 'CDS'), Parameter('t0_DNA_rpoA_CDS', 1)) Initial(DNA_rpoA(type = 'T1'), Parameter('t0_DNA_rpoA_T1', 1)) Monomer('DNA_rpoB', ['type'], {'type': ['P1', 'RBS', 'CDS', 'T1']}) Initial(DNA_rpoB(type = 'P1'), Parameter('t0_DNA_rpoB_P1', 1)) Initial(DNA_rpoB(type = 'RBS'), Parameter('t0_DNA_rpoB_RBS', 1)) Initial(DNA_rpoB(type = 'CDS'), Parameter('t0_DNA_rpoB_CDS', 1)) Monomer('DNA_rpoC', ['type'], {'type': ['RBS', 'CDS', 'T1']}) Initial(DNA_rpoC(type = 'RBS'), Parameter('t0_DNA_rpoC_RBS', 1)) Initial(DNA_rpoC(type = 'CDS'), Parameter('t0_DNA_rpoC_CDS', 1)) Initial(DNA_rpoC(type = 'T1'), Parameter('t0_DNA_rpoC_T1', 1)) Monomer('DNA_rpoD', ['type'], {'type': ['P1', 'RBS', 'CDS', 'T1']}) Initial(DNA_rpoD(type = 'P1'), Parameter('t0_DNA_rpoD_P1', 1)) Initial(DNA_rpoD(type = 'RBS'), Parameter('t0_DNA_rpoD_RBS', 1)) Initial(DNA_rpoD(type = 'CDS'), Parameter('t0_DNA_rpoD_CDS', 1)) Initial(DNA_rpoD(type = 'T1'), Parameter('t0_DNA_rpoD_T1', 1)) Monomer('DNA_rpoE', ['type'], {'type': ['P1', 'RBS', 'CDS', 'T1']}) Initial(DNA_rpoE(type = 'P1'), Parameter('t0_DNA_rpoE_P1', 1))
Monomer('A', ['B', 'C']) Monomer('B', ['A', 'D']) Monomer('C', ['A']) Monomer('D', ['B']) Parameter('inhibition_0_A_inhibitor_B_inh_target_2kf_0', 1.5e-05) Parameter('inhibition_0_A_inhibitor_B_inh_target_1kr_0', 0.00012) Parameter('inhibition_0_A_inhibitor_C_inh_target_2kf_0', 4e-05) Parameter('inhibition_0_A_inhibitor_C_inh_target_1kr_0', 7e-06) Parameter('inhibition_0_B_inhibitor_D_inh_target_2kf_0', 1e-05) Parameter('inhibition_0_B_inhibitor_D_inh_target_1kr_0', 6e-06) Parameter('A_0', 200000.0) Parameter('B_0', 50000.0) Parameter('C_0', 20000.0) Parameter('D_0', 10000.0) Observable('A_obs', A()) Observable('B_obs', B()) Observable('C_obs', C()) Observable('D_obs', D()) Rule('inhibition_0_A_inhibitor_B_inh_target', A(B=None, C=None) + B(A=None, D=None) | A(B=1, C=None) % B(A=1, D=None), inhibition_0_A_inhibitor_B_inh_target_2kf_0, inhibition_0_A_inhibitor_B_inh_target_1kr_0) Rule('inhibition_0_A_inhibitor_C_inh_target', A(B=None, C=None) + C(A=None) | A(B=None, C=1) % C(A=1), inhibition_0_A_inhibitor_C_inh_target_2kf_0, inhibition_0_A_inhibitor_C_inh_target_1kr_0) Rule('inhibition_0_B_inhibitor_D_inh_target', B(A=None, D=None) + D(B=None) | B(A=None, D=1) % D(B=1), inhibition_0_B_inhibitor_D_inh_target_2kf_0, inhibition_0_B_inhibitor_D_inh_target_1kr_0) Initial(A(B=None, C=None), A_0) Initial(B(A=None, D=None), B_0) Initial(C(A=None), C_0) Initial(D(B=None), D_0) Observable('AB_complex',A(B=1)%B(A=1))
Rule( 'MEK_p1_p1_phosphorylation_ERK_0', MEK(RAF=None, p1_site='p', ERK=None) + ERK(p1_site='u', p70S6K=None, IRS1=None, GSK3=None, MEK=None) <> MEK(RAF=None, p1_site='p', ERK=1) % ERK(p1_site='u', p70S6K=None, IRS1=None, GSK3=None, MEK=1), MEK_p1_p1_phosphorylation_ERK_0_2kf, MEK_p1_p1_phosphorylation_ERK_0_1kr) Rule( 'MEK_p1_p1_phosphorylation_ERK_1', MEK(RAF=None, p1_site='p', ERK=1) % ERK(p1_site='u', p70S6K=None, IRS1=None, GSK3=None, MEK=1) >> MEK(RAF=None, p1_site='p', ERK=None) + ERK(p1_site='p', p70S6K=None, IRS1=None, GSK3=None, MEK=None), MEK_p1_p1_phosphorylation_ERK_1_1kc) Initial(RAF(state='I', MEK=None), RAF_0_0) Initial(RAF(state='A', MEK=None), RAF_1_0) Initial(TGFa(EGFR=None), TGFa_0_0) Initial(IGF1R(state='A', IGF1=None), IGF1R_0_0) Initial(IGF1R(state='I', IGF1=None), IGF1R_1_0) Initial(IGF1(IGF1R=None), IGF1_0_0) Initial(PI3K(state='I', AKT=None), PI3K_0_0) Initial(PI3K(state='A', AKT=None), PI3K_1_0) Initial(p70S6K(AKT=None, p1_site='u', ERK=None), p70S6K_0_0) Initial(p70S6K(AKT=None, p1_site='p', ERK=None), p70S6K_1_0) Initial(EGFR(state='A', TGFa=None), EGFR_0_0) Initial(EGFR(state='I', TGFa=None), EGFR_1_0) Initial(IRS1(AKT=None, p1_site='u', ERK=None), IRS1_0_0) Initial(IRS1(AKT=None, p1_site='p', ERK=None), IRS1_1_0) Initial(MEK(RAF=None, p1_site='u', ERK=None), MEK_0_0) Initial(MEK(RAF=None, p1_site='p', ERK=None), MEK_1_0)
EnergyPattern('ep_IRRI', I(r=3) % R(r=1, i=3) % R(r=1, i=2) % I(r=2), Expression('fg_G', f_Gf + g_Gf)) Rule('RAF_binds_RAFi', R(i=None) + I(r=None) | R(i=1) % I(r=1), phi, Ea0_RI, energy=True) #Initial concentrations, mol/L Parameter('A_0', 0.1) Parameter('R_0', 0.01) Parameter('I_0', 0) #Set initial concentrations Initial(A(r=None), A_0) Initial(R(a=None, r=None, i=None), R_0) Initial(I(r=None), I_0) #Observables #not inhibited RAF monomer Observable('RAF_monomer_not_I_bound_obs', R(r=None, i=None)) #not inhibited RAF promoter in dimer Observable('RAF_dimer_not_I_bound_obs', R(r=1, i=None) % R(r=1)) #not inhibited RAF monomers and promoter in dimer Observable('RAF_monomer_and_dimer_not_I_bound_obs', R(r=None, i=None) + R(r=1, i=None) % R(r=1)) ## RAS binding RAF #Parameter('G_AR',1 / RT) #Parameter('r_G', 1 / RT)
Rule('translation', s() >> s() + p(b=None), k_p) # Translation reaction Rule('splicing', u() >> s(), beta) # splicing reaction Rule('death_s', s() >> None, d_s) # Degradation reactions Rule('death_p', p(b=None) >> None, d_p) Rule('g_bind', g(b=None) + p(b=None) | g(b=1) % p(b=1), b_f, b_r) # gene-protein binding reaction # ------------------------------------------------ # initial conditions Parameter('g_0', 1) Parameter('u_0', 0) Parameter('s_0', 0) Parameter('p_0', 0) Initial(g(b=None), g_0) Initial(u, u_0) Initial(s, s_0) Initial(p(b=None), p_0) # Observables Observable('o_g_0', g(b=None)) Observable('o_g_1', g(b=1) % p(b=1)) Observable('o_u', u) Observable('o_s', s) Observable('o_p', p(b=None))
u'PPM1D_deactivates_TP53_activity', PPM1D(activity=u'active') + TP53(activity=u'active') >> PPM1D(activity=u'active') + TP53(activity=u'inactive'), kf_pt_act_1) Rule( u'MDM2_deactivates_TP53_activity', MDM2(activity=u'active') + TP53(activity=u'active') >> MDM2(activity=u'active') + TP53(activity=u'inactive'), kf_mt_act_1) Rule( u'HIPK2_deactivates_PPM1D_activity', HIPK2() + PPM1D(activity=u'active') >> HIPK2() + PPM1D(activity=u'inactive'), kf_hp_act_1) Rule(u'ARF_deactivates_MDM2_activity', ARF() + MDM2(activity=u'active') >> ARF() + MDM2(activity=u'inactive'), kf_am_act_1) Initial(PPM1D(activity=u'inactive'), PPM1D_0) Initial(TP53(activity=u'inactive'), TP53_0) Initial(HIPK2(), HIPK2_0) Initial(ATR(activity=u'inactive'), ATR_0) Initial(ARF(), ARF_0) Initial(MDM2(activity=u'inactive'), MDM2_0) Initial(ATR(activity=u'active'), ATRa_0) Annotation(PPM1D, u'http://identifiers.org/hgnc/HGNC:9277', u'is') Annotation(PPM1D, u'http://identifiers.org/uniprot/O15297', u'is') Annotation(TP53, u'http://identifiers.org/hgnc/HGNC:11998', u'is') Annotation(TP53, u'http://identifiers.org/uniprot/P04637', u'is') Annotation(HIPK2, u'http://identifiers.org/uniprot/Q9H2X6', u'is') Annotation(HIPK2, u'http://identifiers.org/hgnc/HGNC:14402', u'is') Annotation(ATR, u'http://identifiers.org/uniprot/Q13535', u'is') Annotation(ATR, u'http://identifiers.org/hgnc/HGNC:882', u'is')
pore_transport_complex_BakA_4_SmacM_kf, pore_transport_complex_BakA_4_SmacM_kr) Rule( 'pore_transport_dissociate_BakA_4_SmacC', MatchOnce( Bak(bf=5, s1=4, s2=1, state='A') % Bak(bf=None, s1=1, s2=2, state='A') % Bak(bf=None, s1=2, s2=3, state='A') % Bak(bf=None, s1=3, s2=4, state='A') % Smac(bf=5, state='M')) >> MatchOnce( Bak(bf=None, s1=4, s2=1, state='A') % Bak(bf=None, s1=1, s2=2, state='A') % Bak(bf=None, s1=2, s2=3, state='A') % Bak(bf=None, s1=3, s2=4, state='A')) + Smac(bf=None, state='C'), pore_transport_dissociate_BakA_4_SmacC_kc) Initial(L(bf=None), L_0) Initial(R(bf=None), R_0) Initial(flip(bf=None), Flip_0) Initial(C8(bf=None, state='pro'), C8_0) Initial(BAR(bf=None), BAR_0) Initial(Apaf(bf=None, state='I'), Apaf_0) Initial(C3(bf=None, state='pro'), C3_0) Initial(C6(bf=None, state='pro'), C6_0) Initial(C9(bf=None), C9_0) Initial(PARP(bf=None, state='U'), PARP_0) Initial(XIAP(bf=None), XIAP_0) Initial(Bid(bf=None, state='U'), Bid_0) Initial(Bax(bf=None, s1=None, s2=None, state='C'), Bax_0) Initial(Bak(bf=None, s1=None, s2=None, state='M'), Bak_0) Initial(Bcl2(bf=None, state='M'), Bcl2_0) Initial(BclxL(bf=None, state='M'), BclxL_0)
# # Molecules # ============================================================================= Monomer('IFN_alpha2', ['r1', 'r2']) Monomer('IFN_beta', ['r1', 'r2']) Monomer('IFNAR1', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) Monomer('IFNAR2', ['re', 'ri', 'loc'], {'loc': ['in', 'out']}) Monomer('STAT', ['j', 'loc', 'fdbk'], {'j': ['U', 'P'], 'loc': ['Cyt', 'Nuc']}) Monomer('SOCS', ['site']) # ============================================================================= # # Seed Species # ============================================================================= Initial(IFN_alpha2(r1=None, r2=None), Ia) Initial(IFN_beta(r1=None, r2=None), Ib) Initial(IFNAR1(re=None, ri=None, loc='out'), R1) Initial(IFNAR2(re=None, ri=None, loc='out'), R2) Initial(STAT(j='U', loc='Cyt', fdbk=None), S) Initial(STAT(j='P', loc='Cyt', fdbk=None), pS) Initial(SOCS(site=None), Initial_SOCS) # ============================================================================= # # Observables # ============================================================================= Observable('Free_Ia', IFN_alpha2(r1=None, r2=None)) Observable('Free_Ib', IFN_beta(r1=None, r2=None))
MAP2K1_phosphorylation_S222_BRAF__S445_p_rate) Rule('MAP2K2_phosphorylation_S226_RAF1__S338_p', MAP2K2(S226='u', S222='u') >> MAP2K2(S226='p', S222='p'), MAP2K2_phosphorylation_S226_RAF1__S338_p_rate) Rule('MAP2K2_phosphorylation_S226_BRAF__S445_p', MAP2K2(S226='u', S222='u') >> MAP2K2(S226='p', S222='p'), MAP2K2_phosphorylation_S226_BRAF__S445_p_rate) Rule('MAPK1_phosphorylation_Y187_MAP2K1__S218_p__S222_p', MAPK1(Y187='u', T185='u') >> MAPK1(Y187='p', T185='p'), MAPK1_phosphorylation_Y187_MAP2K1__S218_p__S222_p_rate) Rule('MAPK1_phosphorylation_Y187_MAP2K2__S222_p__S226_p', MAPK1(Y187='u', T185='u') >> MAPK1(Y187='p', T185='p'), MAPK1_phosphorylation_Y187_MAP2K2__S222_p__S226_p_rate) Rule('MAPK3_phosphorylation_Y204_MAP2K1__S218_p__S222_p', MAPK3(T202='u', Y204='u') >> MAPK3(T202='p', Y204='p'), MAPK3_phosphorylation_Y204_MAP2K1__S218_p__S222_p_rate) Rule('MAPK3_phosphorylation_Y204_MAP2K2__S222_p__S226_p', MAPK3(T202='u', Y204='u') >> MAPK3(T202='p', Y204='p'), MAPK3_phosphorylation_Y204_MAP2K2__S222_p__S226_p_rate) Initial(EGF(inh=None), EGF_eq) Initial(EGF_ext(), EGF_0, fixed=True) Initial(EGFR(Y1173='u', inh=None), EGFR_eq) Initial(ERBB2(Y1248='u', inh=None), ERBB2_eq) Initial(RAF1(S338='u', inh=None), RAF1_eq) Initial(BRAF(S445='u', inh=None), BRAF_eq) Initial(MAP2K1(S218='u', S222='u', inh=None), MAP2K1_eq) Initial(MAP2K2(S226='u', S222='u', inh=None), MAP2K2_eq) Initial(MAPK1(Y187='u', T185='u', inh=None), MAPK1_eq) Initial(MAPK3(T202='u', Y204='u', inh=None), MAPK3_eq)
Parameter('INPUT_ERBB2_phosphorylation_Y1248_EGF_kcat', 0.0) Expression('EGF_synthesis_ksyn', EGF_degradation_kdeg*EGF_eq) Expression('EGF_synthesis_rate', EGF_synthesis_ksyn*INPUT_EGF_eq) Expression('EGF_degradation_rate', EGF_degradation_kdeg) Expression('EGF_ss', EGF_synthesis_rate/EGF_degradation_rate) Expression('EGF_EGF_kon', EGF_EGF_kd*EGF_EGF_koff) Expression('ERBB2_synthesis_ksyn', ERBB2_degradation_kdeg*ERBB2_eq) Expression('ERBB2_synthesis_rate', ERBB2_synthesis_ksyn*INPUT_ERBB2_eq) Expression('ERBB2_degradation_rate', ERBB2_degradation_kdeg) Expression('ERBB2_ss', ERBB2_synthesis_rate/ERBB2_degradation_rate) Expression('ERBB2_phosphorylation_Y1248_base_rate', ERBB2_phosphorylation_Y1248_base_kcat*INPUT_ERBB2_phosphorylation_Y1248_base_kcat) Expression('ERBB2_dephosphorylation_Y1248_base_rate', ERBB2_dephosphorylation_Y1248_base_kcat*INPUT_ERBB2_dephosphorylation_Y1248_base_kcat) Observable('EGF_obs', EGF(inh=None)) Observable('tEGF', EGF()) Observable('tEGF_ext', EGF_ext()) Observable('tERBB2', ERBB2()) Observable('pERBB2_Y1248', ERBB2(Y1248='p')) Expression('ERBB2_phosphorylation_Y1248_EGF_rate', EGF_obs*ERBB2_phosphorylation_Y1248_EGF_kcat*INPUT_ERBB2_phosphorylation_Y1248_EGF_kcat) Rule('EGF_ext_to_EGF', EGF_ext() | EGF(inh=None), EGF_EGF_kon, EGF_EGF_koff) Rule('ERBB2_Y1248_base', ERBB2(Y1248='p') >> ERBB2(Y1248='u'), ERBB2_dephosphorylation_Y1248_base_rate) Rule('ERBB2_phosphorylation_Y1248_EGF', ERBB2(Y1248='u') >> ERBB2(Y1248='p'), ERBB2_phosphorylation_Y1248_EGF_rate) Initial(EGF(inh=None), EGF_ss) Initial(EGF_ext(), EGF_0, fixed=True) Initial(ERBB2(Y1248='u', inh=None), ERBB2_ss)
ep_RAF_RAF_mod_RAFi_double_Gf) EnergyPattern( 'ep_CRAF_CRAF_mod_RAFi_double', CRAF(raf=1, rafi=2) % CRAF(raf=1, rafi=3) % RAFi(raf=2) % RAFi(raf=3), ep_RAF_RAF_mod_RAFi_double_Gf) EnergyPattern('ep_bind_BRAF_MEKphosphou', BRAF(mek=1) % MEK(phospho='u', raf=1), Gf_bind_BRAF_MEKphosphou) EnergyPattern('ep_bind_CRAF_MEKphosphou', CRAF(mek=1) % MEK(phospho='u', raf=1), Gf_bind_CRAF_MEKphosphou) EnergyPattern('ep_bind_MEKi_MEK', MEK(meki=1) % MEKi(mek=1), Gf_bind_MEKi_MEK) EnergyPattern('ep_MEKphosphop_MEKi_single', MEK(meki=1, phospho='p') % MEKi(mek=1), ep_MEKphosphop_MEKi_Gf) EnergyPattern('ep_SOS1S1134p_GRB2_single', GRB2(SH3=1) % SOS1(S1134='p', SH3=1), ep_SOS1S1134p_GRB2_Gf) Initial(RAFi(raf=None), initRAFi, fixed=True) Initial(MEKi(mek=None), initMEKi, fixed=True) Initial(EGF(rtk=None), initEGF, fixed=True) Initial(BRAF(AA600='E', RBD=None, mek=None, raf=None, rafi=None), initBRAF) Initial(CRAF(RBD=None, mek=None, raf=None, rafi=None), initCRAF) Initial(RAS(raf=None, sos1=None, state='gdp'), initRAS) Initial(MEK(Dsite=None, meki=None, phospho='u', raf=None), initMEK) Initial(ERK(CD=None, phospho='u'), initERK) Initial(GRB2(SH2=None, SH3=None), initGRB2) Initial(SOS1(S1134='u', SH3=None, ras=None), initSOS1) Annotation(RAFi, 'http://identifiers.org/chebi/63637', 'is') Annotation(MEKi, 'http://identifiers.org/chebi/90851', 'is') Annotation(EGF, 'http://identifiers.org/uniprot/P01133', 'is') Annotation(EGFR, 'http://identifiers.org/uniprot/P00533', 'is') Annotation(GRB2, 'http://identifiers.org/uniprot/P62993', 'is')
Rule('MAPK1_Y187_base', MAPK1(Y187='p') >> MAPK1(Y187='u'), MAPK1_dephosphorylation_Y187_base_rate) Rule('MAPK3_Y204_base', MAPK3(Y204='p') >> MAPK3(Y204='u'), MAPK3_dephosphorylation_Y204_base_rate) Rule('MAPK3_T202_base', MAPK3(T202='p') >> MAPK3(T202='u'), MAPK3_dephosphorylation_T202_base_rate) Rule('RAF1_phosphorylation_S338_KRAS__N_gtp', RAF1(S338='u') >> RAF1(S338='p'), RAF1_phosphorylation_S338_KRAS__N_gtp_rate) Rule('RAF1_phosphorylation_S338_HRAS__N_gtp', RAF1(S338='u') >> RAF1(S338='p'), RAF1_phosphorylation_S338_HRAS__N_gtp_rate) Rule('RAF1_phosphorylation_S338_NRAS__N_gtp', RAF1(S338='u') >> RAF1(S338='p'), RAF1_phosphorylation_S338_NRAS__N_gtp_rate) Rule('BRAF_phosphorylation_S447_KRAS__N_gtp', BRAF(S447='u') >> BRAF(S447='p'), BRAF_phosphorylation_S447_KRAS__N_gtp_rate) Rule('BRAF_phosphorylation_S447_HRAS__N_gtp', BRAF(S447='u') >> BRAF(S447='p'), BRAF_phosphorylation_S447_HRAS__N_gtp_rate) Rule('BRAF_phosphorylation_S447_NRAS__N_gtp', BRAF(S447='u') >> BRAF(S447='p'), BRAF_phosphorylation_S447_NRAS__N_gtp_rate) Rule('MAP2K1_phosphorylation_S222_RAF1__S338_p', MAP2K1(S222='u', S218='u') >> MAP2K1(S222='p', S218='p'), MAP2K1_phosphorylation_S222_RAF1__S338_p_rate) Rule('MAP2K1_phosphorylation_S222_BRAF__S447_p', MAP2K1(S222='u', S218='u') >> MAP2K1(S222='p', S218='p'), MAP2K1_phosphorylation_S222_BRAF__S447_p_rate) Rule('MAP2K2_phosphorylation_S226_RAF1__S338_p', MAP2K2(S222='u', S226='u') >> MAP2K2(S222='p', S226='p'), MAP2K2_phosphorylation_S226_RAF1__S338_p_rate) Rule('MAP2K2_phosphorylation_S226_BRAF__S447_p', MAP2K2(S222='u', S226='u') >> MAP2K2(S222='p', S226='p'), MAP2K2_phosphorylation_S226_BRAF__S447_p_rate) Rule('MAPK1_phosphorylation_Y187_MAP2K1__S218_p__S222_p', MAPK1(T185='u', Y187='u') >> MAPK1(T185='p', Y187='p'), MAPK1_phosphorylation_Y187_MAP2K1__S218_p__S222_p_rate) Rule('MAPK1_phosphorylation_Y187_MAP2K2__S222_p__S226_p', MAPK1(T185='u', Y187='u') >> MAPK1(T185='p', Y187='p'), MAPK1_phosphorylation_Y187_MAP2K2__S222_p__S226_p_rate) Rule('MAPK3_phosphorylation_Y204_MAP2K1__S218_p__S222_p', MAPK3(Y204='u', T202='u') >> MAPK3(Y204='p', T202='p'), MAPK3_phosphorylation_Y204_MAP2K1__S218_p__S222_p_rate) Rule('MAPK3_phosphorylation_Y204_MAP2K2__S222_p__S226_p', MAPK3(Y204='u', T202='u') >> MAPK3(Y204='p', T202='p'), MAPK3_phosphorylation_Y204_MAP2K2__S222_p__S226_p_rate) Initial(FL(inh=None), FL_eq) Initial(FLT3(Y843='u', inh=None), FLT3_eq) Initial(HRAS(N='gdp', inh=None), HRAS_eq) Initial(KRAS(N='gdp', inh=None), KRAS_eq) Initial(NRAS(N='gdp', inh=None), NRAS_eq) Initial(RAF1(S338='u', inh=None), RAF1_eq) Initial(BRAF(S447='u', inh=None), BRAF_eq) Initial(MAP2K1(S222='u', S218='u', inh=None), MAP2K1_eq) Initial(MAP2K2(S222='u', S226='u', inh=None), MAP2K2_eq) Initial(MAPK1(T185='u', Y187='u', inh=None), MAPK1_eq) Initial(MAPK3(Y204='u', T202='u', inh=None), MAPK3_eq)
Observable('Atot', A()) Observable('Btot', B()) Observable('Ctot', C()) Observable('AB0', A(b=MultiState(None, None, None)), match='species') Observable('AB1', A(b=MultiState(1, None, None)) % B(a=1), match='species') Observable('AB2', A(b=MultiState(1, 2, None)) % B(a=1) % B(a=2), match='species') Observable('AB3', A(b=MultiState(1, 2, 3)) % B(a=1) % B(a=2) % B(a=3), match='species') Observable('AB_motif', A(b=1) % B(a=1)) Tag('x') Expression('f_synth', k_synthC * AB_motif(x)**2) # A synthesizes C with rate dependent on bound B Rule('_R1', A() @ x >> A() @ x + C(), f_synth) # A binds B Rule('_R2', A(b=None) + B(a=None) | A(b=1) % B(a=1), kp, km) # degradation of C Rule('_R3', C() >> None, k_degrC) Initial(A(b=MultiState(None, None, None)), Ab_b_b_0) Initial(B(a=None), Ba_0) Initial(C(), C_0)
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('A', ['B']) Monomer('B', ['A']) Parameter('inhibition_0_A_inhibitor_B_inh_target_2kf_0', 1.5e-05) Parameter('inhibition_0_A_inhibitor_B_inh_target_1kr_0', 0.00012) Parameter('A_0', 200000.0) Parameter('B_0', 50000.0) Observable('A_obs', A()) Observable('B_obs', B()) Rule('inhibition_0_A_inhibitor_B_inh_target', A(B=None) + B(A=None) | A(B=1) % B(A=1), inhibition_0_A_inhibitor_B_inh_target_2kf_0, inhibition_0_A_inhibitor_B_inh_target_1kr_0) Initial(A(B=None), A_0) Initial(B(A=None), B_0) Observable('AB_complex', A(B=1) % B(A=1))
#Define individual species in model Monomer('COX2', ['allo', 'cat']) #Cyclooxygenase-2 enzyme Monomer('AG', ['b']) #2-arachidonoylglycerol, a substrate of COX2 Monomer('AA', ['b']) #arachidonic acid, a substrate of COX2 Monomer('PG') #Prostaglandin, product of COX2 turnover of AA Monomer('PGG') #Prostaglandin glycerol, product of COX2 turnover of 2-AG #Initial starting concentrations in micromolar Parameter('COX2_0', 15e-3) Parameter('AG_0', 16) Parameter('AA_0', 16) Parameter('PG_0', 0) Parameter('PGG_0', 0) Initial(COX2(allo=None, cat=None), COX2_0) Initial(AG(b=None), AG_0) Initial(AA(b=None), AA_0) Initial(PG(), PG_0) Initial(PGG(), PGG_0) #All kf parameters are in units of inverse microM*s #All kr parameters are in units of inverse s #All kcat parameters are in units of inverse s #the forward reaction is association; the reverse is disassociation #Rates for AA and COX2 interactions at catalytic site #AA binding/turnover at catalytic site with nothing in allosteric site Parameter('kf_AA_cat1', 1000.0) Parameter('kr_AA_cat1', 830) Parameter('kcat_AA1', 1.3)
''' Dimerization model: A + A <> AA ''' from pysb import Model, Parameter, Monomer, Rule, Observable, Initial Model() ####### V = 100. ####### Parameter('kf', 0.001) Parameter('kr', 1.) Monomer('A', ['d']) # Rules Rule('ReversibleBinding', A(d=None) + A(d=None) | A(d=1) % A(d=1), kf, kr) #Observables Observable("A_free", A(d=None)) Observable("A_dimer", A(d=1) % A(d=1)) # Inital Conditions Parameter("A_0", 20.*V) Initial(A(d=None), A_0)