{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "*Write your name here*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Transcription with a single repressor\n", "\n", "Implement a model of Z, which is repressed by X (a parameter) and that degrades. The model function takes as input the time, state variables, and parameters. It should have one state variable, Z, that is activated by a transcription factor X.\n", "\n", "The parameters are\n", "- vmax_z: maximum rate of Z's transcription\n", "- K_xz: the activation threshold for X's activation of Z\n", "- n_xz: the Hill coefficient (exponent) for X's activation of Z\n", "- d_z: the degradation rate constant for Z\n", "- X: the amount of X in the system\n", "\n", "The model's activation function is\n", "\n", "$v_{max} \\frac{1}{1+(x/K_{xz})^{n_{xz}}}$\n", "\n", "and $\\frac{dZ}{dt}$ depends on activation and degradation." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Before simulating the model, first look at the activation function\n", "\n", "Assuming $v_{max}=1$, plot the activation as a function of x (x from 0 to 2 with step of 0.01) for values of $n_{xz}$ ranging from 1 to 10 with a step of 1. Identify on the plot the location of $K_{xz}=0.5$. Also, identify the location on each line where x=1, because we will be using x=1 for activated x in the model simulation." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Simulate the model\n", "\n", "Use $v_{max}=1$, $K_{xz}=0.5$, $n_{xz}=5$, and $d_z=1$. X should be 0 until t=0.5, and 1 thereafter. Simulate from t=0 to t=20 with a time steps of 0.01.\n", "\n", "We are going to take extra precautions when we solve this system. We will first simulate the situation before X is on, then start a new simulation with X on. This way, we can guarantee that we have the solution change behaviors at exactly the right time. (The danger is that the solver is so satisfied with the flat solution before X is on, that it takes such big steps that it doesn't notice when X is turned on.)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Write code here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plot the simulation\n", "Plot X over time in an upper 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 }