Simulating Biological Systems in the Stochastic p-calculus Andrew Phillips & Luca Cardelli Microsoft Research, Cambridge UK Biological Computing Modelling Biology The Human Genome project: Scientists hoped that DNA code would help predict system behaviour Functional meaning of the code is still a mystery Systems Biology: Understand and precisely describe the behaviour of biological systems Two complementary approaches: Look at experimental results and “infer” general system properties Build detailed models of systems and test these in the lab Biological Modelling: Need tools for modelling complex parallel systems. Should also scale up to very large systems. The beginnings of a biological programming language... Programming Biology Languages for complex, parallel computer systems: Languages for complex, parallel biological systems: stochastic p-calculus Reactions vs. Components Traditional modelling: model individual reactions Large, Connected Reaction Graphs http://www.celldesigner.org/ Reactions vs. Components Traditional modelling: model individual reactions Stochastic p-calculus: model components Compositional Modelling Build complex models incrementally, by direct composition of simpler components: Model Analysis A mathematical programming language A range of analysis techniques (types, equivalences, model checking) Could provide insight into fundamental properties of biological systems Related Work Stochastic p-calculus proposed by [Priami, 1995] Used to model and simulate a range of biological systems: RTK MAPK pathway [Regev et al., 2001] Gene Regulation by positive Feedback [Priami et al., 2001] Cell Cycle Control in Eukaryotes [Lecca and Priami, 2003] First simulator for stochastic p-calculus [BioSPI] A subset of p-calculus with limited choice Compiles a calculus process to an FCP procedure Executed by the FCP Logix platform [Silverman et al., 1987] Project Overview Graphical Stochastic p-calculus Display stochastic p-calculus models as graphs [Phillips and Cardelli, Bioconcur 2005] Helps make the stochastic p-calculus more accessible Defined a graphical calculus and graphical execution model Proved equivalent to the stochastic p-calculus [Phillips, Cardelli and Castagna, TCSB 2006] let generate_pep(k:float,free:chan,bound:chan,c:chan,e:chan)= delay@gpep;(pep(k,free,bound,c,e)|generate_pep(k,free,bound, c,e)) and pep(k:float,free:chan,bound:chan,c:chan,e:chan)= ( new u@k:chan or !bind(u,c,e);pep_bound(u,k,free,bound,c,e) or delay@dpep ) and pep_bound(u:chan,k:float,free:chan,bound:chan,c:chan,e:chan) = ?u;pep(k,free,bound,c,e) and MHCc_pep(u:chan,c:chan,e:chan)= do delay@open;MHCo_pep(u,c,e) or !c and MHCc()= do ?bindT(uT);MHCc_TPN(uT) or delay@open;MHCo() and MHCo_TPN(uT:chan)= do ?bind(u,c,e);MHCo_TPN_pep(u,c,e,uT) or !uT;MHCo() (* *) and MHCo_TPN_pep(u:chan,c:chan,e:chan,uT:chan)= do delay@r*trigger;MHCt_TPN_pep(u,c,e,uT) or !u;MHCo_TPN(uT) and MHCt_TPN_pep(u:chan,c:chan,e:chan,uT:chan)= do !u;delay@close;MHCc_TPN(uT) or delay@close;MHCc_TPN_pep(u,c,e,uT) and MHCc_TPN_pep(u:chan,c:chan,e:chan,uT:chan)= do delay@open;MHCo_TPN_pep(u,c,e,uT) or !uT;MHCc_pep(u,c,e) and MHCc_TPN(uT:chan)= do delay@open;MHCo_TPN(uT) or !uT;MHCc() (* *) PROVED EQUIVALENT let TPN()= ( new uT@0.01:chan !bindT(uT);(?uT;TPN()) ) let MHCo()= do ?bind(u,c,e);MHCo_pep(u,c,e) or ?bindT(uT);MHCo_TPN(uT) and MHCo_pep(u:chan,c:chan,e:chan)= do delay@trigger;MHCt_pep(u,c,e) or !u;MHCo() and MHCt_pep(u:chan,c:chan,e:chan)= do !u;delay@close;MHCc() or delay@close;MHCc_pep(u,c,e) The Stochastic Pi Machine A simulation algorithm for stochastic p-calculus [Phillips and Cardelli, Bioconcur 2004] Based on standard theory of chemical kinetics [Gillespie 1977] The probability of a reaction is proportional to the rate of the reaction times the number of reactants. Proved correct with respect to the stochastic p-calculus. PROVED CORRECT The SPiM Simulator Simulation algorithm mapped to functional code (OCaml / F#) Used as the basis for implementing the SPiM simulator. [Phillips, SPiM 2006] Close correspondence between formal algorithm and functional code Correct specification improves confidence in simulation results Used in various research centres (UK, France, Italy, Sweden...) http://research.microsoft.com/~aphillip/spim Gene Networks Library Proposed a combinatorial library of gene gates [Blossey, Cardelli, Phillips, TCSB 2006] Used as building blocks to model complex gene networks Explain behaviour of controversial gene networks engineered in vivo 160 140 120 100 !tet !lambda !lac !gfp 80 60 40 © 2000 Elowitz, M.B., Leibler. S. A Synthetic Oscillatory Network of Transcriptional Regulators. Nature 403:335-338. 20 0 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000 Immune System Modelling Model of MHC Class I Antigen Presentation A key pathway in the immune system [Goldstein, MPhil Dissertation 2005] Ongoing collaboration with Immunologists at Southampton University [Cardelli, Elliott, Goldstein, Phillips, Werner. In preparation] © 2003 Current Opinion in Immunology, 15:75–81. © 2003 Nature Reviews Immunology, 3(12):952–96. Gene Networks with Luca Cardelli (MSR Cambridge) Ralf Blossey (IRI Lille) Gene with Negative Control Neg(a,b) produces protein b and is blocked by protein a transcribe = 0.1 unblock = 0.0001 degrade = 0.001 rate(a,b) = 1.0 val transcribe = 0.1 val degrade = 0.001 val unblock = 0.0001 new a@1.0:chan new b@1.0:chan let Neg(a:chan,b:chan) = do delay@transcribe; ( Protein(b) | Neg(a,b) ) or ?a; delay@unblock; Neg(a,b) and Protein(b:chan) = do !b; Protein(b) or delay@degrade a b run Neg(a,b) Neg Gate x1 A protein b can be transcribed at rate 0.1 s-1 Neg Gate x1 x1 Another protein b can be transcribed Neg Gate x1 x2 And another... Neg Gate x1 x3 A protein b can be degraded at rate 0.001 s-1 Neg Gate x1 x2 Equilibrium between transcription and degradation Neg Gate 140 120 100 80 !b 60 40 20 0 0 50000 100000 150000 200000 Level of protein b stabilises at around 100 Repressilator [Elowitz and Leibler, 2000] A gene network engineered in live bacteria. Modelled as a simple combination of Neg gates: Neg(lac,tet) | Neg(tet,lambda) | Neg(lambda,lac) | Neg(tet,gfp) 160 140 120 100 !tet !lambda !lac !gfp 80 60 40 20 © 2000 Elowitz, M.B., Leibler. S. A Synthetic Oscillatory Network of Transcriptional Regulators. Nature 403:335-338. 0 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000 Repressilator: Debugging lac Why do we get oscillations? Neg(lac,tet) | Neg(tet,lambda) | Neg(lambda,lac) lambda tet Repressilator: Debugging (1) x1 x1 x1 Initially there is one copy of each gene Any one of the proteins can be transcribed at rate 0.1 Repressilator: Debugging (2) x1 x1 x1 x1 The tet protein can block the lambda gene at rate 1.0 Repressilator: Debugging (3) x1 x1 x1 x1 Now no lambda protein can be transcribed. But lac protein can still be transcribed. Repressilator: Debugging (4) x1 x1 x1 x1 x1 The lac protein can block the tet gene at rate 1.0 Repressilator: Debugging (5) x1 x1 x1 x1 x1 Now no tet protein can be transcribed. All of the tet protein eventually degrades at rate 0.001 Repressilator: Debugging (5) x1 x1 x1 x1 Meanwhile, lots of lac protein is transcribed Repressilator: Debugging (363) x1 x1 x1 x100 Represents one oscillation cycle Eventually, the lambda gene unblocks at rate 0.0001 Repressilator: Debugging (2173) x1 x1 x1 x100 The lambda protein can now take over... Repressilator: Results Alternate oscillation of proteins: tet, lac, lambda, tet, ... lac lambda lac tet lambda lac tet lambda tet 160 140 120 100 !tet !lambda !lac 80 60 40 20 0 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000 Refined Neg Gate Refined Neg gate with cooperative binding Different implementation, same main program Neg(lac,tet) | Neg(tet,lambda) | Neg(lambda,lac) let Neg(a,b) = ( new u1@10000.0 do delay@transcribe; (Protein(b) | Neg(a,b)) or !a(u1); Blocked(a,b,u1) ) and Blocked(a,b,u1) = ( new u2@0.0001 do ?u1; Neg(a,b) or !a(u2); ?u2; Blocked(a,b,u1) ) and Protein(b) = ( do delay@degrade or ?b(u); !u; Protein(b) ) Negp Gate with Inhibitor transcribe = 0.1 unblock = 0.0001 degrade = 0.001 rate(a,b,r) = 1.0 val transcribe = 0.1 val unblock = 0.0001 new a@1.0:chan new r@1.0:chan val degrade = 0.001 new b@1.0:chan let Negp(a:chan,b:chan,r:chan) = do delay@t; (Proteinp(b,r) | Negp(a,b,r)) or ?a; delay@u; Negp(a,b,r) and Proteinp(b:chan,r:chan) = do !b; Proteinp(b,r) or ?r or delay@d let Inh(r:chan) = !r; Inh(r) r a b Run Negp(a,b,r) Bacteria Logic Gates [Guet et al., 2002] © 2002 AAAS. Reprinted with permission from Guet et al. Combinatorial Synthesis of Genetic Networks. Science 296 (5572): 1466 - 1470 3 genes: tetR, lacI, lcI 5 promoters: PL1, PL2, PT, Pl-, Pl+ 125 possible networks consisting of 3 promoter-gene units 2 inputs: IPTG (represses Tet), aTc (represses Lac) 1 output: GFP (linked to Pl-) Bacteria Logic Gates [Guet et al., 2002] © 2002 AAAS. Reprinted with permission from Guet et al. Combinatorial Synthesis of Genetic Networks. Science 296 (5572): 1466 - 1470 IPTG, aTc as boolean inputs, GFP as boolean output Combinatorial Library of Genes Model complex gene networks from simpler building blocks. Also used simulation to investigate system behaviour. [Blossey, Cardelli, Phillips, TCSB 2006] D038() = tet() | lac() | cI() | gfp() tet() = Negp(TetR,TetR,aTc) lac() = Negp(TetR,LacI,IPTG) cI() = Neg(LacI,lcI) gfp() = Neg(lcI,GFP) D038() D038() | Inh(aTc) D038() | Inh(IPTG) D038() | Inh(aTc) | Inh(IPTG) Immune System Modelling: MHC I Antigen Presentation with Luca Cardelli (MSR Cambridge) Leonard Goldstein (Cambridge University) Tim Elliott (Southampton University) Joern Werner (Southampton University) MHC I Antigen Presentation A key pathway of the immune system: MHC I complexes can signal when a cell is infected. They present peptides (small pieces of virus or bacteria) at the surface of infected cells. A way of marking infected cells for destruction. © 2003 Jonathan W. Yewdell, Eric Reits, and Jacques Neefjes. Making sense of mass destruction: quantitating MHC class I antigen presentation. Nature Reviews Immunology, 3(12):952–96. MHC I Antigen Presentation [© 2005 from Immunobiology, Sixth Edition by Janeway et al. Reproduced by permission of Garland Science/Taylor & Francis LLC.] MHC I Assembly MHC I complexes follow an assembly line: © 2003 Antony N Antoniou, Simon J Powis, and Tim Elliott. Assembly and export of MHC class I peptide ligands. Current Opinion in Immunology, 15:75–81. Peptide Selection: Flytrap Model MHC I captures peptides like a Venus Flytrap. Sensitive to disease peptides only. non disease peptide escapes peptide enters open MHC disease peptide is captured and presented at cell surface Flytrap Model: p-calculus x200 x1 x1 x200 Flytrap Model: p-calculus x199 x200 x1 x1 u x1 Flytrap Model: p-calculus x199 x200 x1 x1 u x1 Flytrap Model: p-calculus x199 x200 x1 x1 x1 u Simulation Results Tapasin allows disease peptides to be rapidly selected in favour of non-disease peptides. Always with Tapasin No Tapasin Transient binding to Tapasin 160 160 160 140 140 140 120 120 120 100 100 100 80 80 80 60 60 60 40 40 40 20 20 20 0 0 0 200 400 600 800 1000 0 0 200 400 600 800 1000 0 200 400 600 Next steps: Investigate influence of tapasin in the lab. Incrementally build a more detailed immune system model. Construct a minimal functional model of the system. 800 1000 Simplified Flytrap Similar results obtained with a simpler model Hypothesis: Tapasin is the 2nd stage of a 2-stage filter Perhaps an explanation of system function. Future Plans Interface SPiM with stochastic analysis tools Improve scalability of core SPiM algorithm Prove correctness of multiprocessor algorithm Extend SPiM with membranes Stochastic p-calculus and ODEs Improve SPiM user interface and debugging Collaborate with medical researchers to model and simulate a range of biological systems Collaborate with pharmaceutical industry to design a next-generation programming language for Systems Biology References Graphical Stochastic p-calculus: [Phillips and Cardelli, Bioconcur 2005] [Phillips, Cardelli and Castagna, TCSB 2006] SPiM Simulator: [Phillips and Cardelli, Bioconcur 2004] [Phillips, SPiM 2005] Gene Networks: [Blossey, Cardelli, Phillips, TCSB 2006] Antigen Presentation: [Goldstein, MPhil Dissertation 2005]