{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 4.3: Statistics of random genetic circuits\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*This problem is still a draft.*\n", "\n", "In the chapter, we discussed in words an algorithm for generating random directed graphs representing interactions among genes. Starting from a set of nodes and directed edges (arrows), we enforce that each node has the same number of incoming and outgoing arrows. It is a fun (and challenging!) problem to implement such an algorithm, which is what you will do in this problem.\n", "\n", "We showed that the directed graph can be pictorially represented as a set of nodes with arrows, or as an asymmetric matrix of ones and zeros. Alternatively, and more compactly, it may be represented as an array of 2-tuples, with each 2-tuple representing an arrow connecting two numbered nodes. As an example `(8, 2)` represents an arrow going from node 8 to node 2, and `(10, 11)` represents an arrow going from node 10 to node 11.\n", "\n", "**a)** Write a function that takes as input an array of 2-tuples representing the regulatory connections of numbered genes and returns an array of 2-tuples representing a random directed graph in which each node (gene) has the same number of incoming and outgoing arrows as in that input network.\n", "\n", "**b)** Write another function that takes as input an array of 2-tuples representing a network and an array of 2-tuples representing a specific regulatory architecture and then returns the number of instances of that architecture in the input network. Here are some example architectures.\n", "\n", "- Simple regulation: `[(1, 2)]`\n", "- Mutual regulation (as in a toggle circuit): `[(1, 2), (2, 1)]`.\n", "- FFL: `[(1, 2), (1, 3), (2, 3)]`\n", "\n", "**c)** Play with your functions with sample circuits. For starters, you can use the example circuit of [Milo, et al.](https://doi.org/10.1126/science.1089167), shown below,\n", "\n", "
\n", "\n", "![Milo network](milo_network.png)\n", "\n", "
\n", "\n", "which can be represented as\n", "\n", "```python\n", "milo_example_network = [\n", " (1, 16),\n", " (2, 1),\n", " (3, 12),\n", " (3, 13),\n", " (4, 10),\n", " (4, 11),\n", " (5, 6),\n", " (5, 10),\n", " (5, 13),\n", " (6, 9),\n", " (6, 10),\n", " (7, 8),\n", " (8, 1),\n", " (8, 2),\n", " (10, 11),\n", " (13, 12),\n", " (15, 14),\n", " (16, 14),\n", " (16, 15),\n", "]\n", "```\n", "\n", "Try searching for FFLs." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }