[9b26b7]: / docs / visualizing_examples.ipynb

Download this file

408 lines (407 with data), 30.2 kB

{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "visualizing_examples.ipynb",
      "provenance": [],
      "collapsed_sections": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "-ZF4GR4A_L1c"
      },
      "source": [
        "This example was done using [Colab](https://colab.research.google.com/\n",
        "). You can read and use the Python code in other environments if you have never used Colab before. For example, we used a path to a file in gs://, but you can also just copy that file to your environment and use a local path instead.\n",
        "\n",
        "This example is for **advanced** users who want to understand the data representation. **You do NOT need to understand this in order to use DeepVariant.**"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "hbneXvSWAL8i"
      },
      "source": [
        "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
        "  <td>\n",
        "    <a target=\"_blank\" href=\"https://colab.research.google.com/github/google/deepvariant/blob/r1.6.1/docs/visualizing_examples.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
        "  </td>\n",
        "  <td>\n",
        "    <a target=\"_blank\" href=\"https://github.com/google/deepvariant/blob/r1.6.1/docs/visualizing_examples.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n",
        "  </td>\n",
        "</table>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "AV5gBKsCgF-A",
        "colab_type": "text"
      },
      "source": [
        "Note: This notebook was updated in the 1.0 release to use the new `nucleus.util.vis` module that makes visualizing DeepVariant examples easier. The old notebook can be found at https://github.com/google/deepvariant/blob/r0.10/docs/visualizing_examples.ipynb"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "AS8XlRzD_L1k"
      },
      "source": [
        "# Visualizing DeepVariant examples\n",
        "\n",
        "DeepVariant represents putative variants as pileup image tensors and classifies them using a convolutional neural network.\n",
        "\n",
        "In this notebook, we will inspect some DeepVariant examples and visualize the pileup images.\n",
        "\n",
        "We (the DeepVariant team) also wrote a blog post that explains what these pileup images are and how they are used in DeepVariant:\n",
        "https://google.github.io/deepvariant/posts/2020-02-20-looking-through-deepvariants-eyes/"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "y2Z9eNK7FT6q",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "# Nucleus is the only dependency we need to install. We need at least\n",
        "# nucleus 0.5.0, since this was the first release of Nucleus that includes the\n",
        "# visualization utilities we are using here.\n",
        "%%capture\n",
        "! pip install google-nucleus==0.5.1\n",
        "# Nucleus may show an error about failing to build a wheel, but it still\n",
        "# installs successfully."
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "8R_lXnKWFQIw",
        "colab_type": "code",
        "outputId": "61cdf33b-9711-490f-a770-e2e73de90771",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "import tensorflow as tf\n",
        "from nucleus.util import vis\n",
        "print(tf.__version__)"
      ],
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "2.2.0\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "9Ntg7xw0JSSd",
        "colab_type": "text"
      },
      "source": [
        "Download a file of DeepVariant examples from Google Cloud Storage to the local file storage of this notebook. DeepVariant examples are stored in TFRecord format."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "PYEQP7B-Ae2t",
        "colab": {}
      },
      "source": [
        "!gsutil -q cp gs://deepvariant/datalab-testdata/make_examples_datalab.tfrecord.gz /tmp/make_examples_colab.tfrecord.gz"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "nOjW_uniUAxj",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "examples_path = '/tmp/make_examples_colab.tfrecord.gz'"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "caRpnLLgIAte",
        "colab_type": "text"
      },
      "source": [
        "# Show one DeepVariant example\n",
        "We will use the nucleus.util.vis module to inspect and visualize a single DeepVariant example."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "LI11fJoHF_Qp",
        "colab_type": "code",
        "outputId": "f04807a8-d28f-4168-cf58-ed191d581e51",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 187
        }
      },
      "source": [
        "dataset = tf.data.TFRecordDataset(examples_path, compression_type=\"GZIP\")\n",
        "\n",
        "# Take a single example and show the deepvariant pileup image for it.\n",
        "for e in dataset.take(1):\n",
        "  example = tf.train.Example()\n",
        "  example.ParseFromString(e.numpy())\n",
        "\n",
        "  # For example, in chr20:19503712_T_C, T is the reference allele and C is the\n",
        "  # alternate allele that is proposed in this pileup image.\n",
        "  print(\"Locus ID with alt:\", vis.locus_id_with_alt(example))\n",
        "  print(\"Draw the channels:\")\n",
        "  vis.draw_deepvariant_pileup(example)\n",
        "\n",
        "  print(\"Truth label:\", vis.label_from_example(example))"
      ],
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Locus ID with alt: chr20:19503712_T_C\n",
            "Draw the channels:\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAABS4AAAB4CAAAAADZUjNDAAAceklEQVR4nO2dT4gjSZanvxgaMx1kIsDQQQrIUBaJyITIWsioS241VNVAq+eQW5N09yxTfckpyO4uRDGH6hnYnj3M7mVnDzNzGIqgtjcOW4elYXsbanbz0GhhqIRa8rCbCdMZEIUIqiKazhBMYpDIHMbNLjEHd9ef+KuIcClcKvsgQi53l7uZ3P2nZ+89M1s6IBAIBAJn83tXXYBAIBCYD741o/MswcH4wny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tLL40fIDEzE1aZgLl/p2QMXZ9pyudgZRdugQZQVsFY6PABwvzbydrCpvzJIPMqyK/uVEhCLWNuXwEtPkvxuEtlNpp2MrAKMj6wnS5OfJqE1Pq+EgM/UCHP15IIH+n0GnW1eAC+dJY7TNX0fp+sro7NYJGTvvQd6UYQVWIxzzjhAOlzXuV0L2Wgfgv3Dw34EAoEpM/XG+OZE409uHFk4jfb9I6s6V2Iu3ALYBnCg6JvMnlwBqnEpmYDixw/qtd1GCf7kwXrs//StdRqHBZMSvPdes1Hp2/cbPKijNKteeBQI++e81y3r28BwAh899Zl8luDKw6xTowMLFngc4QNYzE7kkHYkP9PEHETMJwqdH7PT8Z+bje9SwOYpA29AeydbmEQvN46OTX2Fd/4tgH9UROB64OQgLx0c0vEz6KldZe1Hynr+EhftOw9YFCIqG8yTew34OwX9Ck+z4w5b9v8b+sJX+hX6wqfGaDySGj9FFl8zX83+vMuzOMk3WzPXjyycxjE7Hf+5GYZ6Ngf/FpB/lb5uQ5myPm68ov9577gBjKpU4c1s7xKVwSxAWfdxq8B6wdcYEB5hnJxtn6ls2JuFlM3l9HUhTc0sCXIhZTMbsKgA6euBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIXJB/Af6JhYApVCGAAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<IPython.core.display.Image object>"
            ]
          },
          "metadata": {
            "tags": []
          }
        },
        {
          "output_type": "stream",
          "text": [
            "Truth label: 1\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6GMIhtT1JyRX",
        "colab_type": "text"
      },
      "source": [
        "# You can also save the images as .png files"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "iHWZiV82Jwwy",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "for e in dataset.take(10):\n",
        "  example = tf.train.Example()\n",
        "  example.ParseFromString(e.numpy())\n",
        "\n",
        "  # For example, in chr20:19503712_T_C, T is the reference allele and C is the\n",
        "  # alternate allele that is proposed in this pileup image.\n",
        "  filename = 'pileup_{}_truth={}.png'.format(vis.locus_id_with_alt(example), vis.label_from_example(example))\n",
        "  vis.draw_deepvariant_pileup(example, path=filename, show=False)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "eP7cgpvYefXF",
        "colab_type": "text"
      },
      "source": [
        "This creates 10 PNG images labeled with locus IDs and truth labels."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "_sxWsvFQZki9",
        "colab_type": "code",
        "outputId": "eecb38d6-dedb-49f3-ec9d-9716ae37fd0f",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 204
        }
      },
      "source": [
        "! ls"
      ],
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "'pileup_chr20:12534952_A_G_truth=1.png'\n",
            "'pileup_chr20:19503712_T_C_truth=1.png'\n",
            "'pileup_chr20:24448381_T_A_truth=2.png'\n",
            "'pileup_chr20:32765978_A_G_truth=1.png'\n",
            "'pileup_chr20:37886261_G_A_truth=1.png'\n",
            "'pileup_chr20:55019799_C_T_truth=1.png'\n",
            "'pileup_chr20:59581048_T_G_truth=0.png'\n",
            "'pileup_chr20:64063271_A_G_truth=0.png'\n",
            "'pileup_chr20:7912729_G_A_truth=1.png'\n",
            "'pileup_chr20:845848_G_C_truth=2.png'\n",
            " sample_data\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "TnYFOI03ZzIK",
        "colab_type": "text"
      },
      "source": [
        "## Flexible, modular functions\n",
        "The nucleus.util.vis library also has smaller building blocks you can use if you need more flexibility."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Sy4vkwgsaBEo",
        "colab_type": "code",
        "outputId": "f567592e-3c67-463f-bb16-c3c6e60e436e",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 982
        }
      },
      "source": [
        "for e in dataset.take(1):\n",
        "  example = tf.train.Example()\n",
        "  example.ParseFromString(e.numpy())\n",
        "  print(\"Extracting the variant:\")\n",
        "  print(vis.variant_from_example(example))\n",
        "\n",
        "  # Get the pileup image as an array.\n",
        "  arr = vis.get_image_array_from_example(example)\n",
        "  print(\"\\nShape of the pileup numpy array:\", arr.shape)\n",
        "  # Split that array into channels.\n",
        "  channels = vis.split_3d_array_into_channels(arr)\n",
        "  print(\"\\nNumber of channels:\", len(channels))\n",
        "\n",
        "  # Visualize the numpy array as an image.\n",
        "  print(\"\\nShowing just the first channel:\")\n",
        "  vis.array_to_png(channels[0])"
      ],
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Extracting the variant:\n",
            "reference_bases: \"T\"\n",
            "alternate_bases: \"C\"\n",
            "calls {\n",
            "  info {\n",
            "    key: \"AD\"\n",
            "    value {\n",
            "      values {\n",
            "        number_value: 31.0\n",
            "      }\n",
            "      values {\n",
            "        number_value: 24.0\n",
            "      }\n",
            "    }\n",
            "  }\n",
            "  info {\n",
            "    key: \"DP\"\n",
            "    value {\n",
            "      values {\n",
            "        number_value: 55.0\n",
            "      }\n",
            "    }\n",
            "  }\n",
            "  info {\n",
            "    key: \"VAF\"\n",
            "    value {\n",
            "      values {\n",
            "        number_value: 0.43636363636363634\n",
            "      }\n",
            "    }\n",
            "  }\n",
            "  genotype: -1\n",
            "  genotype: -1\n",
            "  call_set_name: \"training\"\n",
            "}\n",
            "end: 19503713\n",
            "reference_name: \"chr20\"\n",
            "start: 19503712\n",
            "\n",
            "\n",
            "Shape of the pileup numpy array: (100, 221, 6)\n",
            "\n",
            "Number of channels: 6\n",
            "\n",
            "Showing just the first channel:\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAboAAADICAAAAAC7AXsnAAAV90lEQVR4nO2de2xb133Hv+d1L3mvJOtpO7ETJ438UmLlMadpljZpu3XYUKDYurbo1rUDgg1Yhg0olm3BgKVN0DSPAhsKpECLDvAfHdIV6YpiBbpubRrPsV0vSxzXsi1ZsmTLlm09SMqkRN7L+zpnf5B2bEeiKIkieZXz+UfifZxzyC8Pz7nn9zjE+uiLewYGhgaO3fPSvTj6ZfadW/e9Nkz77t176dsbX9783eMmB2XpwTSjkFF3X7uz6wvbkBucwaZ+DKQYBcDNwVeORx9/afeR8AEykDFn3sbeLfxk6djbl7Bl79BTr+G3vt4PADj+1Mn7+3f39UXvqP52zA+feLvnT+9EYfT1fbd+R/559HL/0C9emX2QvqP6O5x7Hse+AZMDAChLD04WP/r1/msl0OH9r0zd/bHP34aJH/xyoP+lezG2jz/Br90hw8176bETg+i7d+/0vqkHusrlwet/XH439Yg4dmKQ9m/CzOAMOns//vjlv4i++Rs4+mX6cv/QL16Zuvt3Hp/86/Rf4VvdL3d/Sz7B9520rgygv8Pp+1L3W3hw6l/oE7xcGvYNmAabfGvPNzd+9x3c/zj53n8P3P/Nzm/5j98F4PhTA/2f+ELnW1F/O3CtrYXRA+XWA9kB9mD6e8ex5wvbAGQHxMMnv5x+YsvbxwfZA+GR3S/di7F9ePwuAOdfOW1lB9OMAhSamKKliy1autiipYstWrrYoqWLLbzRDVgcQiqdZGyB06J0jJa/kJRxyigBZZwTQillBhiloMyIGOOcUUIoAyUEhDJDECIAQYiAYIRQZghKOAgVBiNCMEopAaWUCUPAEIwKUS4NjFLKKKHCYBTMIOX/mQAAQQllwhDUAADBKKECMEp1CAAwBDMEo7j6SkBQUm5f6WrBIMp3U0oIIc0s3cLilFHEMG4+q4AkUwAIFwAASUSCGpyCG0mTES6EacPkApFpR4ZICINTygU4JaDMT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Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Gs2a8f9mMQ8Sge+w6QAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<IPython.core.display.Image object>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    }
  ]
}