Giter Club home page Giter Club logo

igv.js-jupyter's Introduction

igv.js Jupyter Extension

This is an extension for Jupyter Notebook which integrates igv.js, an embeddable interactive genome visualization component written in JavaScript and CSS. It is based on the Integrative Genomics Viewer (IGV), and developed by the same team.

Installing

This extension can be installed through pip or conda.

pip install igv

or

conda install -c igv igv

Enabling

This extension can be enabled in Jupyter Notebook by running the following on the command line:

jupyter nbextension install --py igv

jupyter nbextension enable --py igv

Using the extension

This extension consists of a Python package that wraps igv.js functionality and an nbextension that's used for rendering igv.js when it is displayed in a notebook. Once the extension is installed and enabled, it can be used by importing IGV and associated classes, then returning them in a cell. Example code:

from igv import IGV, Reference, Track

IGV(locus="chr1:155,160,475-155,184,282", reference=Reference(id="hg19"), tracks=[Track(
    name="Genes", 
    url="//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed",
    index_url="//s3.amazonaws.com/igv.broadinstitute.org/annotations/hg19/genes/gencode.v18.collapsed.bed.idx", 
    display_mode="EXPANDED")])

Server

If using the built-in Jupyter webserver take note of the "Range" header requirements desribed here: Server Requirements. In general you will be restricted to serving non-indexed annotation (bed, gff) and wig files from the Jupyter web server.

Troubleshooting

error: can't copy 'igv/static/igvjs/img': doesn't exist or not a regular file

If you see the above error when trying to install through PIP, you may be experiencing a known issue with Python 2.7.6. To get around this error we recommend either updating your system's version of Python or simply installing through the conda package manager (described above).

igv.js-jupyter's People

Contributors

jrobinso avatar tmtabor avatar turner avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.