<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# API Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div id=\"igv_8530370\" class=\"igv-js\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                require([location.origin + Jupyter.contents.base_url + \"nbextensions/igv/igv-jupyter.js\"], function() {\n",
       "                    var div = $(\"#igv_8530370.igv-js\")[0], options = {\"showKaryo\": false, \"locus\": \"chr1:155,160,475-155,184,282\", \"flanking\": 1000, \"tracks\": [{\"indexUrl\": \"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed.idx\", \"name\": \"Genes\", \"displayMode\": \"EXPANDED\", \"order\": 1.7976931348623157e+308, \"url\": \"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed\", \"format\": \"bed\"}], \"showNavigation\": true, \"showRuler\": true, \"doubleClickDelay\": 500, \"reference\": {\"id\": \"hg19\"}};\n",
       "                    igv.createBrowser(div, options);\n",
       "                });\n",
       "            </script>\n",
       "            "
      ],
      "text/plain": [
       "<igv.IGV at 0x1069765f8>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Define IGV.js instance\n",
    "from igv import IGV, Reference, Track, MAX_VALUE\n",
    "\n",
    "igv_instance = IGV(\n",
    "    doubleClickDelay=100,\n",
    "    locus=\"chr1:155,160,475-155,184,282\",\n",
    "    reference=Reference(id=\"hg19\"), \n",
    "    tracks=[\n",
    "    Track(\n",
    "    name=\"Genes\",\n",
    "    format=\"bed\",\n",
    "    url=\"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed\",\n",
    "    index_url=\"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed.idx\", \n",
    "    order=MAX_VALUE, \n",
    "    display_mode=\"EXPANDED\")\n",
    "    ]\n",
    ")\n",
    "igv_instance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",<commit_msg>DoubleClick.ipynb. igv instance option params follow Python-style naming convention.<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# API Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div id=\"igv_5729730\" class=\"igv-js\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                require([location.origin + Jupyter.contents.base_url + \"nbextensions/igv/igv-jupyter.js\"], function() {\n",
       "                    var div = $(\"#igv_5729730.igv-js\")[0], options = {\"flanking\": 1000, \"reference\": {\"id\": \"hg19\"}, \"showRuler\": true, \"doubleClickDelay\": 100, \"showKaryo\": false, \"tracks\": [{\"url\": \"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed\", \"format\": \"bed\", \"name\": \"Genes\", \"order\": 1.7976931348623157e+308, \"indexUrl\": \"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed.idx\", \"displayMode\": \"EXPANDED\"}], \"showNavigation\": true, \"locus\": \"chr1:155,160,475-155,184,282\"};\n",
       "                    igv.createBrowser(div, options);\n",
       "                });\n",
       "            </script>\n",
       "            "
      ],
      "text/plain": [
       "<igv.IGV at 0x106a3dc50>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Define IGV.js instance\n",
    "from igv import IGV, Reference, Track, MAX_VALUE\n",
    "\n",
    "igv_instance = IGV(\n",
    "    double_click_delay=100,\n",
    "    locus=\"chr1:155,160,475-155,184,282\",\n",
    "    reference=Reference(id=\"hg19\"), \n",
    "    tracks=[\n",
    "    Track(\n",
    "    name=\"Genes\",\n",
    "    format=\"bed\",\n",
    "    url=\"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed\",\n",
    "    index_url=\"//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed.idx\", \n",
    "    order=MAX_VALUE, \n",
    "    display_mode=\"EXPANDED\")\n",
    "    ]\n",
    ")\n",
    "igv_instance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
{'fraction_non_alphanumeric': 0.23165554881746514, 'fraction_numerical': 0.04770568021022842, 'mean_word_length': 2.1536010197578075, 'pattern_counts': {'":': 76, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3680920', 'n_tokens_mistral': 2003, 'n_tokens_neox': 1820, 'n_words': 241}