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
 
 
 
 

Workshop 2010, August 2nd-13th

We are pleased to announce Joint User-Training Workshop “Developing Multi-Scale,Multi-Cell Developmental and Biomedical Simulations with CompuCell3D and SBW ”. It will focus on teaching the basics of multi-cell, multi-scale modeling using the open-source packages CompuCell3D and SBW. The workshop will be taught by many of the CompuCell3D and SBW developers. In addition to participating in lectures and hands-on exercises, each participant should prepare a 30 min presentation covering her/his area of research. Based on our previous experience such presentations lead to many future collaborations as well as make the workshop more scientifically stimulating event.

JPS

Event Dates: August 2nd - August 13th, 2010.

Location: Biocomplexity Institute, Indiana University

CompuCell3D Workshop page

Course Schedule for Network Modeling

Date for this half of the course: 2nd August to 7th August

See the PDF file for details

(Schedule)

The following materials will be provided:

  1. Text Book on Enzyme and Gene Regulatory Kinetics (Paper and ebook)
  2. Notes and sample models

Software Notes

Schedule and Course Notes

Day 1: Morning

General Introduction

Installation and Intro to Software

Cellular Networks

Basic Concepts

Day 1: Afternoon

Continuation of morning

Afternoon discussion on modeling (What is modeling?)

Day 2:

  • Survey of Rate Laws (See Text Book) 

Day 3: Morning

Day 3: Afternoon

Day 4: All Day

  • Steady state (Part 2, see notes from Part 1)

Day 5: All Day

  • Project - work in team or individually
  • Circuit Diagram
  • Determine the likely function of the various parts in the circuit
  • Determine the overall function of the circuit
  • Build a working model of the circuit.

Day 6 All Day

This day will be all about plug-in development to extend the simulation tool.

  • Intro C#
  • Setting up the IDE
  • Describing the Plug-in API
  • Writing Plugins
    1. Hello World
    2. SBML Viewer
    3. Jarnac Lite Viewer
    4. Jarnac Lite Editor
    5. BioModels Database Access
    6. Stochastic Simulation UI

Here a link to the presentation for this morning.

Python Script Notes

Sample Scripts

  1. How to access biomodels from the General Simulation Tool (GST) and simulate it?
    1. Start the script tool in the GST
    2. To access a particular model type:
       model = biomodels['BIOMD0000000204'] 
    3. To get the SBML for the model type:
       model.SBML  
    4. Load the model into the simulator
       LoadSBML (model.SBML) 
    5. Carry out the simulation
       d = sim.simulateEx(0, 10, 100) 
    6. To graph the simulation:
       Graph (d) 
    7. The following functions are supported by biomodels:
          GetModels, GetModelsByChEBI, GetModelsByChEBIId, GetModelsByGo, GetModelsByGoId,
          GetModelsByPerson, GetModelsByPublication, GetModelsByTaxonomy, GetModelsByTaxonomyId,
          GetModelsByUniprot, GetModelsByUniprotId, GetSBML
  2. How to run a simle stochastic simulation
    LoadSBML(
    """p = defn StochasticModel_1
       J1: $S1 -> S2;  k1*S1;
       J2:  S2 -> $S3; k2*S2;
    end;
    
    p.S1 = 25;
    p.S2 = 0;
    p.S3 = 0;
    p.k1 = 0.26;
    p.k2 = 0.15;""")
    
    startTime = 0
    endTime = 50
    stepSize = 1
    
    gil.loadSBML(sim.getSBML());
    
    gil.setSeed(0)
    result = gil.simulate (startTime, endTime, 1);
    Graph(result)
  3. How to run a stochastic simulation:
    1  def StochSim(sbml, startTime, endTime, stepSize):
    2	        if (len(sbml)):
    3	                gil.loadSBML(sbml)
    4	                gil.setSeed(0)
    5	                result = gil.simulateOnGrid(startTime, endTime, stepSize)
    6	                Util.Graph(graph, result)
    7	                graph.Refresh()
    8	        else:
    9	                print "Please load a model first"
    11	
    12	# print "Stochastic Simulation: startTime", 0, " endTime: ", 10, " stepSize: ", 0.01
    13	StochSim(host.GetChangedSBML(), 0, 10, 0.01)
    
  4. How to compute the elasticity of a reaction over a range of concentrations
    m = Util.CreateArray(100,2);
    sim.reset();
    for i in range(100):
    	m[i,0] = sim.getValue('S1');
    	m[i,1]= sim.getValue('EE:J1,S1');
    	print 	sim.setValue('S1', m[i, 0] + 0.2);
    Graph(m); 
  5. How to compute the reaction rate/flux through a step
      sim.setValue('S1', 0.45);
      sim.Instance.model.computeAllRatesOfChange();
      flux = sim.getValue ('J1'); 
  6. How to compute the control coefficient for a reaction
      sim.Instance.computeSteadyStateValue('CC:J1,E1'); 
  7. How to load a Jarnac model
    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;""");
    
  8. How to load a Jarnac file
      OpenFile('/path/to/jarnacfile.jan') 
    or
     Open() 

Loose ends

Change the plot to Log Plot. For this you could use the following lines of python, after you created the plot:

clr.AddReference('ZedGraph.dll')
import ZedGraph
graph.GraphPane.YAxis.Type = ZedGraph.AxisType.Log;
graph.Refresh()

Sample JarnacLite Script Models

// Day 4 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;

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

p.S1 = 10;
p.S2 = 0;
p.S3 = 0;

p.k1 = 0.2;
p.k2 = 0.6;

p = defn cell
     
     ext S1, S3;
     
     S1 = sin (time*alpha);
     
     S1 -> S2; k1*S1;
     S2 -> S3; k2*S2;
end;

p.S1 = 10;
p.S2 = 0;
p.S3 = 0;

p.k1 = 0.2;
p.k2 = 0.6;
p.alpha = 1.2;

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

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

p = defn NewModel

$alpha -> $S2; Vmax*alpha*(1 + alpha)^(n-1)/((1 + alpha)^n + L*(1 + beta)^n);

end;

p.alpha = 1;
p.beta = 0.1;
p.S2 = 0.1;
p.Inh = 0.1;
p.Vmax = 1;
//p.Km1 = 0.56;
p.n = 4;
p.KI = 0.56;
p.L = 10;

Elasticity calculation, at low S e = 4

p = defn cell
   $S1 -> $S2; Vmax*S1^n/(Km + S1^n);
end;

p.S1 = 0.10495;
p.S2 = 0;
p.Vmax = 1;
p.Km = 0.5;
p.n = 4;

Sample Python Script Models

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

New Version

There is a new version of SBW (windows) available for download from:

http://cellbo.dyndns.org/AshiriniWiki/CC3D/SBW

simply download the attached file and rename e__ to exe and run the installer.

CC3DSOSlibPy Installer

 
tutorials/bloomington2010.txt · Last modified: 2010/08/12 12:41 by rtroper
 

    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