---logical_promoter.nlogo
来自「NETLOGO」· NLOGO 代码 · 共 521 行
NLOGO
521 行
globals [ dA dB dC Kd KB rbound-A rbound-B time A-exp B-exp C-exp]turtles-own [age bound partner]breeds [rna a-protein b-protein c-protein]to setupca; setup variablesreset-countersset rbound-A false ; set the bound state of the operon to falseset rbound-B false ; set the bound state of the operon to falseset dA 10 ; rate of protein Aset dB 10 ; rate of protein Bset dC 10 ; rate of protein Cset Kd 4 ; dissociation coefficientset KB 100 ; binding coefficient ; create binding sites ; red - A ask patches with [(pxcor = -13) and (pycor = 0)] [ set pcolor red set plabel "A" ] ; create "gene" ask patches with [(pxcor > -13) and (pxcor <= -5) and (pycor = 0)] [ set pcolor white ] ; blue - B ask patches with [(pxcor = -6) and (pycor = 0)] [ set pcolor blue set plabel "B" ] ; create "gene" ask patches with [(pxcor > -6) and (pxcor <= 0) and (pycor = 0)] [ set pcolor white ] ; blue - C ask patches with [(pxcor = 1) and (pycor = 0)] [ set pcolor gray set plabel "P" ] ask patches with [(pxcor = 2) and (pycor = 0)] [ set pcolor gray set plabel "P" ] ask patches with [(pxcor = 3) and (pycor = 0)] [ set pcolor green set plabel "C" ] ; create "gene" ask patches with [(pxcor > 3) and (pxcor <= 10) and (pycor = 0)] [ set pcolor white ] ; create ribosomes ask patches with [ ((pxcor < -12) or (pxcor > 13)) or ((pycor < -3) or (pycor > 5))] [ if random 10 = 1 [set pcolor cyan] ] plot-history plot-levels endto go set time time + 1; do gene transcriptionask patches [ if (plabel = "A") [ if (gene-A = true and random 100 < dA ) [ sprout 1 [ set A-exp A-exp + 1 set breed rna set partner nobody set shape "rna" set color red set bound false set age random 30 set heading random 360 fd 2 ] ] ] if (plabel = "B") [ if (gene-B = true and random 100 < dB) [ sprout 1 [ set B-exp B-exp + 1 set breed rna set partner nobody set shape "rna" set color blue set bound false set age random 30 set heading random 360 fd 2 ] ] ];; this determines which gate the system emulatesif (plabel = "C" ) [ if (condition = "3" ) [if (not (rbound-A = true and rbound-B = true) ) [ express-c] ] if (condition = "4" ) [if (rbound-A = false and rbound-B = false) [ express-c]] if (condition = "1" ) [if (rbound-A = true and rbound-B = true) [ express-c]] if (condition = "2" ) [if (rbound-A = true or rbound-B = true) [ express-c]] if (condition = "5" ) [if ((rbound-A = true or rbound-B = true) and not (rbound-A = true and rbound-B = true)) [ express-c]]]]; this was a bit tricky to get the order of events rightask a-protein [ without-interruption [bind-site-a]] ask b-protein [ without-interruption [bind-site-b]]ask turtles [wander ;; both rnas and proteins check to see if they bind and otherwise move around grow-old] ;; both also are recycled by the cell machinery after a while.plot-historyplot-levelsendto express-c if ( random 100 < dC ) [ sprout 1 [ set C-exp C-exp + 1 set breed rna set partner nobody set shape "rna" set color green set bound false set age random 30 set heading random 360 fd 2 ] ] end ; bind repressor to lacZ operonto bind-site-a if (rbound-A = false and partner = nobody) [if (random 100 < Kb and breed = a-protein) [ set bound true set rbound-A true setxy 1 0 set heading 180]]endto bind-site-b if (rbound-B = false and partner = nobody) [if (random 100 < Kb and breed = b-protein) [ set bound true set rbound-B true setxy 2 0 set heading 180]]end; unbind repressor from lacZ operonto unbind-site if ((random 100 < Kd) or (partner != nobody)) [ ifelse (color = red) [set rbound-A false] [set rbound-B false] set bound false setxy random screen-size-x random screen-size-y]end; have RNAs, proteins, and inducers move around the environmentto wander if (pcolor = cyan and shape = "rna") [ ;; this is the ribosome translating hatch 1 [ifelse (color = blue) [set breed b-protein ] [ifelse (color = green) [set breed c-protein ] [set breed a-protein ]] set shape "repressor" set bound false set age 0 set heading random 360 ] ] ifelse (bound = true) [without-interruption [unbind-site]] [rt random 90 - random 90 fd 1 ]endto grow-old ;; cells break down rnas and proteins after a while. set age age + 1 if (age > (40 + random 100)) [if (bound != true) [die] ]endto plot-levels ;; this creates creates the bar graph set-current-plot "Protein Concentrations" clear-plot set-current-plot-pen "A" ppd plotxy 1 count turtles with [breed = a-protein] set-current-plot-pen "B" ppd plotxy 2 count turtles with [breed = b-protein] set-current-plot-pen "C" ppd plotxy 3 count turtles with [breed = c-protein] endto plot-history ;; this creates the line graph set-current-plot "Concentration History" set-current-plot-pen "A" plot ( count turtles with [breed = a-protein] ) set-current-plot-pen "B" plot ( count turtles with [breed = b-protein] ) set-current-plot-pen "C" plot ( count turtles with [breed = c-protein] )endto reset-countersset A-exp 0set B-exp 0set C-exp 0set time 0end; This model was created as part of the 2004 BioQUEST Curriculum Consortium; Summer Workshop. ;; Copyright 2004 by Steven Brewer. All rights reserved.; This model was inspired by many of the sample Netlogo models and parts ; were based on functions from the Enzyme Kinetics model. (Wilensky, U. (2001). ; NetLogo Enzyme Kinetics model. http://ccl.northwestern.edu/netlogo/models/EnzymeKinetics. ; Center for Connected Learning and Computer-Based Modeling, Northwestern University, ; Evanston, IL.) ;; Permission to use, modify or redistribute this model is hereby granted,; provided that both of the following requirements are followed:; a) this copyright notice is included.; b) this model will not be redistributed for profit without permission; from the authors.; Contact the authors for appropriate licenses for redistribution for; profit.;; To refer to this model in academic publications, please use:; Brewer, S.D. (2004). Logical Promoter: Simulating Logical Gates Using; a Model of Gene Expression. http://bcrc.bio.umass.edu/netlogo/models/LogicalPromoter; Biology Computer Resource Center;; In other publications, please use:; Copyright 2004 by Steven Brewer. All rights reserved. See; http://bcrc.bio.umass.edu/netlogo/models/LogicalPromoter; for terms of use.@#$#@#$#@GRAPHICS-WINDOW3211077624518812.03110111CC-WINDOW321251627313Command CenterBUTTON4107043NILsetupNIL1TOBSERVERTBUTTON741013743NILgoT1TOBSERVERTPLOT5184310338Protein ConcentrationsNILNIL0.06.00.030.0falsetruePENS"A" 1.0 1 -65536 true"B" 1.0 1 -16776961 true"C" 1.0 1 -11352576 trueBUTTON6146131179NILreset-countersNIL1TOBSERVERTSWITCH45810791gene-Agene-A11-1000SWITCH1095821291gene-Bgene-B11-1000CHOICE1641030255conditioncondition"1" "2" "3" "4" "5"0MONITOR6494121143NILA-exp31MONITOR12394180143NILB-exp31MONITOR18294239143NILC-exp31MONITOR59462143NILtime31PLOT4339311563Concentration HistoryNILNIL0.0100.00.030.0truefalsePENS"A" 1.0 0 -65536 true"B" 1.0 0 -16776961 true"C" 1.0 0 -11352576 trueBUTTON190149310182NILclear-all-plotsNIL1TOBSERVERT@#$#@#$#@WHAT IS IT?-----------This is a model that demonstrates possible ways that two genes could bind and influence expression of a third, either turning it off or on. The conditions modelled here are not an exhaustive range of the possiblities available in biological systems, but each condition represents an important class of control mechanisms. HOW IT WORKS------------In this system, there are three genes: A, B and C. Genes A and B produce transcription factors. Gene C has two promoters that the transcription factors can bind to. Depending on the settings of the system, these are either enhancers (turning on transcription of C) or silencers (turning off transcription of C).HOW TO USE IT-------------Click "setup" to create the genes and ribosomes. Click "go" to start the model.Switches allow the user to turn genes A and B on and off.A pop-up menu allows the user to select which logical gate to emulate.A plot shows levels of A, B, and C.THINGS TO NOTICE----------------Even when C is turned off, you may notice it occasionally being transcribed. Why might this be? Are some gates "leakier" than others? Why? You can use the counters to putthe system in equilibrium and then reset the counters and experiment with which configurations are most effective.THINGS TO TRY-------------For each gate, determine what role the promoter is playing in the system (enhancer or silencer). Consider constructing a "truth table" that lists possible states of "A", "B", and "C" under each condition to help disinguish among conditions that otherwise may appear to be identical.EXTENDING THE MODEL-------------------To simplify this model, a number of factors have been de-paramaterized, including the rates of each gene (dA, dB, dC) and the coefficients of binding and dissociation (KB and Kd). By adding sliders, you could extend this model and explore the behavior of the system with different values. By changing these values you can try to decrease the leakiness of the system and increase the speed of the system turning on or off.CREDITS AND REFERENCES----------------------This model was created as part of the 2004 BioQUEST Curriculum ConsortiumSummer Workshop. Copyright 2004 by Steven Brewer. All rights reserved.This model was inspired by many of the sample Netlogo models and parts were based on functions from the Enzyme Kinetics model. (Wilensky, U. (2001). NetLogo Enzyme Kinetics model. http://ccl.northwestern.edu/netlogo/models/EnzymeKinetics. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.) Permission to use, modify or redistribute this model is hereby granted,provided that both of the following requirements are followed:a) this copyright notice is included.b) this model will not be redistributed for profit without permission from the authors.Contact the authors for appropriate licenses for redistribution forprofit.To refer to this model in academic publications, please use:Brewer, S.D. (2004). Logical Promoter: Simulating Logical Gates Usinga Model of Gene Expression. http://bcrc.bio.umass.edu/netlogo/models/LogicalPromoterBiology Computer Resource CenterIn other publications, please use:Copyright 2004 by Steven Brewer. All rights reserved. Seehttp://bcrc.bio.umass.edu/netlogo/models/LogicalPromoterfor terms of use.@#$#@#$#@defaulttrue0Polygon -7566196 true true 150 5 40 250 150 205 260 250b-complextrue0Polygon -11352576 true false 79 46 198 148 78 254Polygon -16776961 true false 77 48 197 149 77 255 257 254 256 49boxtrue0Polygon -7566196 true true 45 255 255 255 255 45 45 45circlefalse0Circle -7566196 true true 35 35 230inducertrue0Polygon -11352576 true false 76 47 197 151 75 256r-complextrue0Polygon -65536 true false 76 47 197 150 76 254 257 255 257 47Polygon -11352576 true false 79 46 198 148 78 254repressortrue0Polygon -7566196 true true 76 47 197 150 76 254 257 255 257 47rnatrue0Rectangle -7566196 true true 7 126 294 170@#$#@#$#@NetLogo 2.0.1@#$#@#$#@@#$#@#$#@@#$#@#$#@
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?