{ "metadata": { "name": "", "signature": "sha256:df377415ef7702829dca095ea5299f8f66eb97ca3c8f02c48b2df08b08056324" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "This tutorial will walk you through the the code (from [corm.py](https://github.com/LoLab-VU/CORM/blob/master/corm.py)) that builds the COX-2 Reaction Model (CORM). It will provide a very basic introduction to the PySB modeling framework that CORM is encoded in as well as the biological interactions that CORM encodes.\n", "\n", "The first lines in [corm.py](https://github.com/LoLab-VU/CORM/blob/master/corm.py) import some PySB code that will be needed for building the model:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from pysb import Model, Monomer, Parameter, Initial, Rule, Observable\n", "from pysb.macros import bind, bind_complex, catalyze" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The first line imports a number of objects (Python classes, if you're familiar with Python) that will provide building blocks for the model. The second imports several PySB macros. These are Python functions that allow you to quickly define a set of commonly seen biological interactions (like enzyme catalysis). \n", "\n", "The first step in building a PySB model is to create a new model object:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Model()" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "We now have a new empty model object. The first thing we want to add to it are the monomers we will have in our model. 'Monomers' is a somewhat misleading term as PySB monomers are not necessarily protein monomers (although they can be). A PySB monomer is just the smallest interacting unit you want in your model. This might be anything from a large multi-protein complex (that, in the context of your model, never diassociates) to an actual protein monomer. In the case of CORM, we will define a monomer for the homodimeric enzyme COX-2:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Monomer('COX2', ['allo', 'cat'])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "Monomer('COX2', ['allo', 'cat'])" ] } ], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The first argument to the PySB Monomer class gives the name of the newly created monomer (COX2 in this case). The second argument (in square brackets) is a Python list of binding sites on the monomer. Here we have defined two binding sites for COX2, an allosteric site (named 'allo'), and a catalytic site (named 'cat'). Next we'll define monomers for the two substrates COX2 can bind in our model:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Monomer('AG', ['b'])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "Monomer('AG', ['b'])" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "Monomer('AA', ['b'])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 5, "text": [ "Monomer('AA', ['b'])" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "metadata": {}, "source": [ "These are 2-arachidonoylglycerol (called AG in the model) and arachidonic acid (called AA in the model). Each of these has one generic binding site (called 'b'). Lastly, we'll define monomers for the products of COX2 turnover of AA or AG:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Monomer('PG')" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 6, "text": [ "Monomer('PG')" ] } ], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "Monomer('PGG')" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 7, "text": [ "Monomer('PGG')" ] } ], "prompt_number": 7 }, { "cell_type": "markdown", "metadata": {}, "source": [ "These are prostaglandin (called PG in the model) and prostaglandin glycerol (called PGG in the model). Because we will model the catalysis as a two-step process (E+S <-> E-S --> E + P), we will never have a chemical species in our model in which a product is bound to anything. Therefore, we only need to name PG and PGG but don't have to give them binding sites.\n", "\n", "Now that we've defined the interacting components in our model, we need to define parameters for how much of each monomer we begin with. To do this we first use the PySB parameter class to define these parameters:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('COX2_0', 15e-3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 8, "text": [ "Parameter('COX2_0', 0.015)" ] } ], "prompt_number": 8 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('AG_0', 16)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 9, "text": [ "Parameter('AG_0', 16.0)" ] } ], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('AA_0', 16)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 10, "text": [ "Parameter('AA_0', 16.0)" ] } ], "prompt_number": 10 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('PG_0', 0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 11, "text": [ "Parameter('PG_0', 0.0)" ] } ], "prompt_number": 11 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('PGG_0', 0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 12, "text": [ "Parameter('PGG_0', 0.0)" ] } ], "prompt_number": 12 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Each parameter is given a name (COX2_0, for instance) and a value. It is critical to ensure we are consistent with the units we use to define our parameters. In the case of CORM, these initial conditions are given in micromolar. When we define rate constants later for the reactions occuring in our model, we will be sure they are also in terms of micromolar (when concentration dependent).\n", "\n", "While we've defined parameters for these initial conditions, we haven't yet told PySB that these parameters are initial conditions, or specified what chemical species each corresponds to. To do that, we use the Initial PySB class:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Initial(COX2(allo=None, cat=None), COX2_0)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 13 }, { "cell_type": "code", "collapsed": false, "input": [ "Initial(AG(b=None), AG_0)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 14 }, { "cell_type": "code", "collapsed": false, "input": [ "Initial(AA(b=None), AA_0)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 15 }, { "cell_type": "code", "collapsed": false, "input": [ "Initial(PG(), PG_0)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 16 }, { "cell_type": "code", "collapsed": false, "input": [ "Initial(PGG(), PGG_0)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 17 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The first argument to the Initial class is the species that will be initialized with that initial condition. For instance, for COX2, that species is COX2(allo=None, cat=None). The none after each of COX2's binding sites indicates that the enzyme should begin with nothing bound at either its allosteric or catalytic sites. The second argument to Initial is the parameter that gives the value of the initial condition (COX2_0, for instance). For COX2, this means we will start the model with a concentration of .015 microM.\n", "\n", "Nex, we need to define rate parameters for each of the reactions occuring in our model. In the case of CORM, we will define different rate parameters for each of the reactions that are possible in the model, but note that this is not required. If we believed the same rate parameter accurately described the rate of different reactions, we could have used the same PySB parameter in multiple reactions.\n", "\n", "First we will define rates for interactions of AA with COX2 when nothing is present in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_cat1', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 18, "text": [ "Parameter('kf_AA_cat1', 1000.0)" ] } ], "prompt_number": 18 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_cat1', 830.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 19, "text": [ "Parameter('kr_AA_cat1', 830.0)" ] } ], "prompt_number": 19 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kcat_AA1', 1.3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 20, "text": [ "Parameter('kcat_AA1', 1.3)" ] } ], "prompt_number": 20 }, { "cell_type": "markdown", "metadata": {}, "source": [ "We have now defined forward and reverse reaction rates for the binding of AA to COX2's catalytic site when COX2 has nothing bound in the allosteric site, and a kcat for COX2 turnover of AA when nothing is present in the allosteric site. Next, we'll define the same type of rates for AA and COX2 interactions when COX2 has an AG molecule bound in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_cat2', 1.0e-3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 21, "text": [ "Parameter('kf_AA_cat2', 0.001)" ] } ], "prompt_number": 21 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_cat2', 3.3e-6)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 22, "text": [ "Parameter('kr_AA_cat2', 3.3e-06)" ] } ], "prompt_number": 22 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kcat_AA2', 2.3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 23, "text": [ "Parameter('kcat_AA2', 2.3)" ] } ], "prompt_number": 23 }, { "cell_type": "markdown", "metadata": {}, "source": [ "And again for AA and COX2 catalytic interactions when COX2 has a molecule of AA bound in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_cat3', 1.0e-3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 24, "text": [ "Parameter('kf_AA_cat3', 0.001)" ] } ], "prompt_number": 24 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_cat3', 8.3e-6)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 25, "text": [ "Parameter('kr_AA_cat3', 8.3e-06)" ] } ], "prompt_number": 25 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kcat_AA3', 1.3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 26, "text": [ "Parameter('kcat_AA3', 1.3)" ] } ], "prompt_number": 26 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next, we'll define the analogous catalytic interactions for binding and turnover of AG by COX2 when COX2 has nothing, AG, or AA bound at the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_cat1', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 27, "text": [ "Parameter('kf_AG_cat1', 1000.0)" ] } ], "prompt_number": 27 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_cat1', 760.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 28, "text": [ "Parameter('kr_AG_cat1', 760.0)" ] } ], "prompt_number": 28 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kcat_AG1', 1.2)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 29, "text": [ "Parameter('kcat_AG1', 1.2)" ] } ], "prompt_number": 29 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_cat2', 1.0e-3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 30, "text": [ "Parameter('kf_AG_cat2', 0.001)" ] } ], "prompt_number": 30 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_cat2', 4.8e-4)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 31, "text": [ "Parameter('kr_AG_cat2', 0.00048)" ] } ], "prompt_number": 31 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_cat3', 1.0e-3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 32, "text": [ "Parameter('kf_AG_cat3', 0.001)" ] } ], "prompt_number": 32 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_cat3', 1.9e-6)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 33, "text": [ "Parameter('kr_AG_cat3', 1.9e-06)" ] } ], "prompt_number": 33 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kcat_AG3', 0.21)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 34, "text": [ "Parameter('kcat_AG3', 0.21)" ] } ], "prompt_number": 34 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that there is no 'kcat_AG2' parameter because that corresponds to COX2 turnover of AG when AG is also bound in the allosteric site, and since CORM assumes substrate inhibition, this rate would be zero.\n", "\n", "Next we need to define reaction rates for binding of COX2 to AA at the allosteric site (with nothing, AA, or AG bound at the catalytic site):" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_allo1', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 35, "text": [ "Parameter('kf_AA_allo1', 1000.0)" ] } ], "prompt_number": 35 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_allo1', 1.0e5)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 36, "text": [ "Parameter('kr_AA_allo1', 100000.0)" ] } ], "prompt_number": 36 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_allo2', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 37, "text": [ "Parameter('kf_AA_allo2', 1000.0)" ] } ], "prompt_number": 37 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_allo2', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 38, "text": [ "Parameter('kr_AA_allo2', 1000.0)" ] } ], "prompt_number": 38 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AA_allo3', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 39, "text": [ "Parameter('kf_AA_allo3', 1000.0)" ] } ], "prompt_number": 39 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AA_allo3', 250.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 40, "text": [ "Parameter('kr_AA_allo3', 250.0)" ] } ], "prompt_number": 40 }, { "cell_type": "markdown", "metadata": {}, "source": [ "And finally we define reaction rates for binding of AG to the allosteric site when nothing, AA, or AG is bound at the catalytic site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_allo1', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 41, "text": [ "Parameter('kf_AG_allo1', 1000.0)" ] } ], "prompt_number": 41 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_allo1', 1.0e5)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 42, "text": [ "Parameter('kr_AG_allo1', 100000.0)" ] } ], "prompt_number": 42 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_allo2', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 43, "text": [ "Parameter('kf_AG_allo2', 1000.0)" ] } ], "prompt_number": 43 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_allo2', 400.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 44, "text": [ "Parameter('kr_AG_allo2', 400.0)" ] } ], "prompt_number": 44 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kf_AG_allo3', 1000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 45, "text": [ "Parameter('kf_AG_allo3', 1000.0)" ] } ], "prompt_number": 45 }, { "cell_type": "code", "collapsed": false, "input": [ "Parameter('kr_AG_allo3', 63000.0)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 46, "text": [ "Parameter('kr_AG_allo3', 63000.0)" ] } ], "prompt_number": 46 }, { "cell_type": "markdown", "metadata": {}, "source": [ "We have now defined all the 'pieces' of CORM (its monomers, initial conditions, and rate parameters), but we haven't yet defined what interactions are allowed in our model.\n", "\n", "First we will use the PySB catalyze macro to specify that AA can bind COX2 when nothing is bound in its allosteric site and be converted to PG with rates given by the first three rate parameters we defined above:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "catalyze(COX2(allo=None), 'cat', AA(), 'b', PG(), [kf_AA_cat1, kr_AA_cat1, kcat_AA1])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 47, "text": [ "ComponentSet([\n", " Rule('bind_COX2_AA_to_COX2AA', COX2(allo=None, cat=None) + AA(b=None) <> COX2(allo=None, cat=1) % AA(b=1), kf_AA_cat1, kr_AA_cat1),\n", " Rule('catalyze_COX2AA_to_COX2_PG', COX2(allo=None, cat=1) % AA(b=1) >> COX2(allo=None, cat=None) + PG(), kcat_AA1),\n", " ])" ] } ], "prompt_number": 47 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The first argument to the catalyze macro is the enzyme (COX2 with nothing bound in the allosteric site), then the site on the enzyme for catalytic binding ('cat'), then the substrate (AA), then the binding site on the substrate ('b'), then the product (PG), and finally, a list of rate parameters (forward and reverse rates for binding of enzyme and substrate and kcat for substrate turnover). The catalyze macro creates two instances of the PySB Rule class each of which defines allowed reaction(s). Each Rule has a name (i.e. 'bind_COX2_AA_to_COX2AA' for the first rule), a defined interaction (i.e. COX2 and AA can reversibly bind when both have nothing previously bound), and rate parameters for the interaction (i.e. kf_AA_cat_1 and kr_AA_cat1). \n", "\n", "While in the case of CORM we define rules that apply to only one set of reactants and products, this does not have to be so. The power of PySB and other 'rule-based' modeling languages is that rules can match many different reactions, meaning you do not have to explicitly define every allowed interaction in your model. For CORM we do choose to individually define these reactions so that we can assign different rate parameters to each reaction.\n", "\n", "Next, we'll use the bind_complex macro and a PySB rule to state that COX2 with AG bound in the allosteric site can bind AA and create PG:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "bind_complex(COX2(allo=1) % AG(b=1), 'cat', AA(), 'b', [kf_AA_cat2, kr_AA_cat2])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 48, "text": [ "ComponentSet([\n", " Rule('bind_COX2AG_AA', COX2(allo=1, cat=None) % AG(b=1) + AA(b=None) <> COX2(allo=1, cat=50) % AG(b=1) % AA(b=50), kf_AA_cat2, kr_AA_cat2),\n", " ])" ] } ], "prompt_number": 48 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('kcat_AA_2',\n", " COX2(allo=1, cat=2) % AG(b=1) % AA(b=2) >> COX2(allo=1, cat=None) % AG(b=1) + PG(),\n", " kcat_AA2)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 49, "text": [ "Rule('kcat_AA_2', COX2(allo=1, cat=2) % AG(b=1) % AA(b=2) >> COX2(allo=1, cat=None) % AG(b=1) + PG(), kcat_AA2)" ] } ], "prompt_number": 49 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Then we'll do the same to allow COX2 binding and turnover of AA when AA is also bound in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "bind_complex(COX2(allo=1) % AA(b=1), 'cat', AA(), 'b', [kf_AA_cat3, kr_AA_cat3])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 50, "text": [ "ComponentSet([\n", " Rule('bind_COX2AA_AA', COX2(allo=1, cat=None) % AA(b=1) + AA(b=None) <> COX2(allo=1, cat=50) % AA(b=1) % AA(b=50), kf_AA_cat3, kr_AA_cat3),\n", " ])" ] } ], "prompt_number": 50 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('kcat_AA_3',\n", " COX2(allo=1, cat=2) % AA(b=1) % AA(b=2) >> COX2(allo=1, cat=None) % AA(b=1) + PG(),\n", " kcat_AA3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 51, "text": [ "Rule('kcat_AA_3', COX2(allo=1, cat=2) % AA(b=1) % AA(b=2) >> COX2(allo=1, cat=None) % AA(b=1) + PG(), kcat_AA3)" ] } ], "prompt_number": 51 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next we create analagous rules for binding and turnover of AG when nothing, AG, or AA is bound in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "catalyze(COX2(allo=None), 'cat', AG(), 'b', PGG(), [kf_AG_cat1, kr_AG_cat1, kcat_AG1])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 52, "text": [ "ComponentSet([\n", " Rule('bind_COX2_AG_to_COX2AG', COX2(allo=None, cat=None) + AG(b=None) <> COX2(allo=None, cat=1) % AG(b=1), kf_AG_cat1, kr_AG_cat1),\n", " Rule('catalyze_COX2AG_to_COX2_PGG', COX2(allo=None, cat=1) % AG(b=1) >> COX2(allo=None, cat=None) + PGG(), kcat_AG1),\n", " ])" ] } ], "prompt_number": 52 }, { "cell_type": "code", "collapsed": false, "input": [ "bind_complex(COX2(allo=1) % AG(b=1), 'cat', AG(), 'b', [kf_AG_cat2, kr_AG_cat2])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 53, "text": [ "ComponentSet([\n", " Rule('bind_COX2AG_AG', COX2(allo=1, cat=None) % AG(b=1) + AG(b=None) <> COX2(allo=1, cat=50) % AG(b=1) % AG(b=50), kf_AG_cat2, kr_AG_cat2),\n", " ])" ] } ], "prompt_number": 53 }, { "cell_type": "code", "collapsed": false, "input": [ "bind_complex(COX2(allo=1) % AA(b=1), 'cat', AG(), 'b', [kf_AG_cat3, kr_AG_cat3])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 54, "text": [ "ComponentSet([\n", " Rule('bind_COX2AA_AG', COX2(allo=1, cat=None) % AA(b=1) + AG(b=None) <> COX2(allo=1, cat=50) % AA(b=1) % AG(b=50), kf_AG_cat3, kr_AG_cat3),\n", " ])" ] } ], "prompt_number": 54 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('kcat_AG_3',\n", " COX2(allo=1, cat=2) % AA(b=1) % AG(b=2) >> COX2(allo=1, cat=None) % AA(b=1) + PGG(),\n", " kcat_AG3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 55, "text": [ "Rule('kcat_AG_3', COX2(allo=1, cat=2) % AA(b=1) % AG(b=2) >> COX2(allo=1, cat=None) % AA(b=1) + PGG(), kcat_AG3)" ] } ], "prompt_number": 55 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The final set of set of rules we need to add will tell PySB that AA and AG can both bind to the allosteric site. First we'll use the bind macro to add the case where AA binds the allosteric site and nothing is in the catalytic site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "bind(COX2(cat=None), 'allo', AA(), 'b', [kf_AA_allo1, kr_AA_allo1])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 56, "text": [ "ComponentSet([\n", " Rule('bind_COX2_AA', COX2(allo=None, cat=None) + AA(b=None) <> COX2(allo=1, cat=None) % AA(b=1), kf_AA_allo1, kr_AA_allo1),\n", " ])" ] } ], "prompt_number": 56 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Then we'll use rules to allow the binding of AA to the allosteric site when AA or AG is bound to the catalytic site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('bind_COX2AA_AA_allo',\n", " COX2(cat=1, allo=None) % AA(b=1) + AA(b=None) <> COX2(cat=1, allo=2) % AA(b=1) % AA(b=2),\n", " kf_AA_allo2, kr_AA_allo2)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 57, "text": [ "Rule('bind_COX2AA_AA_allo', COX2(allo=None, cat=1) % AA(b=1) + AA(b=None) <> COX2(allo=2, cat=1) % AA(b=1) % AA(b=2), kf_AA_allo2, kr_AA_allo2)" ] } ], "prompt_number": 57 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('bind_COX2AG_AA_allo',\n", " COX2(cat=1, allo=None) % AG(b=1) + AA(b=None) <> COX2(cat=1, allo=2) % AG(b=1) % AA(b=2),\n", " kf_AA_allo3, kr_AA_allo3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 58, "text": [ "Rule('bind_COX2AG_AA_allo', COX2(allo=None, cat=1) % AG(b=1) + AA(b=None) <> COX2(allo=2, cat=1) % AG(b=1) % AA(b=2), kf_AA_allo3, kr_AA_allo3)" ] } ], "prompt_number": 58 }, { "cell_type": "markdown", "metadata": {}, "source": [ "And finally we'll create the analogous rules for AG binding to the allosteric site with nothing, AA, or AG in the allosteric site:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "bind(COX2(cat=None), 'allo', AG(), 'b', [kf_AG_allo1, kr_AG_allo1])" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 59, "text": [ "ComponentSet([\n", " Rule('bind_COX2_AG', COX2(allo=None, cat=None) + AG(b=None) <> COX2(allo=1, cat=None) % AG(b=1), kf_AG_allo1, kr_AG_allo1),\n", " ])" ] } ], "prompt_number": 59 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('bind_COX2AA_AG_allo',\n", " COX2(cat=1, allo=None) % AA(b=1) + AG(b=None) <> COX2(cat=1, allo=2) % AA(b=1) % AG(b=2),\n", " kf_AG_allo2, kr_AG_allo2)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 60, "text": [ "Rule('bind_COX2AA_AG_allo', COX2(allo=None, cat=1) % AA(b=1) + AG(b=None) <> COX2(allo=2, cat=1) % AA(b=1) % AG(b=2), kf_AG_allo2, kr_AG_allo2)" ] } ], "prompt_number": 60 }, { "cell_type": "code", "collapsed": false, "input": [ "Rule('bind_COX2AG_AG_allo',\n", " COX2(cat=1, allo=None) % AG(b=1) + AG(b=None) <> COX2(cat=1, allo=2) % AG(b=1) % AG(b=2),\n", " kf_AG_allo3, kr_AG_allo3)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 61, "text": [ "Rule('bind_COX2AG_AG_allo', COX2(allo=None, cat=1) % AG(b=1) + AG(b=None) <> COX2(allo=2, cat=1) % AG(b=1) % AG(b=2), kf_AG_allo3, kr_AG_allo3)" ] } ], "prompt_number": 61 }, { "cell_type": "markdown", "metadata": {}, "source": [ "At this point we've defined all the monomers, initial conditions, parameters, and the allowed interactions present in CORM. The model is complete and ready to be simulated. \n", "\n", "Before simulating, we can 'tag' particular species we're interested in to make it easy to plot their trajectories after simulation. To do this we use PySB Observables:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Observable('obsPG', PG())" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 62, "text": [ "Observable('obsPG', PG())" ] } ], "prompt_number": 62 }, { "cell_type": "code", "collapsed": false, "input": [ "Observable('obsPGG', PGG())" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 63, "text": [ "Observable('obsPGG', PGG())" ] } ], "prompt_number": 63 }, { "cell_type": "code", "collapsed": false, "input": [ "Observable('obsAA', AA())" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 64, "text": [ "Observable('obsAA', AA())" ] } ], "prompt_number": 64 }, { "cell_type": "code", "collapsed": false, "input": [ "Observable('obsAG', AG())" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 65, "text": [ "Observable('obsAG', AG())" ] } ], "prompt_number": 65 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Each observable has a name and a species it matches. The species pattern can match multiple chemical species; for instance, you could match all the COX2 with nothing bound at the allosteric site (but either AA, AG, or nothing bound at the catalytic site) using the pattern COX2(allo=None).\n", "\n", "To simulate the model, we import the function PySB odesolve, which will solve the ordinary differential equations (ODEs) that PySB has created under the hood for CORM. We also import the Python package Numpy to allow us to define a trajectory of timepoints:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from pysb.integrate import odesolve\n", "import numpy" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 66 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Then we define t, the vector of time points we want to simulate at (here 100 evenly spaced time points from 0 to 10 seconds):" ] }, { "cell_type": "code", "collapsed": false, "input": [ "t = numpy.linspace(0, 10, num=100)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 68 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, we simulate using odesolve and store the matrix of all model species at all requested time points in the variable yout:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "yout = odesolve(model, t)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "creating /var/folders/z3/m70qnpgj7gx1_bj92txc141h0000gn/T/scipy-Erin-NsKoX4/python27_intermediate/compiler_10a3badd5737329477237726cc2e9ec1\n" ] } ], "prompt_number": 69 }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can pull out the concentrations for a any of the observables we defined using the observable name:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "yout['obsPG']" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 70, "text": [ "array([ 0. , 0.00140281, 0.00270124, 0.00397287, 0.00523782,\n", " 0.0065011 , 0.00776396, 0.00902671, 0.01028943, 0.01155214,\n", " 0.01281483, 0.01407753, 0.01534021, 0.0166029 , 0.01786557,\n", " 0.01912824, 0.02039091, 0.02165357, 0.02291623, 0.02417888,\n", " 0.02544152, 0.02670416, 0.02796679, 0.02922942, 0.03049204,\n", " 0.03175466, 0.03301727, 0.03427988, 0.03554248, 0.03680507,\n", " 0.03806766, 0.03933025, 0.04059283, 0.0418554 , 0.04311797,\n", " 0.04438053, 0.04564309, 0.04690564, 0.04816818, 0.04943072,\n", " 0.05069326, 0.05195579, 0.05321831, 0.05448083, 0.05574335,\n", " 0.05700585, 0.05826836, 0.05953085, 0.06079334, 0.06205583,\n", " 0.06331831, 0.06458079, 0.06584326, 0.06710572, 0.06836818,\n", " 0.06963063, 0.07089308, 0.07215552, 0.07341796, 0.07468039,\n", " 0.07594282, 0.07720524, 0.07846765, 0.07973006, 0.08099247,\n", " 0.08225487, 0.08351726, 0.08477965, 0.08604203, 0.08730441,\n", " 0.08856678, 0.08982914, 0.0910915 , 0.09235386, 0.09361621,\n", " 0.09487855, 0.09614089, 0.09740322, 0.09866555, 0.09992787,\n", " 0.10119019, 0.1024525 , 0.10371481, 0.10497711, 0.1062394 ,\n", " 0.10750169, 0.10876397, 0.11002625, 0.11128853, 0.11255079,\n", " 0.11381306, 0.11507531, 0.11633756, 0.11759981, 0.11886205,\n", " 0.12012428, 0.12138651, 0.12264874, 0.12391096, 0.12517317])" ] } ], "prompt_number": 70 }, { "cell_type": "markdown", "metadata": {}, "source": [ "To create plots of our simulated data, we can use the Python package matplotlib:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from matplotlib import pyplot\n", "%matplotlib inline" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 82 }, { "cell_type": "code", "collapsed": false, "input": [ "pyplot.figure()\n", "pyplot.plot(t, yout['obsPG'], label='PG')\n", "pyplot.plot(t, yout['obsPGG'], label='PGG')\n", "pyplot.legend()" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 87, "text": [ "" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEg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ouTut7l7T3c/gnAB7nV3vyLquKLg7puB9WbWN/bUucDKCEOK0mpgkJm1jv19OZdwAT+VzQWu\njN2/EqiySIxs8xJNuirju8DlwAozWxZ77lZ3fyXCmJJFqrf7xgNPxAqifxCbtJhq3H157De8xYRr\nOUuBh6ONquGY2X8TlqHpbGbrgV8AvwaeNrOrgXXAyCrfQ5OqRESaPq37KyKSApTsRURSgJK9iEgK\nULIXEUkBSvYiIilAyV5EJAUo2YuIpAAlexGRFPB/S0plTzKpxegAAAAASUVORK5CYII=\n", "text": [ "" ] } ], "prompt_number": 87 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here, for instance, we see the concentrations of the products (PG and PGG) over time. \n", "\n", "This concludes the CORM tutorial. To learn more about other features of PySB models, see the PySB [documentation](http://docs.pysb.org/en/latest/). To see how the CORM model parameters were fitted to experimental data, see the file [run_pymc_sampling.py](https://github.com/LoLab-VU/CORM/blob/master/run_pymc_sampling.py)." ] } ], "metadata": {} } ] }