Thursday, March 10, 2011

Converting models to English

The semantics used in TinkerCell allows conversion of a model into plain English. The Export menu has this feature. Below is an example:


English export:

transcription factor (repressor) LacI represses repressor binding site (target) lac_op
transcription factor (repressor) TetR represses repressor binding site (target) tet_op
coding (template) gfp_gene produces reporter (product) GFP
molecule (inhibitor) IPTG inhibits transcription factor (target) LacI
molecule (inhibitor) aTc inhibits transcription factor (target) TetR
coding (repressor) gene represses repressor binding site (target) op3

Wednesday, March 9, 2011

Automatically iterating through models

The same "diagram" can be modeled in different ways. So, what is the consequence of the type of model we pick? The new python plugin called plots the simulation of all the combinations of submodels and then clusters the results, showing a picture of how the system can behave depending the modeling methods used.

The key functions used by the python code are:


Important note: The load model function in TinkerCell caches each model that is loaded. The caching checks if the file has changed. In file has not changed, the re-loading of the same model is very fast, since it does not need to parse the file itself. This results in an order or magnitude speed up when doing tc_substituteModel repeatedly.

Monday, March 7, 2011

Sample Python Code for Creating a Little Network

cds4 = tc_insert("cds4","Coding")
p3 = tc_insert("p3","Inducible Promoter")
cds3 = tc_insert("cds3","Coding")
t3 = tc_insert("t3","Terminator")
p2 = tc_insert("p2","Inducible Promoter")
cds2 = tc_insert("cds2","Coding")
t2 = tc_insert("t2","Terminator")

listOfParts = [cds4, p3, cds3, t3, p2, cds2, t2]
tcArray = toTC(listOfParts) #convert Python data structure to


#production of P4
P4 = tc_insert("P4", "Transcription Factor")
x = tc_getX(cds4)
y = tc_getY(cds4)
tc_setPos(P4, x, y - 200)

listToConnect = [cds4, P4]
tcArray = toTC(listToConnect)
R1 = tc_insertConnection(tcArray, "R1", "Protein Production")

#P4 regulates p3

listToConnect = [P4, p3]
tcArray = toTC(listToConnect)
R2 = tc_insertConnection(tcArray, "R2", "Transcription Activation")

#production of P3
P3 = tc_insert("P3", "Transcription Factor")
x = tc_getX(cds3)
y = tc_getY(cds3)
tc_setPos(P3, x, y - 200)

listToConnect = [cds3, P3]
tcArray = toTC(listToConnect)
R3 = tc_insertConnection(tcArray, "R3", "Protein Production")

#P3 regulates p2

listToConnect = [P3, p2]
tcArray = toTC(listToConnect)
R4 = tc_insertConnection(tcArray, "R4", "Transcription Activation")

#production of GFP
GFP = tc_insert("GFP", "Reporter")
x = tc_getX(cds2)
y = tc_getY(cds2)
tc_setPos(GFP, x, y - 200)

listToConnect = [cds2, GFP]
tcArray = toTC(listToConnect)
R5 = tc_insertConnection(tcArray, "R5", "Protein Production")