{ "info": { "author": "Jim Robinson", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: IPython", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python" ], "description": "\n# igv Jupyter Extension\n\n[![Binder](https://beta.mybinder.org/badge.svg)](https://mybinder.org/v2/gh/igvteam/igv-jupyter/master?filepath=examples/BamFiles.ipynb)\n=======\n\n\nigv-jupyter is an extension for [Jupyter Notebook](http://jupyter.org/) which\nwraps [igv.js](https://github.com/igvteam/igv.js). With this\nextension you can render igv.js in a cell and call its API from\nthe notebook. The extension exposes a python API that mimics the igv.js \nBrowser creation and control APIs. Dictionaries are used for browser and track \nconfiguration objects. Track data can be loaded from local or remote \nURLs, or supplied directly as lists of objects.\n\n## Installation\n\nRequirements:\n* python >= 3.6.4\n* jupyter >= 4.2.0\n\n\n```bash\npip install igv-jupyter\n\n# To install to configuration in your home directory\njupyter serverextension enable --py igv\njupyter nbextension install --py igv\njupyter nbextension enable --py igv\n\n\n# If using a virtual environment\njupyter serverextension enable --py igv --sys-prefix\njupyter nbextension install --py igv --sys-prefix\njupyter nbextension enable --py igv --sys-prefix\n\n```\n\n## Usage\n\n### Examples\n\nExample notebooks are available in the github repository. To download without cloning the repository use \nthis [link](https://github.com/igvteam/igv.js-jupyter/archive/master.zip). Notebooks are available in the\n\"examples\" directory.\n\n\n\n### Initialization\n\nTo insert an IGV instance into a cell: \n\n(1) create an igv.Browser object,and (2) call showBrowser on the instance.\n\nExample:\n\n```python\nimport igv\n\nb = igv.Browser({\"genome\": \"hg19\"})\n```\n\nThe igv.Browser initializer takes a configuration object which is converted to JSON and passed to the igv.js\ncreateBrowser function. The configuration object is described in the\n[igv.js documentation](https://github.com/igvteam/igv.js/wiki/Browser-Configuration-2.0).\n\n\nTo instantiate the client side IGV instance in a cell call show()\n\n\n```python\nb.show()\n```\n\n### Tracks\n\nTo load a track pass a track configuration object to load_track(). Track configuration\nobjects are described in the [igv.js documentation](https://github.com/igvteam/igv.js/wiki/Tracks-2.0).\nThe configuration object will be converted to JSON and passed to the igv.js browser\ninstance.\n\nData for the track can be loaded by URL or passed directly as an array of JSON objects.\n\n\n#### Remote URL\n\n```python\nb.load_track(\n {\n \"name\": \"Segmented CN\",\n \"url\": \"https://data.broadinstitute.org/igvdata/test/igv-web/segmented_data_080520.seg.gz\",\n \"format\": \"seg\",\n \"indexed\": False\n })\n\n```\n\n#### Local File\n\nTracks can be loaded from local files using the Jupyter web server by prepending \"files\" to the path. The path\nis relative to the notebook file. \n\n```python\nb.load_track(\n {\n \"name\": \"Local VCF\",\n \"url\": \"files/data/example.vcf\",\n \"format\": \"vcf\",\n \"type\": \"variant\",\n \"indexed\": False\n })\n```\n\n#### Embedded Features\n\nFeatures can also be passed directly to tracks.\n\n```python\nb.load_track({\n \"name\": \"Copy number\",\n \"type\": \"seg\",\n \"displayMode\": \"EXPANDED\",\n \"height\": 100,\n \"isLog\": True,\n \"features\": [\n {\n \"chr\": \"chr20\",\n \"start\": 1233820,\n \"end\": 1235000,\n \"value\": 0.8239,\n \"sample\": \"TCGA-OR-A5J2-01\"\n },\n {\n \"chr\": \"chr20\",\n \"start\": 1234500,\n \"end\": 1235180,\n \"value\": -0.8391,\n \"sample\": \"TCGA-OR-A5J3-01\"\n }\n ]\n})\n```\n\n### Navigation\n\nZoom in by a factor of 2\n\n```python\nb.zoom_in()\n```\n\nZoom out by a factor of 2\n\n```python\nb.zoom_out()\n```\n\nJump to a specific locus\n\n```python\nb.search('chr1:3000-4000')\n\n```\n\nJump to a specific gene. This uses the IGV search web service, which currently supports a limited number of genomes: hg38, hg19, and mm10.\nTo configure a custom search service see the [igv.js documentation](https://github.com/igvteam/igv.js/wiki/Browser-Configuration-2.0#search-object-details)\n\n```python\nb.search('myc')\n\n```\n\n### SVG output\n\nSaving the current IGV view as an SVG image requires two calls. \n\n```python\nb.get_svg()\n\nb.display_svg()\n\n```\n\n\n### Events\n\n**_Note: This is an experimental feature._**\n\n```python\n\ndef locuschange(data):\n b.locus = data\n\n b.on(\"locuschange\", locuschange)\n\n b.zoom_in()\n\n return b.locus\n\n```\n\n#### Development\n\nTo build and install from source:\n\n```bash\npython setup.py build\npip install -e .\njupyter nbextension install --py igv\njupyter nbextension enable --py igv\n\n```\n\nCreating a conda environment\n```bash\nconda create -n test python=3.7.1\nconda activate test\nconda install pip\nconda install jupyter\n\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/igvteam/igv.js-jupyter", "keywords": "igv,bioinformatics,genomics,visualization,ipython,jupyter", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "igv-jupyter", "package_url": "https://pypi.org/project/igv-jupyter/", "platform": "", "project_url": "https://pypi.org/project/igv-jupyter/", "project_urls": { "Homepage": "https://github.com/igvteam/igv.js-jupyter" }, "release_url": "https://pypi.org/project/igv-jupyter/0.9.8/", "requires_dist": [ "jupyter", "notebook (>=4.2.0)" ], "requires_python": "", "summary": "Jupyter extension for embedding the igv.js genome visualization in a notebook", "version": "0.9.8" }, "last_serial": 5962203, "releases": { "0.9.7": [ { "comment_text": "", "digests": { "md5": "2e6eaf6cb21291573043e1ad47767ca5", "sha256": "0f9cecd6a8c1d1f840842ec0425906922119bb48f56ed32374b1304a5eec2c85" }, "downloads": -1, "filename": "igv_jupyter-0.9.7-py3.7.egg", "has_sig": false, "md5_digest": "2e6eaf6cb21291573043e1ad47767ca5", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 425317, "upload_time": "2019-04-09T20:15:27", "url": "https://files.pythonhosted.org/packages/fb/c0/8dacc3acf38db5c8644acea47697b5b27e7fd75c375528d143d783df4993/igv_jupyter-0.9.7-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "d36e9adbc8568762b0cb4278eeb56f83", "sha256": "6d6a70ffee2c2d7ec7c317619349f211b02cbfe989c3539781c857f4361e71bb" }, "downloads": -1, "filename": "igv_jupyter-0.9.7-py3-none-any.whl", "has_sig": false, "md5_digest": "d36e9adbc8568762b0cb4278eeb56f83", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 422867, "upload_time": "2019-04-09T20:15:23", "url": "https://files.pythonhosted.org/packages/fc/26/cbbfa5adec59abf52392f417b238994a7f3978c2442f7b405a5b720c6beb/igv_jupyter-0.9.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17e8476aa62106703a0996e973d380bc", "sha256": "0c22318b9686c0e975ed7d1bf806456983ba10f560a6f764fa27c4efd1d924ec" }, "downloads": -1, "filename": "igv-jupyter-0.9.7.tar.gz", "has_sig": false, "md5_digest": "17e8476aa62106703a0996e973d380bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 422920, "upload_time": "2019-04-09T20:15:26", "url": "https://files.pythonhosted.org/packages/c6/a4/11e043b8c8b09c72009785995d1911e8a04c9879cdbce242b01f1af439c6/igv-jupyter-0.9.7.tar.gz" } ], "0.9.8": [ { "comment_text": "", "digests": { "md5": "51964333960a504ef2ad7b9f58b98a39", "sha256": "49b8f3567353861c9697dd51ed4e82ce520507c376e5b71074ade0272cd096d7" }, "downloads": -1, "filename": "igv_jupyter-0.9.8-py3-none-any.whl", "has_sig": false, "md5_digest": "51964333960a504ef2ad7b9f58b98a39", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 328250, "upload_time": "2019-10-11T22:54:42", "url": "https://files.pythonhosted.org/packages/fa/79/b698ff2bcfb5f456be04a46f65a3732c484adf8e66a606f00448c0e308a3/igv_jupyter-0.9.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "33579a6f2ed5ccfedc31d2bbebd557f5", "sha256": "75ce6cc461c08af01fbee357cdb0501a4133896f6d94980f654d5b44294e3030" }, "downloads": -1, "filename": "igv-jupyter-0.9.8.tar.gz", "has_sig": false, "md5_digest": "33579a6f2ed5ccfedc31d2bbebd557f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 328572, "upload_time": "2019-10-11T22:54:45", "url": "https://files.pythonhosted.org/packages/91/58/3dd69e9059e82e37ced3e24ca8d5aeaa47da36e4b5beb7dc31c374a88567/igv-jupyter-0.9.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "51964333960a504ef2ad7b9f58b98a39", "sha256": "49b8f3567353861c9697dd51ed4e82ce520507c376e5b71074ade0272cd096d7" }, "downloads": -1, "filename": "igv_jupyter-0.9.8-py3-none-any.whl", "has_sig": false, "md5_digest": "51964333960a504ef2ad7b9f58b98a39", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 328250, "upload_time": "2019-10-11T22:54:42", "url": "https://files.pythonhosted.org/packages/fa/79/b698ff2bcfb5f456be04a46f65a3732c484adf8e66a606f00448c0e308a3/igv_jupyter-0.9.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "33579a6f2ed5ccfedc31d2bbebd557f5", "sha256": "75ce6cc461c08af01fbee357cdb0501a4133896f6d94980f654d5b44294e3030" }, "downloads": -1, "filename": "igv-jupyter-0.9.8.tar.gz", "has_sig": false, "md5_digest": "33579a6f2ed5ccfedc31d2bbebd557f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 328572, "upload_time": "2019-10-11T22:54:45", "url": "https://files.pythonhosted.org/packages/91/58/3dd69e9059e82e37ced3e24ca8d5aeaa47da36e4b5beb7dc31c374a88567/igv-jupyter-0.9.8.tar.gz" } ] }