Computational Systems Biology
Sauro Lab
University of Washington
Home  |   Downloads  |   News  |   Research  |   Papers  |   About Us  |   Contact Us  |   SBW Help   |   Jobs
     


What is SBW 
Research Impact 
Published Papers 
Lab Members 
Available Positions 
CSB Links 
Courses 
Student Projects 
 
 
 
Software Downloads:

1. SBW
2. JDesigner
3. Jarnac
4. WinSCAMP
5. Matlab Interface
6. Optimization
6. Bifurcation
 
maintained by Frank Bergmann
 
 
 
 

ICSB2010 SBW Tutorial

The SBW team is holding a tutorial on the use of SBW at the ICSB 2010.

Date Sunday, October 10th
Time 8:30am-12:30pm
Room Carrick 1

Schedule

  1. Installing software
  2. Simple models
  3. Perturbation Experiments
  4. Steady-State and Sensitivity Analysis (MCA)
  5. Parameter Scans
  6. Structural Analysis
  7. Stochastic Simulations
  8. Advanced: Python Scripting
  9. Developing Plugins
  10. Notes:
  • Linear Pathways
  • Negative Feedback
  • Branch Points

Installing the Software

Please install SBW from: SetupSBW.exe

Introductory Slides and Notes

Exercises

Simple Models

Basic Skills

// This is a comment
p = defn basicModel
     // Declare two external species (fixed during simulation)
     ext Xo, X1;
     
     // Define reactions and rate laws in model
     Xo -> S1; k1*Xo - k2*S1;
     S1 -> S2; k3*S1 - k3*S2;
     S2 -> X1; k5*S2 - k6*X1;
end;

// Initialize parameters and initial conditions
p.Xo = 4;
p.X1 = 0;
p.k1 = 1.2; p.k2 = 0.45;
p.k3 = 0.56; p.k4 = 0.2;
p.k5 = 0.89; p.k6 = 0;

  1. Running a simple time course simulation
  2. Changing initial conditions via sliders
  3. Changing parameters via sliders
  4. Changing values via the modify window
  5. Customizing the graph
  6. Collecting the raw simulation data
  7. Compute the steady state
  8. Picking predefined rate laws

Perturbation Experiments

Perturbing a parameter of the system:

p = defn perturbParameter
      $Xo -> S1;  v;
       S1 -> $X1; k*S1;
  
       at(gt(time,10)): k = 1;
end;

p.v = 1;
p.k = 0.5;
p.Xo = 0.5;

What happens when we perturb a variable species?

// Perturbing a species at a specific time
p = defn perturbVariable
     ext Xo, X1;

     Xo -> S1; k1*Xo - k2*S1;
     S1 -> S2; k3*S1 - k3*S2;
     S2 -> X1; k5*S2 - k6*X1;

     at(gt(time,10)): S1 = S1*1.2;

end;

p.Xo = 4;
p.X1 = 0;
p.k1 = 1.2; p.k2 = 0.45;
p.k3 = 0.56; p.k4 = 0.2;
p.k5 = 0.89; p.k6 = 0;

Perturbing variables and parameters in the same model:

p = defn multiPerturb
      $Xo -> S1;  v;
       S1 -> $X1; k*S1;
  
       at(gt(time,10)): S1 = 4;

       at(gt(time,20)): k = 1;
end;

p.v = 1;
p.k = 0.5;
p.Xo = 0.5;

More complex perturbations

p = defn complexPerturb
      $Xo -> S1;  v + sin (time*y*0.8);
       S1 -> $X1; k*S1;
  
       at(gt(time,10)): S1 = 4;

       at(gt(time,20)): k = 1;

       at(gt(time,30)): k = 0.5;

       at(gt(time,40)): y = 1;
end;

p.v = 1;
p.k = 0.5;
p.Xo = 0.5;
p.y = 0;

Using the Signal Injection Plugin to Apply Signals to a Pathway

Studying Steady State Response to Enzyme Perturbations

What happens when we perturb enzyme levels?

// Perturbing enzymes
p = defn linearPathway
     ext Xo, X1;

     Xo => S1; (Vmax1/Km1)*(Xo - S1/Keq1)/(1 + Xo/Km1 + S1/Km2);
     S1 => S2; (Vmax2/Km3)*(S1 - S2/Keq2)/(1 + S1/Km3 + S2/Km4);
     S2 -> X1; Vmax3*S2/(Km5 + S2);

end;

p.Xo = 4;
p.X1 = 0;
p.Vmax1 = 1.4; p.Vmax2 = 2.3; p.Vmax3 = 0.67;
p.Km1 = 0.5;  p.Km2 = 0.34;
p.Km3 = 0.78; p.Km4 = 1.2;
p.Km5 = 0.3;
p.Keq1 = 4.5; p.Keq2 = 2.3; p.Keq3 = 1.2;

  1. Using the steady state tool
  2. Compute the flux control coefficients for Vmax1, Vmax2 and Vmax3.
  3. Compute the sum, C1 + C2 + C3
  4. What do you observe?

Parameter Scans

Load the enzyme model and carry out a parameter scan with respect to Vmax1.

Structural Analysis

The structural analysis plugin allows one to examine the properties of the stoichiometry matrix. The most common property includes the conservation laws. Consider the following model:

p = defn structuralAnalysis
   ES -> S1 + E; v;
   S1 -> S2; v;
   S2 + E -> ES; v;
end;

p.v = 0;

Use SBW to identify the conservation laws in this model.

Stochastic Simulations

p = defn simpleStochasticModel
    S1 -> S2; k1*S1;
    S2 -> S1; k2*S2;
end;

p.k1 = 0.4;
p.k2 = 1.4;

p.S1 = 30;
p.S2 = 0;

// Run for 1000 time units
// Burst kinetics in a stochastic model
p = defn burstKinetics
         $Xo -> S1; k1*Xo;
     S1 + S2 -> S3 + 2 S2; k2*S1*S2;
          S3 -> $X1; k3*S3;
         $X2 -> S2; k4*X2;
          S2 -> $X1; k5*S2;
end;

p.k1 = 0.1;
p.k2 = 0.1;
p.k3 = 0.01;
p.k4 = 0.05;
p.k5 = 10.1;

p.Xo = 10;
p.X2 = 1;
p.S1 = 0;
p.S2 = 0;
p.S3 = 0;

Advanced: Python Scripting

# Simple time course simulation

LoadSBML(
"""p = defn NewModel
 J1: $S1 -> S2; E1*(k1*S1 - k2*S2);
 J2: S2 -> $S3; E2*(k3*S2 - k4*S3);
end;

p.S1 = 1; 
p.S2 = 0; 
p.S3 = 0; 
p.k1 = 0.4; 
p.k2 = 3.5; 
p.k3 = 0.23; 
p.k4 = 0.11; 
p.E1 = 1; 
p.E2 = 1;""");


m = sim.simulateEx (0, 5, 200);

Graph (m);

#Simulate a pulse in S2, observe recovery of state.

LoadSBML(
"""p = defn NewModel
 J1: $S1 -> S2; E1*(k1*S1 - k2*S2);
 J2: S2 -> $S3; E2*(k3*S2 - k4*S3);
end;

p.S1 = 1; 
p.S2 = 2; 
p.S3 = 0; 
p.k1 = 0.4; 
p.k2 = 3.5; 
p.k3 = 0.23; 
p.k4 = 0.11; 
p.E1 = 1; 
p.E2 = 1;""");

t = 0
sim.setValue ('S2', 0)
m = Util.CreateArray(100,2)
for i in range(50):
	m[i,0] = t
	m[i,1]= sim.getValue('S2')
	t = sim.oneStep (t, 0.1)
	
sim.setValue ('S2', 1.2*sim.getValue ('S2'))
t = sim.oneStep (t-0.001, 0.01)
for i in range(50,100):
	m[i,0] = t
	m[i,1]= sim.getValue('S2')
        # t-0.001 is a temporary hack until oneStep is fixed
	t = sim.oneStep (t-0.001, 0.01)

Graph(m)

# Rossler Chaotic Model

LoadSBML(
"""p = defn Rossler
      var x, y, z;
      ext s;
        $s -> x; -y-z;
        $s -> y; x + a*y;
        $s -> z; b + z*(x - c);
    end;

// Values for a stable cycle;
//x = 4.59886; #y = -0.00782; #z = 1.54806;
//a = 0.2; #b = 0.2; #c = 2.5;

// Values for a two period stable cycle;
//x = -1.90791; #y = 4.6778; #z = 0.11143;
//a = 0.2; #b = 0.2; #c = 3.5;

// Values for a four (?) period stable cycle;
//x = -3.14657; #y = -1.9551; #z = 0.02726;
//a = 0.2; #b = 0.2; #c = 4;

// Values for a eight (?) period stable cycle;
//x = -6.69015; #y = -4.52629; #z = 0.01666;
//a = 0.2; #b = 0.2; #c = 5;

// And finally values for chaos;
p.x = -6.69015; p.y = -4.52629; p.z = 0.01666;
p.a = 0.2; p.b = 0.2; p.c = 5.7;""")

m = sim.simulateEx (0, 50, 1000);

Graph (m);

# Lorenz Model

LoadSBML(
"""p = defn LorenzODE
     $w -> x; sigma*(y - x);
     $w -> y; x*(rho - z) - y;
     $w -> z; x*y - beta*z;
end;

p.x = 0.96259; 
p.y = 2.07272; 
p.z = 18.65888;

p.sigma = 10; 
p.rho = 28; 
p.beta = 2.67;""");

m = sim.simulateEx (0, 30, 1000);

Graph (m);

from System.IO import File, StreamWriter
  
streamWriter = File.CreateText ('c:/lorenz.txt')  
for i in range(1000):
    for j in range(3):                   
        streamWriter.Write(m[i,j+1])
        streamWriter.Write(', ')
    streamWriter.Write ('\n');
streamWriter.Close()

# To plot 3D on gluplot, type
#splot "c:\\lorenz.txt" using 1:2:3 with lines

Writing Plugins

For those with an interest in writing plugins for the simulation tool, there are a series of notes written by Frank Bergmann at:

Part 1 Setup Visual Studio

Part 2 Setup MonoDevelop

Part 3 Setup Command Line

A range of videos describing the Simulation Tool

Tutorial Link on writing plugns Tutorial

Notes

Doing a Hard Reset on the Simulator

If you ever find that the simulator is not responding, you can do a hard reset in two ways:

  1. Restart the simulation tool
  2. Go to the options manu and select tab list, tool strip or tab layout.

at syntax

at [ <delay expression> after ] (<trigger expression>): <eventassignments> 

Examples:

// assigns S1=10, when time >= 10
at (geq(time,10)): S1 = 10; 

// halve S2, 10 seconds after S1 reached 10
at 10 after (geq(S1,10)): S2 = S2/2; 

Steady State Properties

Properties of Linear Pathways

Branch Pathways

Simple Branch

Negative Feedback

// Feedback model
// Negative feedback in a metabolic pathway

p = defn feedback


J0: $X0 -> S1; VM1*(X0-S1/Keq1)/(1+X0+S1+S4^h);
J1: S1 -> S2;  VM2*(10*S1-2*S2)/(1+S1+S2);
J2: S2 -> S3;  VM3*(10*S2-2*S3)/(1+S2+S3);
J3: S3 -> S4;  VM4*(10*S3-2*S4)/(1+S3+S4);
J4: S4 -> $X1; VM5*S4/(KS4+S4);


end;

p.X0 = 10; p.X1 = 0;
p.S1 = 0;
p.S2 = 0;
p.S3 = 0;
p.S4 = 0;
p.VM1 = 10; p.VM2 = 5; p.VM3 = 4; p.VM4 = 2.5; p.VM5 = 2.5;
p.Keq1 = 10;
p.h = 2;
p.KS4 = 0.5;

Same model with strong negative feedback

p = defn feedback

var S1, S2, S3, S4;
ext X0, X1;

J0: $X0 -> S1; VM1*(X0-S1/Keq1)/(1+X0+S1+pow(S4,h));
J1: S1 -> S2; VM2*(10*S1-2*S2)/(1+S1+S2);
J2: S2 -> S3; VM3*(10*S2-2*S3)/(1+S2+S3);
J3: S3 -> S4; VM4*(10*S3-2*S4)/(1+S3+S4);
J4: S4 -> $X1; VM5*S4/(KS4+S4);

end;

p.X0 = 10; p.X1 = 0;
p.S1 = 0;
p.S2 = 0;
p.S3 = 0;
p.S4 = 0;
p.VM1 = 27.27001909;
p.Keq1 = 21.03001701;
p.h = 7.27001727;
p.VM2 = 0.39001026; p.VM3 = 0.54001045;
p.VM4 = 2.5;        p.VM5 = 2.43751325;
p.KS4 = 0.30151201;

More Information

We placed additional tutorials here:

If you would like to see what we have done at a past ICSB Tutorial look here:

 
tutorials/icsb2010.txt · Last modified: 2010/10/10 01:38 by fbergman
 

    Home  |   About Us  |   Contact Us  |   Statistics
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki