Package: clustergrammer2
Clustergrammer2 is an interactive heatmap Jupyter widget built using thewidget-ts-cookiecutterlibrary and the WebGL libraryregl. Clustergrammer2 is built to help researchers interactively explore single cell data (e.g. scRNA-seq). Please seeCase Studies and Tutorialsfor examples.Clustergrammer2 ExamplesBasic Example of Running Clustergrammer2 on MyBinderThe above notebook shows how Clustergrammer2 can be used to load a small dataset and visualize a large random DataFrame. By running the notebook on MyBinder usingJupyter Labit can also be used to visualize a user uploaded dataset. Please see the video tutorial above for more information.For additional examples and tutorials please see:Case Studies and TutorialsClustergrammer2-NotebooksGitHub repository2,700 PBMC scRNA-seqSingle cell RNA-seq (scRNA-seq) is a powerful method to interrogate gene expression across thousands of single cells. This method produces thousands of measurements (single cells) across thousands of dimensions (genes). This notebook uses Clustergrammer2 to interactively explore an example dataset measuring the gene expression of 2,700 PBMCs obtained from10X Genomics. Bulk gene expression signatures of cell types fromCIBERSORTwere used to obtain a tentative cell type for each cell. Please see the video tutorial above for more information.Clustergrammer2 RoadmapPlease see the projectRoadmapfor information on where the project is heading.InstallationA typical installation requires the following commands to be run:pipinstallclustergrammer2
jupyternbextensioninstall--py--sys-prefixclustergrammer2
jupyternbextensionenable--py--sys-prefixclustergrammer2Optionally: --sys-prefix|--user|--systemOr, if you use jupyterlab:pipinstallclustergrammer2
jupyterlabextensioninstall@jupyter-widgets/jupyterlab-managerEmbedding the widget into static HTML Notebooksjupyternbconvert--tohtmlnotebook.ipynbDevelopmentDuring development runnpm run watchfor real time updates. When releasing a new version, first confirm that latest version of the front and back ends are working locally (check console logs, etc).Updating versionsUpdate the versions in the following filesJavaScriptpackage.jsonwidget.tsPython_version.pyexample.pyrequirements.txt_frontend.pyWebpackRun the following commands to build the JavaScript bundle:npmrunbuild
npmrunbuild:nbextension
npmrunbuild:labextensionPublish to npm usingnpmpublishThese instructions are based on the release instructions from thejupyter-widgets/widget-ts-cookiecutterREADME.Bundling the Python PackageNext, bundle the python package using (optinally delete the old versions underdist)pythonsetup.pysdistbdist_wheelThen, upload the PYPI:twineuploaddist/*Checklist after releaseAfter releasing a new version several things need to be checked to ensure proper widget functioning.Check Package Managershttps://www.npmjs.com/package/clustergrammer2(can be slow to update)https://pypi.org/project/clustergrammer2/Check HTML EmbeddingRunjupyter nbconvert --to html introduction_nb.ipynb(from the examples directory) to generate a static HTML and check that the latest widget is working (uses unpkg.com, likehttps://unpkg.com/clustergrammer2@0.5.18/dist/index.js)Check NBViewer using link to notebook on GitHub (e.g.https://nbviewer.jupyter.org/github/ismms-himc/clustergrammer2/blob/master/examples/introduction_nb.ipynb?flush_cache=true). Make sure to use the querystringflush_cache=Truein the URL to ensure that NBVIewer re-runs nbconvert.Check Cloud ServicesCheck MyBinderNote for Sublime DevelopmentUse this in the where section to restrict searchclustergrammer2/*.py,-*/build/*ContactFor issues and concerns please use theissue trackerorgitterdiscussion room.