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:
$ python
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:
- 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 ().
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
baseBindingProb() method:
>>> unit.baseBindingProb()
0.028826971440739344
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
addRegulator() method:
>>> unit.addRegulator(name='A',rp_energy=-4)
>>> unit.addRegulator(name='B',rp_energy=-3.5)
Keyword arguments for
addRegulator() method:
- name: name of the regulator, should always be string
- rp_energy: interaction energy of the regulator
with RNAP ()
Negative indicates that the
regulator is transcription activator, and possitive for repressor.
And specify arbitrary number of regulator molecules
using setRegMolNumber() method:
>>> unit.setRegMolNumber(name='A',number=100)
>>> unit.setRegMolNumber(name='B',number=200)
Keyword arguments for setRegMolNumber() method:
- name: regulator name
- number: number of molecules
Then add binding sites using
addBindingSite() method:
>>> unit.addBindingSite(id=1,reg='A',dEnergy=-7)
>>> unit.addBindingSite(id=2,reg='B',dEnergy=-7)
Keyword arguments for addBindingSite() 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
()
Above settings are sufficient for calculation of
transcription probability under regulation.
Just call the bindingProb() method:
>>> unit.bindingProb()
0.13040871277175775
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
addInteractGroup() method
to encode this ``hard'' interaction relationship
(energies are chosen arbitrarily to reflect this situation):
>>> unit.addInteractGroup(names=(1,2),g_energy=10,gp_energy=10)
Keyword argument for addInteractGroup():
- 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 ()
Now the transcription probability decreased a bit:
>>> unit.bindingProb()
0.092275549028488557
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.
>>> unit.addForbiddenEvent((1,2))
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:
>>> unit.bindingProb()
0.092275552378896578
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)
>>> unit.addRegulator(name='A',rp_energy=-.5)
>>> unit.addRegulator(name='B',rp_energy=-.5)
>>> unit.addBindingSite(id=1,reg='A',dEnergy=-7)
>>> unit.addBindingSite(id=2,reg='B',dEnergy=-7)
>>> unit.addInteractGroup(names=(1,2),g_energy=-5,gp_energy=-5)
We first calculate the transcription probability
in case of only activator A, you can see that
this probability is low:
>>> unit.setRegMolNumber(name='A',number=300)
>>> unit.setRegMolNumber(name='B',number=0)
>>> unit.bindingProb()
0.029946900183255565
Then we calculate the transcription probability
when both activators are present.
The probability rised to great extent:
>>> unit.setRegMolNumber(name='A',number=300)
>>> unit.setRegMolNumber(name='B',number=300)
>>> unit.bindingProb()
0.81333798227294996
Export the probability formula:
>>> formula = unit.bindingProbFormula()
>>> formula
'1/(1+33689.734995/(1000*((1+A*0.000362+B*0.000362+1*((A/5000000)^1)*((B/5000000)^1)*72004899337.385880)/(1+A*0.000219+B*0.000219+1*((A/5000000)^1)*((B/5000000)^1)*178482300.963187))))'
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).
|