{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "fastISM_DeepSEA.ipynb", "provenance": [], "authorship_tag": "ABX9TyOFX3n2Ysej805Py+U8k1Pu", "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "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.7.6" }, "accelerator": "GPU" }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/kundajelab/fastISM/blob/master/notebooks/colab/DeepSEA.ipynb)" ] }, { "cell_type": "markdown", "metadata": { "id": "f83G50QGO-RD", "colab_type": "text" }, "source": [ "# fastISM on DeepSEA Beluga\n", "\n", "fastISM is a faster way to perform *in-silico* saturation mutagenesis. This tutorial uses the DeepSEA Beluga model ([Zhou et al 2018](https://www.nature.com/articles/s41588-018-0160-6)), which predicts 2002 chromatin features for a 2000 bp input sequence. This tutorial covers the following:\n", "\n", "- Installations and downloading required files for tutorial\n", "- Benchmarking fastISM on the Beluga model against a standard ISM implementation\n", "- Running fastISM on custom input sequences\n", "- Visualizing fastISM output across all tasks (outputs)\n", "- Selecting a task, visualizing the fastISM scores, and zooming in to visualize the underlying sequence features. " ] }, { "cell_type": "markdown", "metadata": { "id": "y1BD88kTSXZi", "colab_type": "text" }, "source": [ "## Installations and Data\n", "\n", "We use `pip` to install `fastISM` and `vizsequence` (to visualize sequence importance scores). In addition we download a trained Beluga model and a tsv with all the model's outputs." ] }, { "cell_type": "code", "metadata": { "id": "2FWzcBnOOrRt", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 836 }, "outputId": "6da12b92-ec07-4e6b-aa90-c171fa893bab" }, "source": [ "# install fastISM\n", "!pip install fastism" ], "execution_count": 4, "outputs": [ { "output_type": "stream", "text": [ "Collecting fastism\n", " Downloading https://files.pythonhosted.org/packages/4f/93/26f83f7197d92b0c502d7f7af32cbd5e0d0f0b52a4bfb51b29162e860fc8/fastism-0.4.0-py3-none-any.whl\n", "Requirement already satisfied: tensorflow<3.0.0,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from fastism) (2.3.0)\n", "Collecting pydot<2.0.0,>=1.4.1\n", " Downloading https://files.pythonhosted.org/packages/33/d1/b1479a770f66d962f545c2101630ce1d5592d90cb4f083d38862e93d16d2/pydot-1.4.1-py2.py3-none-any.whl\n", "Requirement already satisfied: numpy<1.19.0,>=1.16.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.18.5)\n", "Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.12.1)\n", "Requirement already satisfied: scipy==1.4.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.4.1)\n", "Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.32.0)\n", "Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.15.0)\n", "Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.1.2)\n", "Requirement already satisfied: astunparse==1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.6.3)\n", "Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (0.10.0)\n", "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (0.35.1)\n", "Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (3.3.0)\n", "Requirement already satisfied: google-pasta>=0.1.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (0.2.0)\n", "Requirement already satisfied: gast==0.3.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (0.3.3)\n", "Requirement already satisfied: protobuf>=3.9.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (3.12.4)\n", "Requirement already satisfied: tensorboard<3,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (2.3.0)\n", "Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (2.3.0)\n", "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (1.1.0)\n", "Requirement already satisfied: h5py<2.11.0,>=2.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<3.0.0,>=2.3.0->fastism) (2.10.0)\n", "Requirement already satisfied: pyparsing>=2.1.4 in /usr/local/lib/python3.6/dist-packages (from pydot<2.0.0,>=1.4.1->fastism) (2.4.7)\n", "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.9.2->tensorflow<3.0.0,>=2.3.0->fastism) (50.3.0)\n", "Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.7.0)\n", "Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (0.4.1)\n", "Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.0.1)\n", "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (3.2.2)\n", "Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.17.2)\n", "Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (2.23.0)\n", "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.3.0)\n", "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.7.0)\n", "Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (4.1.1)\n", "Requirement already satisfied: rsa<5,>=3.1.4; python_version >= \"3\" in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (4.6)\n", "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (0.2.8)\n", "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (3.0.4)\n", "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (2.10)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (1.24.3)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (2020.6.20)\n", "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (3.1.0)\n", "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (3.1.0)\n", "Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.6/dist-packages (from rsa<5,>=3.1.4; python_version >= \"3\"->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow<3.0.0,>=2.3.0->fastism) (0.4.8)\n", "Installing collected packages: pydot, fastism\n", " Found existing installation: pydot 1.3.0\n", " Uninstalling pydot-1.3.0:\n", " Successfully uninstalled pydot-1.3.0\n", "Successfully installed fastism-0.4.0 pydot-1.4.1\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "qAJW02I1q5J2", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 289 }, "outputId": "4a48c291-11e0-4304-994a-789d4f2f248d" }, "source": [ "#for visualizing the per-position importance\n", "!pip install vizsequence " ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "Collecting vizsequence\n", " Downloading https://files.pythonhosted.org/packages/a6/10/b3b210eba27de588fba3c261b80317413e18ac3e371df9578b3cdc61096c/vizsequence-0.1.1.0.tar.gz\n", "Requirement already satisfied: numpy>=1.9 in /usr/local/lib/python3.6/dist-packages (from vizsequence) (1.18.5)\n", "Requirement already satisfied: matplotlib>=2.2.2 in /usr/local/lib/python3.6/dist-packages (from vizsequence) (3.2.2)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2.2->vizsequence) (2.4.7)\n", "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2.2->vizsequence) (0.10.0)\n", "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2.2->vizsequence) (2.8.1)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2.2->vizsequence) (1.2.0)\n", "Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from cycler>=0.10->matplotlib>=2.2.2->vizsequence) (1.15.0)\n", "Building wheels for collected packages: vizsequence\n", " Building wheel for vizsequence (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for vizsequence: filename=vizsequence-0.1.1.0-cp36-none-any.whl size=3269 sha256=f5c7dd7708c4186bbdadb6e2e428969bec77fb97b43315a0eb60a4ddf1f6c62f\n", " Stored in directory: /root/.cache/pip/wheels/08/eb/de/6b398b439ba39c278e5c341bdeed57d66280910e096496eaef\n", "Successfully built vizsequence\n", "Installing collected packages: vizsequence\n", "Successfully installed vizsequence-0.1.1.0\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "VoWpD8aJP4Xd", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "outputId": "8b1b7ef1-e90a-4af4-ab2b-1da56320ebfd" }, "source": [ "# download trained model\n", "! wget http://mitra.stanford.edu/kundaje/surag/fastISM/deepseabeluga_keras_nopermutelayer.h5 -O deepseabeluga.h5" ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "--2020-09-20 06:25:21-- http://mitra.stanford.edu/kundaje/surag/fastISM/deepseabeluga_keras_nopermutelayer.h5\n", "Resolving mitra.stanford.edu (mitra.stanford.edu)... 171.67.96.243\n", "Connecting to mitra.stanford.edu (mitra.stanford.edu)|171.67.96.243|:80... connected.\n", "HTTP request sent, awaiting response... 200 OK\n", "Length: 598186116 (570M)\n", "Saving to: ‘deepseabeluga.h5’\n", "\n", "deepseabeluga.h5 100%[===================>] 570.47M 48.5MB/s in 12s \n", "\n", "2020-09-20 06:25:33 (46.9 MB/s) - ‘deepseabeluga.h5’ saved [598186116/598186116]\n", "\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "O4dFesJoL91T", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "outputId": "df7c95cc-ad47-47af-86c7-43964d86c0c4" }, "source": [ "# download output annotation\n", "! wget https://raw.githubusercontent.com/FunctionLab/ExPecto/20b99d1278678/resources/deepsea_beluga_2002_features.tsv -O outputs.tsv" ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "--2020-09-20 06:25:35-- https://raw.githubusercontent.com/FunctionLab/ExPecto/20b99d1278678/resources/deepsea_beluga_2002_features.tsv\n", "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...\n", "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.\n", "HTTP request sent, awaiting response... 200 OK\n", "Length: 203001 (198K) [text/plain]\n", "Saving to: ‘outputs.tsv’\n", "\n", "\routputs.tsv 0%[ ] 0 --.-KB/s \routputs.tsv 100%[===================>] 198.24K --.-KB/s in 0.04s \n", "\n", "2020-09-20 06:25:36 (5.37 MB/s) - ‘outputs.tsv’ saved [203001/203001]\n", "\n" ], "name": "stdout" } ] }, { "cell_type": "markdown", "metadata": { "id": "dVVgTj4USaBr", "colab_type": "text" }, "source": [ "## Init" ] }, { "cell_type": "code", "metadata": { "id": "mbOnuS4zPEZh", "colab_type": "code", "colab": {} }, "source": [ "import fastism\n", "import tensorflow as tf\n", "import numpy as np\n", "from matplotlib import pyplot as plt\n", "import pandas as pd\n", "import seaborn as sns\n", "import vizsequence\n", "\n", "# for some seaborn warnings\n", "import warnings; warnings.simplefilter('ignore')\n", "\n", "import time" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "yFNqpo8aPPmx", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 37 }, "outputId": "563ad496-3bdb-40fe-8832-175a933cf733" }, "source": [ "tf.__version__" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" }, "text/plain": [ "'2.3.0'" ] }, "metadata": { "tags": [] }, "execution_count": 6 } ] }, { "cell_type": "code", "metadata": { "id": "vcl-O0PsYa5A", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "outputId": "f5d9e7c3-20cc-44e1-969d-509b72077af1" }, "source": [ "! pip freeze | grep fastism" ], "execution_count": 5, "outputs": [ { "output_type": "stream", "text": [ "fastism==0.4.0\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "NTbdXQUhPRWP", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 357 }, "outputId": "e9be3580-7d22-44a9-f0f3-08eb05c98622" }, "source": [ "!nvidia-smi" ], "execution_count": 1, "outputs": [ { "output_type": "stream", "text": [ "Wed Sep 23 09:42:18 2020 \n", "+-----------------------------------------------------------------------------+\n", "| NVIDIA-SMI 450.66 Driver Version: 418.67 CUDA Version: 10.1 |\n", "|-------------------------------+----------------------+----------------------+\n", "| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n", "| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n", "| | | MIG M. |\n", "|===============================+======================+======================|\n", "| 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |\n", "| N/A 34C P0 25W / 250W | 0MiB / 16280MiB | 0% Default |\n", "| | | ERR! |\n", "+-------------------------------+----------------------+----------------------+\n", " \n", "+-----------------------------------------------------------------------------+\n", "| Processes: |\n", "| GPU GI CI PID Type Process name GPU Memory |\n", "| ID ID Usage |\n", "|=============================================================================|\n", "| No running processes found |\n", "+-----------------------------------------------------------------------------+\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "PDaqlJw3PnWZ", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "outputId": "75aaafa5-9b86-43ec-c442-58a911fda849" }, "source": [ "print(\"Num GPUs Available: \", len(tf.config.experimental.list_physical_devices('GPU')))" ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "Num GPUs Available: 1\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "4gi_BpXePz5w", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 37 }, "outputId": "2e1e8596-0347-4ecf-b1c2-e0e1386eb688" }, "source": [ "device = 'GPU:0' if tf.config.experimental.list_physical_devices('GPU') else '/device:CPU:0'\n", "device" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" }, "text/plain": [ "'GPU:0'" ] }, "metadata": { "tags": [] }, "execution_count": 9 } ] }, { "cell_type": "markdown", "metadata": { "id": "C26Cz52mQOPM", "colab_type": "text" }, "source": [ "## Load Model" ] }, { "cell_type": "code", "metadata": { "id": "Wj0GaQISQO-G", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "outputId": "2e092052-e38b-477f-fdfd-a55c0cf0510b" }, "source": [ "model = tf.keras.models.load_model(\"deepseabeluga.h5\")" ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "WARNING:tensorflow:No training configuration found in the save file, so the model was *not* compiled. Compile it manually.\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "BdVGGfQQQWf6", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 867 }, "outputId": "672ac98c-5090-49b7-b5e2-17981d4db9ed" }, "source": [ "model.summary()" ], "execution_count": null, "outputs": [ { "output_type": "stream", "text": [ "Model: \"sequential_1\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "conv1d_1 (Conv1D) (None, 1993, 320) 10560 \n", "_________________________________________________________________\n", "activation_1 (Activation) (None, 1993, 320) 0 \n", "_________________________________________________________________\n", "conv1d_2 (Conv1D) (None, 1986, 320) 819520 \n", "_________________________________________________________________\n", "activation_2 (Activation) (None, 1986, 320) 0 \n", "_________________________________________________________________\n", "dropout_1 (Dropout) (None, 1986, 320) 0 \n", "_________________________________________________________________\n", "max_pooling1d_1 (MaxPooling1 (None, 496, 320) 0 \n", "_________________________________________________________________\n", "conv1d_3 (Conv1D) (None, 489, 480) 1229280 \n", "_________________________________________________________________\n", "activation_3 (Activation) (None, 489, 480) 0 \n", "_________________________________________________________________\n", "conv1d_4 (Conv1D) (None, 482, 480) 1843680 \n", "_________________________________________________________________\n", "activation_4 (Activation) (None, 482, 480) 0 \n", "_________________________________________________________________\n", "dropout_2 (Dropout) (None, 482, 480) 0 \n", "_________________________________________________________________\n", "max_pooling1d_2 (MaxPooling1 (None, 120, 480) 0 \n", "_________________________________________________________________\n", "conv1d_5 (Conv1D) (None, 113, 640) 2458240 \n", "_________________________________________________________________\n", "activation_5 (Activation) (None, 113, 640) 0 \n", "_________________________________________________________________\n", "conv1d_6 (Conv1D) (None, 106, 640) 3277440 \n", "_________________________________________________________________\n", "activation_6 (Activation) (None, 106, 640) 0 \n", "_________________________________________________________________\n", "flatten_1 (Flatten) (None, 67840) 0 \n", "_________________________________________________________________\n", "altereddense (Dense) (None, 2003) 135885523 \n", "_________________________________________________________________\n", "activation_7 (Activation) (None, 2003) 0 \n", "_________________________________________________________________\n", "dense_1 (Dense) (None, 2002) 4012008 \n", "_________________________________________________________________\n", "activation_8 (Activation) (None, 2002) 0 \n", "=================================================================\n", "Total params: 149,536,251\n", "Trainable params: 149,536,251\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "X0OBC54BQW3Q", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "outputId": "27563da4-00dd-4997-899e-1180f0e83f39" }, "source": [ "model.input.shape" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "TensorShape([None, 2000, 4])" ] }, "metadata": { "tags": [] }, "execution_count": 19 } ] }, { "cell_type": "code", "metadata": { "id": "cJo1yREYQmcs", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 419 }, "outputId": "bfc2398d-4596-4d5f-a4c2-b1f366f83dcd" }, "source": [ "# a look at the 2002 model outputs\n", "outputs = pd.read_csv(\"./outputs.tsv\", sep=\"\\t\")\n", "outputs" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", " | Unnamed: 0 | \n", "Cell type | \n", "Assay | \n", "Treatment | \n", "Assay type | \n", "Source | \n", "Unnamed: 6 | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "1 | \n", "8988T | \n", "DNase | \n", "NaN | \n", "DNase | \n", "ENCODE | \n", "./wgEncodeAwgDnaseUniform/wgEncodeAwgDnaseDuke... | \n", "
1 | \n", "2 | \n", "AoSMC | \n", "DNase | \n", "NaN | \n", "DNase | \n", "ENCODE | \n", "./wgEncodeAwgDnaseUniform/wgEncodeAwgDnaseDuke... | \n", "
2 | \n", "3 | \n", "Chorion | \n", "DNase | \n", "NaN | \n", "DNase | \n", "ENCODE | \n", "./wgEncodeAwgDnaseUniform/wgEncodeAwgDnaseDuke... | \n", "
3 | \n", "4 | \n", "CLL | \n", "DNase | \n", "NaN | \n", "DNase | \n", "ENCODE | \n", "./wgEncodeAwgDnaseUniform/wgEncodeAwgDnaseDuke... | \n", "
4 | \n", "5 | \n", "Fibrobl | \n", "DNase | \n", "NaN | \n", "DNase | \n", "ENCODE | \n", "./wgEncodeAwgDnaseUniform/wgEncodeAwgDnaseDuke... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
1997 | \n", "1998 | \n", "Osteoblasts | \n", "H3K4me2 | \n", "NaN | \n", "Histone | \n", "Roadmap Epigenomics | \n", "E129-H3K4me2.narrowPeak.gz | \n", "
1998 | \n", "1999 | \n", "Osteoblasts | \n", "H3K4me3 | \n", "NaN | \n", "Histone | \n", "Roadmap Epigenomics | \n", "E129-H3K4me3.narrowPeak.gz | \n", "
1999 | \n", "2000 | \n", "Osteoblasts | \n", "H3K79me2 | \n", "NaN | \n", "Histone | \n", "Roadmap Epigenomics | \n", "E129-H3K79me2.narrowPeak.gz | \n", "
2000 | \n", "2001 | \n", "Osteoblasts | \n", "H3K9me3 | \n", "NaN | \n", "Histone | \n", "Roadmap Epigenomics | \n", "E129-H3K9me3.narrowPeak.gz | \n", "
2001 | \n", "2002 | \n", "Osteoblasts | \n", "H4K20me1 | \n", "NaN | \n", "Histone | \n", "Roadmap Epigenomics | \n", "E129-H4K20me1.narrowPeak.gz | \n", "
2002 rows × 7 columns
\n", "