tCal is written in Python
programming language, so basic Python programming is needed to use it.
It can run on any platform with Python interpreter
installed (version 2.5 or higher required).
In this tutorial I will show you how to model
some simple examples as figure 1 of the paper.
The tutorial will procceed in interactive mode of Python.
It is straight forward to utilize these codes
to implement complicated models.
First place tCal module in your working directory
and start Python interpreter:
You are now in interactive mode of Python.
Import all classes from tCal package:
>>> from tCalculator import *
and build an instance of ``TranscriptionUnit'' class:
>>> unit = TranscriptionUnit(rnapNum=1000,rnapEn=-5.0,genomeBg=5e6)
The creation of transcription unit needs to specify
three essential parameters, and are explained below:
At this first step, only RNA polymerase (RNAP) binding strength is
characterized for the transcription unit.
The basal gene transcription probability (in absence of
regulators) can thus be calculated using
- rnapNum: number of effective RNAP molecules
- genomeBg: number of non-specific binding sites in the genome background
- rnapEn: difference of RNAP binding energy at
specific site and non-specific sites ().
The next step we will specify the configuration of regulation
region of the transcription unit.
As a simple example of combinatory regulation,
suppose that the target gene is regulated by
two activators independently,
and there's one binding site for each activator.
Binding site ``1'' is binded by regulator ``A'', and
binding site ``2'' is binded by regulator ``B''.
To specify such configuration in tCal, first we have to add
regulators to the transcription unit, using
Keyword arguments for
Negative indicates that the
regulator is transcription activator, and possitive for repressor.
And specify arbitrary number of regulator molecules
using setRegMolNumber() method:
- name: name of the regulator, should always be string
- rp_energy: interaction energy of the regulator
with RNAP ()
Keyword arguments for setRegMolNumber() method:
Then add binding sites using
- name: regulator name
- number: number of molecules
Keyword arguments for addBindingSite() method:
Above settings are sufficient for calculation of
transcription probability under regulation.
Just call the bindingProb() method:
- id: integer id for binding site
- reg: name of the binding regulator
- dEnergy: difference of regulatory binding energy
at this binding site and non-specific sites
We then get to another situation, in which the two binding
sites has overlap, and this causes trouble for the co-binding
event of the two regulators, as indicated by the figure below:
We now have two ways to describe this situation: either use positive
interaction energy as proposed in my paper, or simply reject
the binding event from happening.
To do it the first way, we shall use
to encode this ``hard'' interaction relationship
(energies are chosen arbitrarily to reflect this situation):
Keyword argument for addInteractGroup():
Now the transcription probability decreased a bit:
- names: a tuple of binding site IDs, indicates the
binding regulators at these sites will interact
- g_energy: interaction energy of the regulators
- gp_energy: interaction of the regulator group
with RNAP ()
Then we do it the second way.
We can use addForbiddenEvent() method
to denote this binding event is ``forbidden'', so to exclude
it from computation.
The argument is a tuple of binding site IDs.
This way the co-binding event will be excluded from computation,
and the transcription probability decreased a bit.
Note that this result is very close to that
obtained in the first way:
Now let's get to the condition in which two activators
work cooperatively to control target gene expression.
This means that each one of the regulator could not fully
activate gene expression individually, and only when
two binds together could do so.
This can be regarded as ``AND'' logical relationship.
Following shows the code to model this condition:
>>> unit = TranscriptionUnit(rnapNum=1000,rnapEn=-5.0,genomeBg=5000000)
We first calculate the transcription probability
in case of only activator A, you can see that
this probability is low:
Then we calculate the transcription probability
when both activators are present.
The probability rised to great extent:
Export the probability formula:
>>> formula = unit.bindingProbFormula()
The formula can be used to compose RateRule instance
governing rate-of-change of the transcription unit,
using Python API of libsbml (shown in the demo program below).