BioNetGen to SSC translator

From BioNetWiki

Jump to: navigation, search

Contents

About

Stochastic Simulation Compiler, SSC is a spatial simulator of biochemical networks. It supports multiple regions with arbitrarily shapes specified using Constructive Solid Geometry (CSG). SSC also produces fast simulations by directly generating machine code tailored to a specific architecture [1].

Description

BioNetGen to SSC translator provides a SSC equivalent model to your BNG model. The translator outputs two files, one with the translated rules, as modelName.rxn, and the other containing the definition of variables in them, as modelName.cfg. The commands used to generate .rxn and .cfg files are writeSSC and writeSSCcfg respectively. However, there are some features of BioNetGen, which are not supported in SSC. For a description of these see Release Notes. Also, for other debugging issues see An introduction to BNG to SSC translator and the SSC Reference Manual [1].

Downloading

BNG to SSC translator is included in BionetGen versions 2.1.6 and up. Click here to download

Getting Started

BNG and SSC are two different languages, semantically and syntactically. Starting from the keywords to the implementation of each reaction rule, the following table briefs the file structure of BNG and SSC, .bngl and .rxn respectively.

Table 1; Comparison of BNG blocks with SSC. Bold and Italicized, are keywords used in SSC
BNG SSC
File extension: .bngl File extension: .rxn
Begin parameters

... End parameters

NA

But can be supplied as an external .cfg file.

Begin molecule types

... End molecule types

NA
NA CSG Definition; Eg
region World
box width 1 height 1 depth 1
subvolume edge 1
Begin seed species
A() 100
End seed species
New<molecule name> at conc
new A() at 100
Begin observables
Molecules A_tot A()
End observables
Record <molecule,specie,pattern name>
Record A()
Begin reaction rules
A() + B() -> C() k1
End reaction rules
Rxn pattern at propensity -> actions
rxn Mol1:A() + Mol2:B() at k1 -> destroy
complex Mol1; destroy complex Mol2; new C()
actions block

generate_network; simulate_ode; simulate_ssa writeSSC

These ations are performed outside the

.rxn file


Please note that, as in Table 1, Mol1, Mol2 and Moln, (where n is number of molecules involved) is a BNG-SSC translator keyword. They will be referred as labels of the pattern or molecule. Any operation in SSC except, create new molecule and breaking of bonds, is defined with the help of these labels. Also, in SSC the scope of, labels of patterns and molecules, is local and it will only be placed in front of the molecule on which operation is been performed.

Table 2, shows various equivalents and non-equivalents of SSC in BNG


Table 2; SSC equivalents of some of the common BNG terms
BNG term SSC equivalent
Bond symbol ! Bond symbol #
Component state defined as ~<state>
A(a~U)
Component state defined as ="<state>"
A(a="U")
Allows ~<state>!1
A(a~U!1)
Allows, but as <component name> = "<state>"; <component name>Binds#1
A(a="U";aBinds#1)
Bound molecules are separated by .
A(a!1).B(b!1)
Bound molecules are separated by nothing
A(a#1)B(b#1)
+ in reactant side, for two or more reactants <space>, for two or more reactants
+ in product side, for two or more products ;, for two or more product operation. (syntax doesn't list products)
<->, allows reversible reactions reversible reactions are expanded as two. The translator can expand such a rule.
+, for pattern matching of a bound component _, underscore symbol
Trash() or when deleting an entire specie Destroy complex <patern,specie,molecule label>
DeleteMoleules or when there is any molecule still present

in the reactant side

A().B()->A() k1 DeleteMolecules
A().B() -> A() k1
Destroy <pattern,specie,molecule label>
rxn A() Mol1:B() at k1 -> destroy Mol1
rxn A() Mol1:B() at k1 -> destroy Mol1
Comments as, # Comments as, --#


Instructions for using BNG to SSC translator can be found here.

Example

Let us consider a simple Gene Expression model from van Zon and ten Wolde., 2006[2]. For more understanding see Reference [2].

DNA + A => DNA.A Ka ;Ka =3e9/M/s
DNA.A => DNA + A Kd ;Kd =21.5/s
DNA.A => P + DNA + A Kprod ;Kprod =89.55/s
P => decay Kdec ;Kdec =0.04/s

Initially there is one free DNA site fixed in the center and 18 molecules A (corresponds to a 30nm concentration) diffusing with D=1μm2s-1.

We will write this as geneExpr.bngl.

begin parameters
 ka 5
 kd 21.5
 kprod 89.55
 kdec 0.04
 DNA_init 1
 A_init 18
end parameters
 
begin molecule types
 DNA(a)
 A(dna)
 P
 TrashP
end molecule types

begin seed species
 DNA(a) DNA_init
 A(dna) A_init
 P 0
 TrashP 0
end seed species

begin observables
 Molecules Protein           P
end observables
 
begin reaction rules
 Rule 1 A binds to DNA: DNA(a)+A(dna) <-> DNA(a!1).A(dna!1) ka,kd
 Rule 2 P synthesis: DNA(a!1).A(dna!1) -> P + DNA(a) + A(dna) kprod
 Rule 3 P Degrade: P -> TrashP kdec
end reaction rules

generate_network({overwrite=>1});
simulate_ssa({t_end=>1000,n_steps=>99});
writeSSC;
writeSSCcfg;

Note:- ka is a bimolecular rate constant, divide it by Avogadro's number * Volume

This outputs the following two files:

geneExpr.rxn
--# SSC-file for model geneExpr created by BioNetGen 2.1.6
region World
  box width 1 height 1 depth 1
subvolume edge 1

--# Initial molecules and their concentrations
new DNA() at DNA_init
new A() at A_init
new P() at 0
new TrashP() at 0


--# reads observables

record  P()

--# reaction rules
rxn Mol1:DNA(a#) Mol2:A(dna#) at ka ->  Mol1.a#Mol2.dna
rxn DNA(a#1)A(dna#1)  at kd ->  break 1
rxn DNA(a#1)A(dna#1)  at kprod ->  new P(); break 1
rxn Mol1:P()  at kdec -> destroy complex Mol1; new TrashP()

To the .rxn file apply the following modifications:

  • subvolume edge is given as 1. This is well mixed. For heterogeneous system:
 subvolume edge 0.1 
  • There is no information about diffusion. This, users have to add on their own as per their needs. We define parameter D in the .cfg file.
 diffusion A(dna#) at D 
geneExpr.cfg
# SSC cfg file for model geneExpr created by BioNetGen 2.1.6
# begin parameters
 ka =  5
 kd =  21.5
 kprod =  89.55
 kdec =  0.04
 DNA_init =  1
 A_init =  18
# end parameters

To the .cfg file apply the following modifications:

  • Divide the bimolecular rate constants with (subvolume edge)3 and diffusion rate constants with (subvolume edge)2.
ka = 5e3
D = 100 

Result

After running the BNGL model and its equivalent SSC model as output by the translator we get the following result:



Thus, we see how oscillations are introduced due to spatial effects. By making our model spatial we are incorporating correct biological environment that as DNA is fixed in one of the compartments, and A is freely diffusing in other compartments, A takes time to find DNA and bind to it. This causes fluctuation in the protein concentration.

References

  1. Mieszko Lis, Maxim N. Artyomov, Srinivas Devadas, and Arup K. Chakraborty. Efficient stochastic simulation of reaction–diffusion processes via direct compilation. Bioinformatics 2009 25: 2289-2291.
  2. Maciej Dobrzynski, Jordi Vidal RodrĂ­guez, Jaap A. Kaandorp, and Joke G. Blom. Computational methods for diffusion-influenced biochemical reactions. Bioinformatics 2007 23: 1969-1977.
Personal tools