{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Model a dual activator system with an AND gate\n", "\n", "There are now two factors X and Y. Both are activators and their effects are multiplied. This means the model's activation function is\n", "\n", "$\\beta \\frac{x^{H}}{K_{zx}^{H}+x^{H}} \\frac{y^{H}}{K_{zy}^{H}+y^{H}} = \\beta \\frac{(x/K_{zx})^{H}}{1+(x/K_{zx})^{H}} \\frac{(y/K_{zy})^{H}}{1+(y/K_{zy})^{H}}$\n", "\n", "where $\\beta$ is the maximal rate of transcription of Z, $H$ is the Hill coefficient (using the same value for both expressions, for the sake of simplicity), $K_{zx}$ is the activation threshold for X on Z, $K_{zy}$ is the activation threshold for Y on Z, and now $X$ and $Y$ are both parameters that will change over time.\n", "\n", "The full model is\n", "\n", "$\\frac{dZ}{dt} = \\beta \\frac{x^{H}}{K_{zx}^{H}+x^{H}} \\frac{y^{H}}{K_{zy}^{H}+y^{H}} - \\alpha Z$\n", "\n", "where $\\alpha$ is the degradation rate constant." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import scipy.integrate\n", "import matplotlib.pyplot as plt\n", "\n", "def dual_activator_AND( t, statevars, params):\n", " # Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Simulate the model\n", "\n", "Use $\\beta=1$, $K_{zx}=0.5$, $H=5$, $K_{zy}=0.5$, and $\\alpha=1$. X should be 0 until t=0.5, and 1 thereafter. Y should be 0 until t=5, and 1 thereafter. \n", "\n", "Simulate from t=0 to t=20 with a time steps of 0.01." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plot the simulation\n", "\n", "Plot X over time in an upper subplot, Y over time in a middle subplot, and Z over time in a lower subplot." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Model a dual activator system with an OR gate\n", "\n", "There are now two factors X and Y. Both are activators and their effects are combined so that the presence of one or the other can activate transcription, but it is not as simple as just adding them together. This means the model's activation function is\n", "\n", "$\\beta (\\frac{(X/K_zx)^H}{1+(X/K_zy)^H+(Y/K_zy)^H} + \\frac{(Y/K_zy)^H}{1+(X/K_zy)^H+(Y/K_zy)^H})$\n", "\n", "where $\\beta$ is the maximal rate of transcription of Z, $H$ is the Hill coefficient (using the same value for both expressions, for the sake of simplicity), $K_{zx}$ is the activation threshold for X on Z, $K_{zy}$ is the activation threshold for Y on Z, and now $X$ and $Y$ are both parameters that will change over time.\n", "\n", "The full model is\n", "\n", "$\\frac{dZ}{dt} = \\beta (\\frac{(X/K_zx)^H}{1+(X/K_zy)^H+(Y/K_zy)^H} + \\frac{(Y/K_zy)^H}{1+(X/K_zy)^H+(Y/K_zy)^H}) - \\alpha Z$\n", "\n", "where $\\alpha$ is the degradation rate constant." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "def dual_activator_OR( t, statevars, params):\n", " # Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Simulate the model\n", "\n", "Use $\\beta=1$, $K_{zx}=0.5$, $H=5$, $K_{zy}=0.5$, and $\\alpha=1$. X should be 0 until t=0.5, and 1 thereafter. Y should be 0 until t=5, and 1 thereafter. \n", "\n", "Simulate from t=0 to t=20 with a time steps of 0.01." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plot the simulation\n", "\n", "Plot X over time in an upper subplot, Y over time in a middle subplot, and Z over time in a lower subplot." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }