{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"
"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "BYY-Eb9dKUIi",
"outputId": "41a3fc80-917f-4fa9-e98b-d0d56f9aa7f4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting jbrowse-jupyter\n",
" Downloading jbrowse_jupyter-1.2.1-py3-none-any.whl (22 kB)\n",
"Collecting pytest>=6.2.5\n",
" Downloading pytest-7.0.1-py3-none-any.whl (296 kB)\n",
"\u001b[K |████████████████████████████████| 296 kB 10.8 MB/s \n",
"\u001b[?25hCollecting dash==2.0.0\n",
" Downloading dash-2.0.0-py3-none-any.whl (7.3 MB)\n",
"\u001b[K |████████████████████████████████| 7.3 MB 29.4 MB/s \n",
"\u001b[?25hCollecting flake8>=4.0.1\n",
" Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB)\n",
"\u001b[K |████████████████████████████████| 64 kB 1.6 MB/s \n",
"\u001b[?25hCollecting dash-jbrowse>=1.0.1\n",
" Downloading dash_jbrowse-1.0.1-py3-none-any.whl (1.1 MB)\n",
"\u001b[K |████████████████████████████████| 1.1 MB 46.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: pandas>=1.1.5 in /usr/local/lib/python3.7/dist-packages (from jbrowse-jupyter) (1.3.5)\n",
"Collecting jupyter-dash>=0.4.0\n",
" Downloading jupyter_dash-0.4.1-py3-none-any.whl (17 kB)\n",
"Requirement already satisfied: Flask>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from dash==2.0.0->jbrowse-jupyter) (1.1.4)\n",
"Collecting dash-core-components==2.0.0\n",
" Downloading dash_core_components-2.0.0.tar.gz (3.4 kB)\n",
"Collecting dash-table==5.0.0\n",
" Downloading dash_table-5.0.0.tar.gz (3.4 kB)\n",
"Collecting dash-html-components==2.0.0\n",
" Downloading dash_html_components-2.0.0.tar.gz (3.8 kB)\n",
"Requirement already satisfied: plotly>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from dash==2.0.0->jbrowse-jupyter) (5.5.0)\n",
"Collecting flask-compress\n",
" Downloading Flask_Compress-1.10.1-py3-none-any.whl (7.9 kB)\n",
"Collecting importlib-metadata<4.3\n",
" Downloading importlib_metadata-4.2.0-py3-none-any.whl (16 kB)\n",
"Collecting mccabe<0.7.0,>=0.6.0\n",
" Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)\n",
"Collecting pyflakes<2.5.0,>=2.4.0\n",
" Downloading pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)\n",
"\u001b[K |████████████████████████████████| 69 kB 8.2 MB/s \n",
"\u001b[?25hCollecting pycodestyle<2.9.0,>=2.8.0\n",
" Downloading pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)\n",
"\u001b[K |████████████████████████████████| 42 kB 923 kB/s \n",
"\u001b[?25hRequirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.7/dist-packages (from Flask>=1.0.4->dash==2.0.0->jbrowse-jupyter) (2.11.3)\n",
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.7/dist-packages (from Flask>=1.0.4->dash==2.0.0->jbrowse-jupyter) (1.1.0)\n",
"Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.7/dist-packages (from Flask>=1.0.4->dash==2.0.0->jbrowse-jupyter) (7.1.2)\n",
"Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.7/dist-packages (from Flask>=1.0.4->dash==2.0.0->jbrowse-jupyter) (1.0.1)\n",
"Requirement already satisfied: typing-extensions>=3.6.4 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata<4.3->flake8>=4.0.1->jbrowse-jupyter) (3.10.0.2)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata<4.3->flake8>=4.0.1->jbrowse-jupyter) (3.7.0)\n",
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2<3.0,>=2.10.1->Flask>=1.0.4->dash==2.0.0->jbrowse-jupyter) (2.0.1)\n",
"Requirement already satisfied: ipykernel in /usr/local/lib/python3.7/dist-packages (from jupyter-dash>=0.4.0->jbrowse-jupyter) (4.10.1)\n",
"Requirement already satisfied: ipython in /usr/local/lib/python3.7/dist-packages (from jupyter-dash>=0.4.0->jbrowse-jupyter) (5.5.0)\n",
"Collecting ansi2html\n",
" Downloading ansi2html-1.7.0-py3-none-any.whl (15 kB)\n",
"Collecting retrying\n",
" Downloading retrying-1.3.3.tar.gz (10 kB)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from jupyter-dash>=0.4.0->jbrowse-jupyter) (2.23.0)\n",
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.1.5->jbrowse-jupyter) (2018.9)\n",
"Requirement already satisfied: numpy>=1.17.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.1.5->jbrowse-jupyter) (1.21.5)\n",
"Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.1.5->jbrowse-jupyter) (2.8.2)\n",
"Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.7/dist-packages (from plotly>=5.0.0->dash==2.0.0->jbrowse-jupyter) (8.0.1)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from plotly>=5.0.0->dash==2.0.0->jbrowse-jupyter) (1.15.0)\n",
"Requirement already satisfied: tomli>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from pytest>=6.2.5->jbrowse-jupyter) (2.0.1)\n",
"Requirement already satisfied: attrs>=19.2.0 in /usr/local/lib/python3.7/dist-packages (from pytest>=6.2.5->jbrowse-jupyter) (21.4.0)\n",
"Requirement already satisfied: py>=1.8.2 in /usr/local/lib/python3.7/dist-packages (from pytest>=6.2.5->jbrowse-jupyter) (1.11.0)\n",
"Collecting pluggy<2.0,>=0.12\n",
" Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)\n",
"Requirement already satisfied: iniconfig in /usr/local/lib/python3.7/dist-packages (from pytest>=6.2.5->jbrowse-jupyter) (1.1.1)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from pytest>=6.2.5->jbrowse-jupyter) (21.3)\n",
"Collecting brotli\n",
" Downloading Brotli-1.0.9-cp37-cp37m-manylinux1_x86_64.whl (357 kB)\n",
"\u001b[K |████████████████████████████████| 357 kB 63.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: traitlets>=4.1.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel->jupyter-dash>=0.4.0->jbrowse-jupyter) (5.1.1)\n",
"Requirement already satisfied: tornado>=4.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel->jupyter-dash>=0.4.0->jbrowse-jupyter) (5.1.1)\n",
"Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel->jupyter-dash>=0.4.0->jbrowse-jupyter) (5.3.5)\n",
"Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (57.4.0)\n",
"Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (0.8.1)\n",
"Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (4.8.0)\n",
"Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (0.7.5)\n",
"Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (1.0.18)\n",
"Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (4.4.2)\n",
"Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (2.6.1)\n",
"Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (0.2.5)\n",
"Requirement already satisfied: jupyter-core>=4.6.0 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel->jupyter-dash>=0.4.0->jbrowse-jupyter) (4.9.1)\n",
"Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel->jupyter-dash>=0.4.0->jbrowse-jupyter) (22.3.0)\n",
"Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->pytest>=6.2.5->jbrowse-jupyter) (3.0.7)\n",
"Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.7/dist-packages (from pexpect->ipython->jupyter-dash>=0.4.0->jbrowse-jupyter) (0.7.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->jupyter-dash>=0.4.0->jbrowse-jupyter) (2021.10.8)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->jupyter-dash>=0.4.0->jbrowse-jupyter) (1.24.3)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->jupyter-dash>=0.4.0->jbrowse-jupyter) (3.0.4)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->jupyter-dash>=0.4.0->jbrowse-jupyter) (2.10)\n",
"Building wheels for collected packages: dash-core-components, dash-html-components, dash-table, retrying\n",
" Building wheel for dash-core-components (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for dash-core-components: filename=dash_core_components-2.0.0-py3-none-any.whl size=3822 sha256=8265edfa47273dc954f7f3c20f0d52ba56c0592fe07bcc6f74f9e006a8a8d155\n",
" Stored in directory: /root/.cache/pip/wheels/00/f9/c7/1a6437d794ed753ea9bc9079e761d4fc803a1f1f5d3697b9ec\n",
" Building wheel for dash-html-components (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for dash-html-components: filename=dash_html_components-2.0.0-py3-none-any.whl size=4090 sha256=0d1db5cfa4ba42752f156d6f1a562fa75e3fb6a50e8bb90c40dce635cba6790b\n",
" Stored in directory: /root/.cache/pip/wheels/ec/6b/81/05aceabd8b27f724e2c96784016287cc1bfbc349ebfda451de\n",
" Building wheel for dash-table (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for dash-table: filename=dash_table-5.0.0-py3-none-any.whl size=3912 sha256=c6c041525c7205a215a7b4f551fbd91f80e519c205d3a56bbfaac90315e97c82\n",
" Stored in directory: /root/.cache/pip/wheels/85/5d/4e/7c276b57992951dbe770bf5caad6448d0539c510663aefd2e2\n",
" Building wheel for retrying (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for retrying: filename=retrying-1.3.3-py3-none-any.whl size=11447 sha256=72c0f939f5572af84c8f05ce4d9c5bbb5e18b0cedfd314deb74ac303eec458b7\n",
" Stored in directory: /root/.cache/pip/wheels/f9/8d/8d/f6af3f7f9eea3553bc2fe6d53e4b287dad18b06a861ac56ddf\n",
"Successfully built dash-core-components dash-html-components dash-table retrying\n",
"Installing collected packages: brotli, importlib-metadata, flask-compress, dash-table, dash-html-components, dash-core-components, retrying, pyflakes, pycodestyle, pluggy, mccabe, dash, ansi2html, pytest, jupyter-dash, flake8, dash-jbrowse, jbrowse-jupyter\n",
" Attempting uninstall: importlib-metadata\n",
" Found existing installation: importlib-metadata 4.11.0\n",
" Uninstalling importlib-metadata-4.11.0:\n",
" Successfully uninstalled importlib-metadata-4.11.0\n",
" Attempting uninstall: pluggy\n",
" Found existing installation: pluggy 0.7.1\n",
" Uninstalling pluggy-0.7.1:\n",
" Successfully uninstalled pluggy-0.7.1\n",
" Attempting uninstall: pytest\n",
" Found existing installation: pytest 3.6.4\n",
" Uninstalling pytest-3.6.4:\n",
" Successfully uninstalled pytest-3.6.4\n",
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"markdown 3.3.6 requires importlib-metadata>=4.4; python_version < \"3.10\", but you have importlib-metadata 4.2.0 which is incompatible.\n",
"datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.\u001b[0m\n",
"Successfully installed ansi2html-1.7.0 brotli-1.0.9 dash-2.0.0 dash-core-components-2.0.0 dash-html-components-2.0.0 dash-jbrowse-1.0.1 dash-table-5.0.0 flake8-4.0.1 flask-compress-1.10.1 importlib-metadata-4.2.0 jbrowse-jupyter-1.2.1 jupyter-dash-0.4.1 mccabe-0.6.1 pluggy-1.0.0 pycodestyle-2.8.0 pyflakes-2.4.0 pytest-7.0.1 retrying-1.3.3\n"
]
}
],
"source": [
"!pip install jbrowse-jupyter"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "HetA2JAhKuf5"
},
"outputs": [],
"source": [
"from dash import html, Dash, dcc\n",
"from dash.dependencies import Input, Output\n",
"from jbrowse_jupyter import create, create_component"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "QdWiYfiIKyHv"
},
"outputs": [],
"source": [
" app = Dash(__name__)\n",
" server = app.server"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "XES1Tx0KK144"
},
"outputs": [],
"source": [
"# locations of interest and name\n",
"# sources: \n",
"# https://jbrowse.org/demos/cancer-demo-2020/#embed\n",
"# https://genome.cshlp.org/content/early/2018/06/28/gr.231100.117.abstract\n",
"locations = [\n",
" {\"value\": \"NC_000014.8:50234871..50253103\", \"label\": \"KLHDC2\"\n",
" },\n",
" {\"value\": \"NC_000017.10:76670129..76778424\", \"label\": \"CYTH1\"},\n",
" {\"value\": \"NC_000020.10:34213953..34252822\", \"label\": \"CPNE1\"},\n",
" {\"value\": \"NC_000017.10:38060848..38074903\", \"label\": \"GSDMB\"},\n",
" {\"value\": \"8:116962736..117337297\", \"label\": \"LINC00536\"},\n",
" {\"value\": \"8:121547996..121824286\", \"label\": \"SNTB1\"},\n",
" {\"value\": \"8:117654369..117768062\", \"label\": \"EIF3H\"},\n",
" {\"value\": \"NC_000020.10:47240790..47444536\", \"label\": \"PREX1\"},\n",
" {\"value\": \"8:125500735..125551329\", \"label\": \"TATDN1\"},\n",
" {\"value\": \"8:128,806,779..129,113,499\", \"label\": \"PVT1\"}\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "eMuOH8KBMSxJ"
},
"outputs": [],
"source": [
"# track data, track name, track id\n",
"tracks = [\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.splitters.bam\", \"SKBR3 pacbio (NGMLR) splitters only\",\"ngmlr_splitters\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.splitters.cram\", \"SKBR3 pacbio (NGMLR) splitters only (CRAM)\",\"ngmlr_splitters_cram\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.down.bam\", \"SKBR3 pacbio (NGMLR) 0.3 downsample\",\"ngmlr_downsample\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.down.cram\", \"SKBR3 pacbio (NGMLR) 0.3 downsample (CRAM)\",\"reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.down\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.regions.bw\", \"SKBR3 pacbio coverage (NGMLR)\",\"ngmlr_cov\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.sniffles1kb_auto_l8_s5_noalt.vcf.gz\", \"SKBR3 pacbio (sniffles VCF)\",\"breast_cancer_sniffles_hg19\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/SKBR3_550bp_pcrFREE_S1_L001_AND_L002_R1_001.101bp.bwamem.ill.mapped.sort.bam\", \"SKBR3 illumina bwamem (BAM)\",\"SKBR3 illumina bwamem (BAM)-id\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/skbr3/SKBR3_550bp_pcrFREE_S1_L001_AND_L002_R1_001.101bp.bwamem.ill.mapped.sort.cram\", \"SKBR3 illumina bwamem (CRAM)\",\"SKBR3 illumina bwamem (CRAM)-id\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam\", \"SKBR3 pacbio (NGMLR)\",\"ngmlr\"),\n",
" (\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/GRCh37_latest_genomic.sort.gff.gz\", \"NCBI RefSeq (GFF3Tabix)\",\"ncbi_gff_hg19\")\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "qxwK1FBHPpDr"
},
"outputs": [],
"source": [
"conf_lgv = create(\"LGV\", genome=\"hg19\")\n",
"conf_cgv = create(\"CGV\", genome=\"hg19\")\n",
"for track in tracks:\n",
" data = track[0]\n",
" track_name = track[1]\n",
" track_id = track[2]\n",
" conf_lgv.add_track(data, name=track_name, track_id=track_id)\n",
"# adding a text search adapter for LGV \n",
"ix = \"https://jbrowse.org/genomes/hg19/trix/hg19.ix\"\n",
"ixx = \"https://jbrowse.org/genomes/hg19/trix/hg19.ixx\"\n",
"meta = \"https://jbrowse.org/genomes/hg19/trix/meta.json\"\n",
"conf_lgv.add_text_search_adapter(ix, ixx, meta)\n",
"conf_lgv.set_default_session(['ncbi_gff_hg19'], False)\n",
"conf_cgv.add_track(\"https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.sniffles1kb_auto_l8_s5_noalt.vcf.gz\",name=\"SKBR3 pacbio (sniffles VCF)\", track_id=\"breast_cancer_sniffles_hg19\")\n",
"conf_cgv.set_default_session([\"breast_cancer_sniffles_hg19\"], False)\n",
"component_test = create_component(conf_cgv.get_config(), id=\"cgv-test\", dash_comp=\"CGV\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "hyOYH1UjLdiS"
},
"outputs": [],
"source": [
"# Return the component with a specific location.\n",
"@app.callback(\n",
" Output(\"LGV-component\", \"children\"),\n",
" Input(\"location-to-view\", \"value\")\n",
")\n",
"def return_jbrowse(location):\n",
" conf_lgv.set_location(location)\n",
" return create_component(conf_lgv.get_config(), id=\"lgv-test\", dash_comp=\"LGV\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "gTz7jhH7P8z8"
},
"outputs": [],
"source": [
"app.layout = html.Div(\n",
" [\n",
" html.P(\" SKBR3 Genes involved in fusions \"),\n",
" dcc.Dropdown(\n",
" id=\"location-to-view\", options=locations, value=\"1:229354402..229354403\", placeholder=\"Select a gene to view.\"\n",
" ),\n",
" html.Hr(),\n",
" dcc.Loading(id=\"LGV-component\"),\n",
" html.P(\"Circular Genome View with SKBR3 pacbio (sniffles VCF) track\"),\n",
" component_test\n",
" ]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "rL8gnjaMQHeu",
"outputId": "9758532d-fcdb-42c0-e527-61fb6c60eae8"
},
"outputs": [
{
"data": {
"application/javascript": "(async (port, path, width, height, cache, element) => {\n if (!google.colab.kernel.accessAllowed && !cache) {\n return;\n }\n element.appendChild(document.createTextNode(''));\n const url = await google.colab.kernel.proxyPort(port, {cache});\n const iframe = document.createElement('iframe');\n iframe.src = new URL(path, url).toString();\n iframe.height = height;\n iframe.width = width;\n iframe.style.border = 0;\n element.appendChild(iframe);\n })(3031, \"/\", \"100%\", 1000, false, window.element)",
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"app.run_server(mode=\"inline\", height=1000, use_reloader=False, debug=True, port=3031)\n"
]
}
],
"metadata": {
"colab": {
"authorship_tag": "ABX9TyOMAEpCwyMSE0fN/WR6igCI",
"collapsed_sections": [],
"include_colab_link": true,
"name": "skbr3.ipynb",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}