This is a Jupyter/IPython interactive widget implementation of the interactive heatmap tool Clustergrammer. The front-end visualization, clustergrammer.js is built using D3.js and the back-end, clustergrammer.py is built in Python.
To install use pip:
# python installation
$ pip install clustergrammer_widget
# enable widgetsnbextension
jupyter nbextension enable --py --sys-prefix widgetsnbextension
# enable widget
jupyter nbextension enable --py --sys-prefix clustergrammer_widget
- Numpy
- Scipy
- Pandas
Clustergrammer-widget is compatable with Python 2 and 3.
The Clustergrammer-widget can be used to visualize a matrix of your data in the TSV format described here.
Within the Jupyter/IPython notebook the widget can be run using the following commands
# import the widget
from clustergrammer_widget import *
from copy import deepcopy
# load data into new network instance and cluster
net = deepcopy(Network())
net.load_file('rc_two_cats.txt')
net.make_clust()
# view the results as a widget
clustergrammer_notebook(network = net.export_net_json())
For a development installation (requires npm),
$ git clone https://github.com/maayanlab/clustergrammer-widget.git
$ cd clustergrammer-widget
$ pip install -e .
$ jupyter nbextension install --py --symlink --user clustergrammer-widget
$ jupyter nbextension enable --py --user clustergrammer-widget