Skip to content

Instantly share code, notes, and snippets.

@Stiivi
Created October 16, 2018 11:16
Show Gist options
  • Save Stiivi/1b6dacf0f7699cb9d75472597ed04af4 to your computer and use it in GitHub Desktop.
Save Stiivi/1b6dacf0f7699cb9d75472597ed04af4 to your computer and use it in GitHub Desktop.
DEF TAG polymerase
DEF SLOT complement
# Template site
DEF SLOT t_site
# Complementary site
DEF SLOT c_site
DEF TAG nucleotide
DEF TAG promoter
DEF TAG free
DEF TAG taken
DEF TAG A
DEF TAG C
DEF TAG T
DEF TAG G
DEF TAG disabled
# Promotor
REACT r_promoter
WHERE (polymerase !t_site !c_site)
ON (nucleotide promoter)
IN LEFT
BIND t_site TO OTHER
# Complement link catalysis
# ----------------------------------------------------------
REACT r_nucA
WHERE (polymerase t_site.A !c_site) ON (free nucleotide T)
IN LEFT BIND c_site TO OTHER
IN RIGHT UNSET free
REACT r_nucC
WHERE (polymerase t_site.C !c_site) ON (free nucleotide G)
IN LEFT BIND c_site TO OTHER
IN RIGHT UNSET free
REACT r_nucT
WHERE (polymerase t_site.T !c_site) ON (free nucleotide A)
IN LEFT BIND c_site TO OTHER
IN RIGHT UNSET free
REACT r_nucG
WHERE (polymerase t_site.G !c_site) ON (free nucleotide C)
IN LEFT BIND c_site TO OTHER
IN RIGHT UNSET free
# Zip it!
# ----------------------------------------------------------
#
# Pair
ACT a_complement
WHERE (polymerase t_site.nucleotide c_site.nucleotide)
IN THIS
SET shift
IN THIS.t_site
BIND complement TO c_site
ACT a_shift
WHERE (polymerase shift)
IN THIS
BIND w_site TO t_site
UNSET shift
SET advance
ACT a_advance
WHERE (polymerase advance)
IN THIS
BIND t_site TO t_site.next
UNSET advance
SET prolong
ACT a_prolong
WHERE (polymerase c_site.nucleotide w_site.nucleotide)
IN THIS.c_site
BIND next TO w_site.complement
STRUCT strand
# FIXME: Add promoter as an abstract chain before the o1 nucleotide
OBJ n1 (nucleotide G promoter)
OBJ n2 (nucleotide A)
OBJ n3 (nucleotide T)
OBJ n4 (nucleotide T)
OBJ n5 (nucleotide A)
OBJ n6 (nucleotide C)
OBJ n7 (nucleotide A)
BIND n1.next TO n2
BIND n2.next TO n3
BIND n3.next TO n4
BIND n4.next TO n5
BIND n5.next TO n6
BIND n6.next TO n7
WORLD main
3 (free nucleotide A)
3 (free nucleotide C)
3 (free nucleotide T)
3 (free nucleotide G)
1 strand
1 (polymerase)
# Data
# -----------------------------------------------------------
DATA (dot_style nucleotide) "rounded"
DATA (dot_color A) "salmon"
DATA (dot_color C) "slateblue"
DATA (dot_color T) "sandybrown"
DATA (dot_color G) "skyblue"
DATA (dot_style polymerase) "filled"
DATA (dot_fillcolor polymerase) "gold"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment