PathwayLab Mathematica Help Browser Contents

Introduction

PathwayLab is a software tool for modeling, analysis, and information management of biochemical pathways. The tool streamlines the pathway building process by its rich and flexible set of graphical building blocks for specifying biochemical entities, reaction, and control mechanisms. The pathway models are built using drag and drop from stencils into a drawing page. This makes it very easy to rapidly build models of biochemical reaction networks such as metabolic pathways, signaling and gene regulatory networks.

A pathway model defined in PathwayLab can be exported to a Mathematica m-file as a pathway model object. This file can be loaded into Mathematica and the PathwayLab application package provides functions to extract information from such pathway model objects. The built-in capabilities of Mathematica can the be utilized for computational analysis such as transient and steady state analysis, stability analysis, sensitivity analysis, and parameter estimation. Hence, PathwayLab and its integration with Mathematica provides a powerful environment for modeling and computational analysis of biochemical reaction networks.

Overview

The PathwayLab package provides functions to extract information from pathway model objects exported from the PathwayLab software.

This loads the package.

In[1]:=

Needs["PathwayLab`"]

In the Examples folder there is a file FirstExample.vsd that contains a small pathway model, see the figure below. There is also a file FirstExample.m that contains a Mathematica expression for the pathway model. In PathwayLab any pathway model can be exported to an m-file by the menu command Export to ... Mathematica.

        [Graphics:HTMLFiles/index_2.gif]

        A small pathway model.

Load the model and store it in a variable. The standard print form of a pathway model object Pathway[] contains information about the number of states, rates, and parameters of the model.

In[2]:=

pw = Get[ToFileName[{"PathwayLab", "Examples"}, "FirstExample.m"]]

Out[2]=

-Pathway[3 state variables, 2 rate variables, 5 parameters]-

RateEquations[pwobject] the rate equations of the pwobject
InitialConditions[pwobject] the initial equations of the pwobject

Functions for extracting equations from pwobjects.

The rate equations of the model.

In[3]:=

RateEquations[pw]

Out[3]=

The rate equations can also be presented with the parameters substituted by their default numerical values.

In[4]:=

RateEquations[pw, EquationFormat→Numeric]

Out[4]=

{X1^′[t] == -X1[t]/(1 + X1[t] + X3[t]), X3^′[t] == X2[t]/(1 + X2[t]), X2^′[t] == -X2[t]/(1 + X2[t]) + X1[t]/(1 + X1[t] + X3[t])}

They can also be given as mass balances, i.e., formulated in terms of the rate variables.

In[5]:=

RateEquations[pw, EquationFormat→MassBalances]

Out[5]=

{X1^′[t] == -R1[t] - (X1[t] V^′[t])/V[t], X3^′[t] == R2[t] - (X3[t] V^′[t])/V[t], X2^′[t] == R1[t] - R2[t] - (X2[t] V^′[t])/V[t]}

Assuming constant compartment volume (V'[t]==0) gives even simplier expressions.

In[6]:=

RateEquations[pw, EquationFormat→MassBalances]/.V '[t] →0

Out[6]=

{X1^′[t] == -R1[t], X3^′[t] == R2[t], X2^′[t] == R1[t] - R2[t]}

The initial conditions of the model.

In[7]:=

InitialConditions[pw]

Out[7]=

{X1[0] == 1, X3[0] == 1, X2[0] == 1}

StateVariables[pwobject] the state variables of the pwobject
RateVariables[pwobject] the rate variables of the pwobject
Parameters[pwobject] the parameters of the pwobject
ModelVariables[pwobject] the variables of the pwobject except the state variables

Functions for extracting different types of symbol names from a pwobject.

The state variables of the model

In[8]:=

StateVariables[pw]

Out[8]=

{X1, X3, X2}

The rate variables of the model

In[9]:=

RateVariables[pw]

Out[9]=

{R1, R2}

The model parameters. Note that parameter names also indicate to which rate expression the parameter belongs.

In[10]:=

Parameters[pw]

Out[10]=

{R1`Vm, R1`Km, R1`Ki, R2`Vm, R2`Km}

The model variables are all variables of the model except the state variables.

In[11]:=

ModelVariables[pw]

Out[11]=

{V, R1, R2}

ParameterRules[pwobject] the values of the parameters of the pwobject given as a list of rules
ModelVariableRules[pwobject] the defining expressions of the variables of the pwobject given as a list of rules

Functions returning lists of rules for parameters and model variables.

The parameters and their default values.

In[12]:=

ParameterRules[pw]

Out[12]=

{R1`Vm→1, R1`Km→1, R1`Ki→1, R2`Vm→1, R2`Km→1}

The model variables and their corresponding expression.

In[13]:=

ModelVariableRules[pw]

Out[13]=

{V→Function[{t}, 1.], R1→Function[{t}, (R1`Vm X1[t])/(R1`Km (1 + X1[t]/R1`Km + X3[t]/R1`Ki))], R2→Function[{t}, (R2`Vm X2[t])/(R2`Km + X2[t])]}

The rate expression for the first reaction.

In[14]:=

R1[t]/.ModelVariableRules[pw]

Out[14]=

(R1`Vm X1[t])/(R1`Km (1 + X1[t]/R1`Km + X3[t]/R1`Ki))

NDSolve[pwobject, {t, 0, t_max}] solve numerically the rate equations for the state variables, with time in the range 0 to t_max

Extension of NDSolve.

The solution of the rate equations for the first 20 seconds.

In[15]:=

sol = NDSolve[pw, {t, 0, 20}]

Out[15]=

{{X1→InterpolatingFunction[{{0., 20.}}, <>], X3→InterpolatingFunction[{{0., 20.}}, <>], X2→InterpolatingFunction[{{0., 20.}}, <>]}}

A plot of the concentration curves for each entity.

In[16]:=

Needs["Graphics`Colors`"] ;

Plot[Evaluate[{X1[t], X2[t], X3[t]}/.sol], {t, 0, 20}, PlotStyle→ {Red, Green, Blue}] ;

[Graphics:HTMLFiles/index_35.gif]

BioCircuit

This example is a purely articficial biochemical network that illustrates different pathway modeling objects and how they are transformed into mathematical expressions. The model can be launched in PathwayLab from the Start Menu but its pathway diagram is also shown as plain graphics in the figure below. The file BioCircuit.m used below has been generated by Export to ...  Mathematica in Visio's PathwayLab menu.

    [Graphics:HTMLFiles/index_36.gif]

    The BioCircuit pathway.

Load the package.

In[1]:=

Needs["PathwayLab`"]

Load the model and store it in a variable.

In[2]:=

biocircuit = Get[ToFileName[{"PathwayLab", "Examples"}, "BioCircuit.m"]]

Out[2]=

-Pathway[8 state variables, 10 rate variables, 19 parameters]-

State variables in a pathway model correspond to concentrations of entities described by a set of ordinary differential equations - the rate equations. The full name of these variables are given by their location, see the figure above.

The state variables of the pathway.

In[3]:=

states = StateVariables[biocircuit]

Out[3]=

{x2, x1, x3, x5, x4, NucleusVolume`x4, MembraneArea`x1, MembraneArea`x1P}

A rate variable of a pathway model corresponds to the rate of a transformation (reaction or translocation) between two entities. The unit of a rate variable are either given in amount per time or in concentration per time depending on the settings in the Formula Settings dialog window for the transformation object in PathwayLab. In addition to the state and rate variables there are variables describing compartment volumes and auxiliary entities (described by explicit functions of time). The model variables are defined by expressions containing parameters and states.

The rate variables of the pathway.

In[4]:=

rates = RateVariables[biocircuit]

Out[4]=

{r1, r10, r3, r4, NucleusVolume`Membrane`r6, r2, r5, MembraneArea`r8, MembraneArea`r9, r7}

The variables of the pathway model (all non-state variables).

In[5]:=

modelvariables = ModelVariables[biocircuit]

Out[5]=

{V, u1, r1, u2, x0, r10, r3, r4, NucleusVolume, NucleusVolume`Membrane, NucleusVolume`Membrane`r6, r2, r5, MembraneArea, MembraneArea`r8, MembraneArea`r9, r7}

The model variables that are not rates.

In[6]:=

Complement[modelvariables, rates]

Out[6]=

{NucleusVolume`Membrane, MembraneArea, NucleusVolume, u1, u2, V, x0}

The expressions defining the model variables can be can be extracted as a list of rules.

In[7]:=

ModelVariableRules[biocircuit]

Out[7]=

The rate expression for rate r1.

In[8]:=

r1[t]/.ModelVariableRules[biocircuit]

Out[8]=

(r1`Vm x1[t])/(r1`Km (1 + x1[t]/r1`Km + x2[t]/r1`Ki))

The parameters of the model.

In[9]:=

Parameters[biocircuit]

Out[9]=

The values of the parameters is given by a list of rules.

In[10]:=

ParameterRules[biocircuit]

Out[10]=

The list of parameter rules using TableForm for nice formatting.

In[11]:=

ParameterRules[biocircuit]//TableForm

Out[11]//TableForm=

r1`Vm→1
r1`Km→1
r1`Ki→0.2
r10`Vm→1
r10`Km→1
r3`alpha→0.2
r4`consrateE→1
NucleusVolume`Membrane`r6`Dconst→0.2
r2`Vm→1
r2`Km→1
r5`Vm→1
r5`Km→1
MembraneArea`Area→0.01
MembraneArea`r8`Vm→0.1
MembraneArea`r8`Km→0.4
MembraneArea`r9`k0→0.2
MembraneArea`r9`Km→1
r7`kf→0.5
r7`kr→0.01

The rate expression for rate r1 when the parameters have been substituted with their default numerical values.

In[12]:=

r1[t]/.ModelVariableRules[biocircuit]/.ParameterRules[biocircuit]

Out[12]=

x1[t]/(1 + x1[t] + 5. x2[t])

The rate equations (or reaction rate equations) of a pathway model is a set of differential equations describing the time evolution of the entity concentrations.

The rate equations for the pathway model.

In[13]:=

RateEquations[biocircuit]

Out[13]=

The rate equations when the parameters have been have been substituted with their numerical values.

In[14]:=

RateEquations[biocircuit, EquationFormat→Numeric]

Out[14]=

Rate equations can also be presented in mass balance format relating rate of change of entity concentrations with the transformation rates. Since entity concentrations are used as state variables there is also a term in each differential equation corresponding to dilution for time varying volumes. Rates defined as absolute (in terms of amount per time) will be divided by the volume of the compartment or location containing the entity to obtain the corresponding concentration flow rate.

The rate equations in mass balance format.

In[15]:=

RateEquations[biocircuit, EquationFormat→MassBalances]

Out[15]=

The rate equations in mass balance format assuming constant volume and area of the loctions.

In[16]:=

RateEquations[biocircuit, EquationFormat→MassBalances]/.{V '[t] →0, MembraneArea '[t] →0, NucleusVolume '[t] →0}//TableForm

Out[16]//TableForm=

x2^′[t] == r1[t] - r2[t]
x1^′[t] == -r1[t] + r10[t] - r7[t]
x3^′[t] == r2[t] - r5[t]
x5^′[t] == r3[t] - r4[t]
x4^′[t] == r5[t] - NucleusVolume`Membrane`r6[t]/V[t]
NucleusVolume`x4^′[t] == NucleusVolume`Membrane`r6[t]/NucleusVolume[t]
MembraneArea`x1^′[t] == -MembraneArea`r8[t] + MembraneArea`r9[t] + (r7[t] V[t])/MembraneArea[t]
MembraneArea`x1P^′[t] == MembraneArea`r8[t] - MembraneArea`r9[t]

The rate equations in symbolic form (given by the default usage of RateEquations) is obtained by substituting the expressions for the model variables into the rate equations in mass balance format.

In[17]:=

RateEquations[biocircuit] === (RateEquations[biocircuit, EquationFormat→MassBalances]//.ModelVariableRules[biocircuit])

Out[17]=

True

Given the the rate equations and a set of initial conditions the model can be simulated using NDSolve.

Store the rate equations, states, and initial conditions in variables.

In[18]:=

deq = RateEquations[biocircuit, EquationFormat→Numeric] ;

states = StateVariables[biocircuit] ;

ic = InitialConditions[biocircuit]

Out[20]=

{x2[0] == 0.1, x1[0] == 1, x3[0] == 1, x5[0] == 1, x4[0] == 0, NucleusVolume`x4[0] == 0, MembraneArea`x1[0] == 0.5, MembraneArea`x1P[0] == 0}

Simulate the system for 40 seconds.

In[21]:=

sol = NDSolve[Join[deq, ic], states, {t, 0, 40}]//First

Out[21]=

A plot of state variables x4 and NucleusVolume`x4.

In[22]:=

Needs["Graphics`Colors`"] ;

pl1 = Plot[Evaluate[{x4[t], NucleusVolume`x4[t]}/.sol], {t, 0, 40}, PlotRange→All, PlotStyle→ {Red, Blue}] ;

[Graphics:HTMLFiles/index_84.gif]

A change of the parameter r5`Vm to 2.

In[24]:=

deq2 = RateEquations[biocircuit]/.r5`Vm→2/.ParameterRules[biocircuit] ;

sol2 = NDSolve[Join[deq2, ic], states, {t, 0, 40}]//First ;

A new plot of x4 and NucleusVolume`x4.

In[26]:=

pl2 = Plot[Evaluate[{x4[t], NucleusVolume`x4[t]}/.sol2], {t, 0, 40}, PlotRange→All, PlotStyle→ {{Red, Dashing[{0.02, 0.02}]}, {Blue, Dashing[{0.02, 0.02}]}}] ;

[Graphics:HTMLFiles/index_88.gif]

A comparison of x4 and NucleusVolume`x4 for the default and new value of r5`Vm.

In[27]:=

Show[pl1, pl2] ;

[Graphics:HTMLFiles/index_90.gif]

Since simulation of the rate equations with default parameter values and initial conditions is a common operation the PathwayLab package implements an extension of NDSolve for this particular task.

Simulate the rate equations for the model using default parameter values and initial conditions.

In[28]:=

sol3 = NDSolve[biocircuit, {t, 0, 40}]//First ;

sol === sol3

Out[29]=

True

A plot of rate variables NucleusVolume`Membrane`r6[t] and r7[t]. Additional options defined by the Graphics`Legend` standard package are used to add a legend to the plot. Observe the usage of ModelVariableRules and ParameterRules to obtain the symbolic expressions for the rates. Note the use of ReplaceAllRepeated (//.) instead of ReplaceAll (/.) below which is required in general but not for this particular model.

In[30]:=

Needs["Graphics`Legend`"] ;

mvRules = ModelVariableRules[biocircuit] ;

paramRules = ParameterRules[biocircuit] ;

[Graphics:HTMLFiles/index_98.gif]

One way to understand how sensitive a pathway model is with respect to changes in a particular parameter is to make a number of simulations for different values of the parameter.

Replace the parameter r5`Vm with a dummy variable Vm and substitute the remaining parameters with their default values.

In[34]:=

deq3 = RateEquations[biocircuit]/.r5`Vm→Vm/.ParameterRules[biocircuit] ;

Solve the rate equations for Vm between 0.5 and 1.5 in steps of 0.1.

In[35]:=

multiplesol = Table[NDSolve[Join[deq3, ic], states, {t, 0, 40}]//First, {Vm, .5, 1.5, .1}] ;

A plot of the solutions for x4.

In[36]:=

Plot[Evaluate[x4[t]/.multiplesol], {t, 0, 40}, PlotStyle→Red, PlotRange→All] ;

[Graphics:HTMLFiles/index_102.gif]

A MAPK Cascade

This model is taken from the paper Untangling the wires:  A strategy to trace functional interactions in signaling and gene networks by B. N. Kholodenko et al. (www.pnas.org/cgi/doi10.1073/pnas.192442699). The model can be launched in PathwayLab from the Start Menu but its pathway diagram is also shown as plain graphics in the figure below. The file MAPKCascade.m used below has been generated by Export to ...  Mathematica in Visio's PathwayLab menu.

    [Graphics:HTMLFiles/index_103.gif]

    A  mitogen-activated protein kinase (MAPK) cascade.

Load the package.

In[1]:=

Needs["PathwayLab`"]

Load the model and store it in a variable.

In[2]:=

mapk = Get[ToFileName[{"PathwayLab", "Examples"}, "MAPKCascade.m"]]

Out[2]=

-Pathway[9 state variables, 12 rate variables, 48 parameters]-

The state variables of the pathway.

In[3]:=

states = StateVariables[mapk]

Out[3]=

{MKK—P, MKK—PP, MAPK—PP, MKKK, MKKK—P, MKKK—PP, MKK, MAPK—P, MAPK}

The rate variables of the pathway.

In[4]:=

rates = RateVariables[mapk]

Out[4]=

{v2, v8, v1, v3, v4, v5, v7, v6, v12, v9, v11, v10}

The mass balance equations.

In[5]:=

mbeqn = RateEquations[mapk, EquationFormat→MassBalances]/.V '[t] →0 ;

mbeqn//TableForm//TraditionalForm

Out[6]//TraditionalForm=

MKK—P^′(t) v5(t) - v6(t) + v7(t) - v8(t)
MKK—PP^′(t) v6(t) - v7(t)
MAPK—PP^′(t) v10(t) - v11(t)
MKKK^′(t) v4(t) - v1(t)
MKKK—P^′(t) v1(t) - v2(t) + v3(t) - v4(t)
MKKK—PP^′(t) v2(t) - v3(t)
MKK^′(t) v8(t) - v5(t)
MAPK—P^′(t)  -v10(t) + v11(t) - v12(t) + v9(t)
MAPK^′(t) v12(t) - v9(t)

Once the model equations are available in Mathematica it is easy to analyze them in various ways. Here we will compute the stoichiometric matrix.

The right hand side of the mass balance equations.

In[7]:=

rhs = mbeqn/.lhs_ == rhs_:→rhs

Out[7]=

{v5[t] - v6[t] + v7[t] - v8[t], v6[t] - v7[t], v10[t] - v11[t], -v1[t] + v4[t], v1[t] - v2[t] + v3[t] - v4[t], v2[t] - v3[t], -v5[t] + v8[t], -v10[t] + v11[t] - v12[t] + v9[t], v12[t] - v9[t]}

The stoichiometric matrix (in Mathematica version 5.1 this can be directly accomplished by D[rhs,{#[t]&/@rates}]).

In[8]:=

m = Outer[D, rhs, #[t] &/@rates] ;

MatrixForm[m]

Out[9]//MatrixForm=

In matrix notation the mass balance equations become.

In[10]:=

MatrixForm[# '[t] &/@states] == MatrixForm[m] . MatrixForm[#[t] &/@rates]

Out[10]=

Linear dependent rows of the stoichiometric matrix implies that there are conserved moieties in the system. In this particular case it is easy to find these linear combinations by inspection. The corresponding linear relations between the state derivatives show that certain combinations of states are constant over time.

The linear combinations and a test that they map zero.

In[11]:=

l1 = {1, 1, 0, 0, 0, 0, 1, 0, 0} ;

l2 = {0, 0, 1, 0, 0, 0, 0, 1, 1} ;

l3 = {0, 0, 0, 1, 1, 1, 0, 0, 0} ;

{l1 . m, l2 . m, l3 . m}//MatrixForm

Out[14]//MatrixForm=

( {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} )

The conservation equations.

In[15]:=

qeqn = Thread[{MKK_tot, MAPK_tot, MKKK_tot} == {l1, l2, l3} . (#[t] &/@states)]

Out[15]=

{MKK_tot == MKK[t] + MKK—P[t] + MKK—PP[t], MAPK_tot == MAPK[t] + MAPK—P[t] + MAPK—PP[t], MKKK_tot == MKKK[t] + MKKK—P[t] + MKKK—PP[t]}

A list of rules for the total amounts of MKKK, MKK, and MAPK.

In[16]:=

totRules = ToRules[And @@ qeqn]/.t→0/.ToRules[And @@ InitialConditions[mapk]]

Out[16]=

{MKK_tot→180, MAPK_tot→360, MKKK_tot→200}

Utilizing the existence of conserved moieties in the system the rate equations can be reduced.

The rate equation for all states except MKKK—PP, MKK—PP

In[17]:=

reqn = Join[RateEquations[mapk][[{1, 4, 5, 7, 8, 9}]], qeqn] ;

In Mathematica 5 NDSolve can handle some differential algebraic equations (NDSolve[mapk,{t,0,300}] gives the same result and can be used in older Mathematica versions).

In[18]:=

sol = NDSolve[{reqn/.ParameterRules[mapk]/.totRules, InitialConditions[mapk]}, states, {t, 0, 300}]//First

Out[18]=

A plot of MKKK—PP, MKK—PP, and MAPK—PP.

In[19]:=

Needs["Graphics`Colors`"] ;

Plot[Evaluate[{MKKK—PP[t], MKK—PP[t], MAPK—PP[t]}/.sol], {t, 0, 300}, PlotStyle→ {Red, Blue, Green}] ;

[Graphics:HTMLFiles/index_143.gif]

A plot of MAPK, MAPK—P, MAPK—PP and their sum.

In[21]:=

Plot[Evaluate[{MAPK[t], MAPK—P[t], MAPK—PP[t], MAPK[t] + MAPK—P[t] + MAPK—PP[t]}/.sol], {t, 0, 300}, PlotStyle→ {Red, Blue, Green, DarkGreen}] ;

[Graphics:HTMLFiles/index_145.gif]

An advantage of having the system in reduced form is that its steady state can be computed algebraically. For this example the rate expressions all are rational functions of the state. Hence, NSolve can be used to find all steady state solutions.

The equations for the steady state with functions that are explicitly dependent on time fixed to their values at t=0.

In[22]:=

sseqn = reqn/.ParameterRules[mapk]/.totRules/.{x_ '[t] →0, t→0} ;

Solutions of the steady state equations (this may take several seconds). There are quite many solutions!

In[23]:=

allsssol = NSolve[sseqn, #[0] &/@states] ;

Length[allsssol]

Out[24]=

47

The subset of solutions that are both real and positive.

In[25]:=

sssol = Complement[allsssol, Cases[allsssol, {___, a_→Complex[_, _], ___} | {___, a_→b_ ? Negative, ___}]]

Out[25]=

The states approach these values close to t=100 in the transient simulation above.

In[26]:=

Thread[states→ (#[100] &/@states/.sol)]

Out[26]=

In this case FindRoot also finds the steady state starting in the initial conditions for the rate equations (which is not a good approximation to the steady state).

In[27]:=

FindRoot[sseqn, InitialConditions[mapk]/.Equal→List]

Out[27]=

Integral Feedback Control

The following model illustrates how robust perfect adaptation (integral feedback control) can be implemented by a small reaction network. It can be shown that only the blue and red interactions are crucial for this behavior and that the steady state value of Y only depends on parameters of reaction v3 and v4. The pathway model is taken from Robust perfect adaptation in bacterial chemotaxis through integral feedback control, Tau-Mu Yi, Yun Huang, Melvin I. Simon, and John Doyle. PNAS Vol. 97, Issue 9, 4649-4653, April 25, 2000, see www.pnas.org/cgi/content/abstract/97/9/4649. The model can be launched in PathwayLab from the Start Menu but its pathway diagram is also shown as plain graphics in the figure below. The file IntegralFeedbackControl.m used below has been generated by Export to ...  Mathematica in Visio's PathwayLab menu.

    [Graphics:HTMLFiles/index_156.gif]

    A biochemical pathway implementing integral feedback control (robust perfect adaptation).

Load the package.

In[1]:=

Needs["PathwayLab`"]

Load the model and store it in a variable.

In[2]:=

ifc = Get[ToFileName[{"PathwayLab", "Examples"}, "IntegralFeedbackControl.m"]]

Out[2]=

-Pathway[2 state variables, 5 rate variables, 8 parameters]-

The state variables of the pathway.

In[3]:=

states = StateVariables[ifc]

Out[3]=

{Y, A}

The rate equations. Note the use of ReplaceAll (/.) and not ReplaceAllRepeated (//.) to prevent E1 and E2 to be substituted with the expressions containing UnitStep.

In[4]:=

reqn = RateEquations[ifc, EquationFormat→MassBalances]/.ModelVariableRules[ifc]

Out[4]=

{Y^′[t] == v1`Vm/(1 + A[t]/v1`Ki) + v5`Vm E1[t] - (v2`Vm E2[t] Y[t])/(v2`Km + Y[t]) - (v3`Vm Y[t])/(v3`Km + Y[t]), A^′[t] == -v4`Vm + (v3`Vm Y[t])/(v3`Km + Y[t])}

The steady state equations.

In[5]:=

sseqn = reqn/.{x_ '[t] →0, t→∞}

Out[5]=

The steady state solution.

In[6]:=

sssol = Solve[sseqn, {A[∞], Y[∞]}]//FullSimplify//First ;

sssol//TableForm

Out[7]//TableForm=

Y[∞] → (v3`Km v4`Vm)/(v3`Vm - v4`Vm)

Observe that the value of Y[∞] is independent of E1[∞] and E2[∞]. Hence, the steady state is independent of these signals. The condition v3`Vm-v4`Vm>0 has to be satisfied for the solution to be physically realizable.

Simulate the system.

In[8]:=

sol = NDSolve[ifc, {t, 0, 140}] ;

A plot of the solution for Y when E1 and E2 are step and pulse signals.

In[9]:=

Needs["Graphics`Colors`"] ;

Show[GraphicsArray[{{pl1}, {pl2}}]] ;

[Graphics:HTMLFiles/index_175.gif]

To illustrate the robustness of the pathway behavior one can make a number of simulations for different values of some parameter.

Replace the parameter v1`Ki with a dummy variable Ki and substitute the remaining parameters with their default values.

In[13]:=

reqn1 = RateEquations[ifc]/.v1`Ki→Ki/.ParameterRules[ifc] ;

Solve the rate equations for Ki between 0.1 and 0.5 in steps of 0.1.

In[14]:=

multiplesol = Table[NDSolve[Join[reqn1, InitialConditions[ifc]], StateVariables[ifc], {t, 0, 140}]//First, {Ki, .1, .5, .1}] ;

A plot of the solutions for Y and A.

In[15]:=

pl4 = Plot[Evaluate[A[t]/.multiplesol], {t, 0, 140}, PlotRange→All, PlotStyle→Blue, AxesLabel→ {"t", "A"}, DisplayFunction→Identity] ;

Show[GraphicsArray[{{pl3, pl4}}]] ;

[Graphics:HTMLFiles/index_181.gif]

Observe that the value of Y returns to the fixed level 0.125 for any setting of the parameter Ki and regardless of the changing flux profiles due to the changes in E1 and E2.

Cell Cycle Control in Xenopus Frog Eggs

This model is presented in Cell Cycle Control in Xenopus Frog Eggs (Novak and Tyson, Journal of Theoretical Biology, 1993) and illustrates oscillations in concentration of biochemical entities involved in cell cycle control. The model can be launched in PathwayLab from the Start Menu but its pathway diagram is also shown as plain graphics in the figure below. The file CellCycle.m used below has been generated by Export to ...  Mathematica in Visio's PathwayLab menu.

    [Graphics:HTMLFiles/index_182.gif]

    A pathway model for cell cycle control in Xenopus frog eggs.

Load the package.

In[1]:=

Needs["PathwayLab`"]

Load the model and store it in a variable.

In[2]:=

cellcycle = Get[ToFileName[{"PathwayLab", "Examples"}, "CellCycle.m"]]

Out[2]=

-Pathway[13 state variables, 23 rate variables, 40 parameters]-

The state variables of the pathway.

In[3]:=

states = StateVariables[cellcycle]

Out[3]=

{PYT, PYTP, MPF, Cyclin, YT, Cdc25P, Wee1, APCstar, Cdc25, Wee1P, IEP, IE, APC}

In this example the given initial conditions correspond to a steady state of the system. The stability properties of the steady state can be investigated by linearizing the model around the steady state and study the stability properties of the obtained linear system.

The initial conditions.

In[4]:=

ic = InitialConditions[cellcycle]

Out[4]=

Store the rate equations in a variable.

In[5]:=

reqn = RateEquations[cellcycle] ;

The right hand side of the rate equations.

In[6]:=

rhs = reqn/.lhs_ == rhs_:→rhs ;

The right hand side of the rate equations evaluated at t=0 for the given initial conditions and default parameter values.

In[7]:=

rhs/.ParameterRules[cellcycle]/.t→0/.ToRules[And @@ ic]

Out[7]=

The Jacobian matrix in symbolic form (in Mathematica version 5.1 this can be directly accomplished by D[rhs,{#[t]&/@states}]).

In[8]:=

J = Outer[D, rhs, #[t] &/@states] ;

The Jacobian matrix evaluated at the steady state gives the system matrix for the linearized system.

In[9]:=

A = J/.ParameterRules[cellcycle]/.t→0/.ToRules[And @@ ic] ;

A//MatrixForm

Out[10]//MatrixForm=

The eigenvalues of the linearized system.

In[11]:=

Eigenvalues[A]//Chop

Out[11]=

There is one pair of eigenvalues with positive real part which shows that the steady state is unstable. This can also clearly be seen in a simulation of the non-linear system. First the solution is very close to the initial conditions but then it starts to deviate and eventually enters a limit cycle.

Simulate the non-linear system for 1000 seconds.

In[12]:=

sol = NDSolve[cellcycle, {t, 0, 1000}]//First

Out[12]=

A plot of MPF and APC.

In[13]:=

Needs["Graphics`Colors`"] ;

Plot[Evaluate[{MPF[t], APC[t]}/.sol], {t, 0, 1000}, PlotPoints→35, AspectRatio→0.2, PlotStyle→ {Red, Blue}] ;

[Graphics:HTMLFiles/index_204.gif]

A phase diagram of MPF and APC.

In[15]:=

ParametricPlot[Evaluate[{MPF[t], APC[t]}/.sol], {t, 0, 1000}, PlotStyle→ {Red}, PlotLabel→"Phase Diagram", AxesLabel→ {"MPF", "APC"}] ;

[Graphics:HTMLFiles/index_206.gif]

Store the numerical value of the steady state in a variable x0 and construct a symbolic vector representing deviations from the steady state.

In[16]:=

x0 = (#1[0] &)/@states/.ToRules[And @@ ic] ;

Δx = (ToExpression["Δ"<>ToString[#1]] &)/@states

Out[17]=

{ΔPYT, ΔPYTP, ΔMPF, ΔCyclin, ΔYT, ΔCdc25P, ΔWee1, ΔAPCstar, ΔCdc25, ΔWee1P, ΔIEP, ΔIE, ΔAPC}

The linearized system equations.

In[18]:=

lineqn = Thread[(# '[t] &/@Δx) == A . (#[t] &/@Δx)] ;

Initial conditions for the linearized system (slightly off zero to excite the unstable behavior).

In[19]:=

linic = Thread[(#[0] &/@Δx) == Table[1. 10^(-6), {Length[Δx]}]] ;

Simulate the linear system for 1000 seconds.

In[20]:=

sol1 = NDSolve[Join[lineqn, linic], Δx, {t, 0, 1000}]//First

Out[20]=

A plot of MPF and APC for the first 400 seconds.

In[21]:=

Plot[Evaluate[{ΔMPF[t] + x0[[3]], ΔAPC[t] + x0[[13]]}/.sol1], {t, 0, 400}, PlotStyle→ {Red, Blue}] ;

[Graphics:HTMLFiles/index_215.gif]

The behavior of the linear system resembles the non-linear one for small deviations although the onset of visible oscillations are different (due to the arbitrary choice of small linear initial conditions).

References

InNetics - www.innetics.com.


Created by Mathematica  (August 17, 2005) Valid XHTML 1.1!