Talk:BioNetWiki Home

From BioNetWiki

Jump to: navigation, search


Fixing species concentrations has no effect in simulate_ssa

This bug was noticed by Leonard Harris in release 2.0.48, and probably affects all previous releases as well. A fix is in progress. To workaround the problem just make sure that you aren't assuming a species has fixed concentration that you are using as a reactant. If you do, you'll need to fix the concentration manually by adding the species to the product side in every rule in which it appears as a reactant.

--Faeder 10:22, 30 October 2008 (EDT)

Indirect association

Subject: Indirect association in BioNetGen?
Date: July 11, 2006 2:44:07 PM MDT


I'm looking at the latest version (33) and it seems that reaction rule of
indirect association is now impossible:
A(a) + R(b) -> A(a).R(b) will not generate anything, only
A(a) + R(b) -> A(a!1).R(b!1) will work.

Am I correct? Indirect association is very useful, as in many pathways we
can deal with R(...).B with no need to introduce additional binding site for
B: just its presence is enough.

BTW, kinetics in 2.0.33 is really cool! 


Indirect association has actually never been allowed in BNG2, although the Kohn example in our ACM paper uses bonds at the molecule (as opposed to component) level. The reason is that a Species in BNG2 must be a connected graph. A rule that associates two molecules but does not create a bond won't be applied because the product isn't recognized as a single species. Eliminating the requirement that species be connnected could cause problems. For example, For example, consider

A(a!1).R(b!1) -> A(a).R(b) k

Under the current syntax, this rule breaks the bond between a and b, but will be applied only if A and R remain indirectly joined, either through other components or molecules. If we allow indirect association, as you are suggesting, this rule would imply that the bond is broken but A and R remain in the same complex, whether or not other paths linking A and R are present, requiring a second rule to dissociate A and R even if they are not connected. An alternative to indirect association, or what I would call 'grouping', is allowing bonds at the molecule level when we don't feel like specifying components, as in

A() + B() -> A!1().B!1() k

I haven't implemented this, but it would be easy to do. Can you think of any problems with this?

--Faeder 15:17, 11 July 2006 (MDT)

I think a capability to specify bonds between molecules without specifying site-specific information would be useful. Let's do it. Is it urgent?

I think it's useful, but not urgent. There are a good number of programming tasks and not enough programmers. Check here to see the (appropriately named) Wish list. ps. Remember to sign your entries so we can tell who's talking.

--Faeder 09:53, 13 July 2006 (MDT)

Dimer dissociation bug


Subject: Dissociation of dimers in BioNetGen
Date: 	July 21, 2006 1:58:35 PM MDT

Dear Jim,

It seems that we found something unusual in BioNetGen.

As far as we found in Moscow with Chistopolsky, to use the "manual macro-models", i.e. "macro-models expressed in terms of REACTION RULES of BNGL-file" rather than "automatic macro", i.e. "macro-models expressed in terms of REACTIONS of NET-file", we should call dimers with names different from the monomer names. In other words, if a monomer is called R, the dimer should be called Rd rather than R.R.

Today we found that if the dimer is called with the different name, the dissociation of dimers is not described properly unless the monomers that appear after the dimer dissociation do not have the domain structure.

We send you two examples of short BNG script that describes ligand binding to the receptor followed by receptor dimerization. Note that if the monomer that appear in the script after dimer dissociation does not have domain structure (see file DimerGood.bngl), then BNG interprets the script properly. However, if the monomer does have the domain structure (see the file DimerBad.bngl), then BNG does not include dimer dissociation in the reaction list.

Could you please fix this problem in future?

Many thanks,



This is indeed a bug in BioNetGen, which is fixed in 2.0.35. The problem can occur in reactions that delete a molecule, which was messing up the indexing used to determine if the connectivity of the pattern graphs was properly preserved (see, block that begins PRODUCT:).

The problem is illustrated in the example file below

begin parameters
  k1  1
  k2  1
end parameters

begin molecule types
end molecule types

begin seed species
end seed species

begin reaction rules
D(Y~Y) -> R(l!1) + R(l!1) k1
D(Y~Y) -> R(l!1).L(r!1) + R(l!1).L(r!1) k2
end reaction rules

begin observables
end observables


This should generate two reactions, but the second rule fails to generate a reaction prior to version 2.0.35.

misc questions

  1. Can we have an alias block in a BioNetGen input file?
  2. An annotation block?
  3. Is '<-' allowed in a reaction rule? Or must it always be left to right?
  4. Must the 'E' term appear on both left and right sides of a rule with the Sat rate law?
  5. Why are commands for generating and simulating a network *NOT* in a commands block?
  6. Is there a limit on the length of a line in a BioNetGen input file?

Some answers

Bill, please sign your posts.

  1. What do you mean by an 'alias' block? A: it might be nice to give a lengthy description of a molecule, say, but then later in the model definition use an abbreviation. For example... alias EGF "epidermal growth factor" or alias SH2 "Src homology 2"
  2. Annotation is currently allowed only in comments, which are not saved into the model. We should really have annotation blocks that are allowed anywhere as parts of objects and rules.
  3. The '<-' notation is not currently allowed.
  4. The 'E' term need not appear on both sides. There is currently a bug in 'Sat' rate law types, which I am working on fixing.
  5. Commands could go in a separate block, or the entire model could be enclosed in a block. The latter is something that should be done, i.e. there should be begin model ... end model tags.
  6. To my knowledge, there is no line length limit, unless Perl has such a limitation and I'm not aware of it.

--Faeder 22:09, 10 August 2006 (MDT)

Dot Operator

It has been suggested that the dot operator is probably unecessary in most contexts. I think this is true. Any thoughts from anyone?

--Faeder 17:12, 11 August 2006 (MDT)

Hmm... I don't think that a complex in the BNG script, which has, e.g. spaces instead of dots as delimiters between molecules, is more readable for a user.

--Nikolay Borisov 15:11, 14 August 2006 (MDT)

Dot is good, should keep. Figuring out if molecules are connected by looking at the bond indices (or name sharing) is not so transparent

DeleteMolecules Bug

Ty Thomson reported a bug in version 2.0.35 in which the DeleteMolecules attribute of a rule was not working properly. The problem was introduced in the fix for the Sat/MM Bug, and is fixed in version 2.0.37. The bug appeared as follows. A reaction that deletes a molecule in a complex can be written as follows:

A(a~P) -> NULL() kdeg DeleteMolecules

This means that any species containing an A molecule with the a component in state P will undergo a degradation reaction with rate kdeg. In this reaction, the A molecule and all bonds to it will be deleted, and whatever species result from this operation will appear as products. So, if the rule is applied to the complex A(a~P!1).B(b!1), the resulting reaction will be

A(a~P!1).B(b!1) -> NULL + B(b) kdeg

In version 2.0.36, however, the products were not generated properly, causing, for example, the B molecule fragment to be left out. An example file that reproduces the bug, deleteMolecules.bngl, is provided in the Validate directory of the 2.0.37 distribution.

--Faeder 11:06, 13 September 2006 (MDT)

SBML Observable Output bug

There seems to be a small bug in the SBML output for networks that have hit the max_iter in generate_network without populating all of the observable species.

For example, in the egfr_net.bngl, if I do:


then the resulting SBML has assignment rules of the form:

      <assignmentRule variable="Group_Shc_Grb">
          <math xmlns="">
              <cn> 0 </cn>

(for example). I presume that Group_Shc_Grb just hasn't been populated yet since the number of iterations was too low.

This format will generate an error in some simulators that take SBML input... i think it should be:

      <assignmentRule variable="Group_Shc_Grb">
          <math xmlns="">
              <cn> 0 </cn>

--Jatlas 10:58, 1 June 2007 (MDT)

Molecule types issues

  • Bonds in this block should produce syntax error, but do not.
  • Or better, binding partners should be included in typing.

Molecule type declaration breaks fixed species attribute

Here's an example:

begin parameters
1 k1 1
1 k2 1
end parameters

begin molecule types
  1 M(state~0~1~2)
  2 garbage()
end molecule types 

begin species
M(state~0) 1
$garbage() 0
end species

begin reaction rules
1 M(state~0) -> M(state~1)
1 M(state~1) -> M(state~2)
M(state~2) -> garbage() kdeg=1
end reaction rules


Using MM rate law when molecularity!=2 should produce error

Here's an example of a file that does this but still runs. The rate is always computed to be zero, so nothing happens.

begin parameters
k1 1
k2 1
end parameters

begin species
A(a~U) 1
end species

begin reaction rules
A(a~U) -> A(a~P) MM(k1,k2)
end reaction rules

Personal tools