npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

clustergrammer2

v0.18.0

Published

A Custom Jupyter Widget Library

Downloads

439

Readme

badge

ccle_gif

Clustergrammer2 is an interactive heatmap Jupyter widget built using the widget-ts-cookiecutter library and the WebGL library regl. Clustergrammer2 is built to help researchers interactively explore single cell data (e.g. scRNA-seq). Please see Case Studies and Tutorials for examples.

Clustergrammer2 Examples

Basic Example of Running Clustergrammer2 on MyBinder

badge Nbviewer

Running Clustergrammer2

The 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 using Jupyter Lab it 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:

2,700 PBMC scRNA-seq

badge Nbviewer

2,700 PBMC scRNA-seq

Single 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 from 10X Genomics. Bulk gene expression signatures of cell types from CIBERSORT were used to obtain a tentative cell type for each cell. Please see the video tutorial above for more information.

Clustergrammer2 Roadmap

Please see the project Roadmap for information on where the project is heading.

Installation

A typical installation requires the following commands to be run:

pip install clustergrammer2
jupyter nbextension install --py --sys-prefix clustergrammer2
jupyter nbextension enable --py --sys-prefix clustergrammer2

Optionally: --sys-prefix|--user|--system

Or, if you use jupyterlab:

pip install clustergrammer2
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Embedding the widget into static HTML Notebooks

jupyter nbconvert --to html notebook.ipynb

Development

During development run npm run watch for 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 versions

Update the versions in the following files

JavaScript
  • package.json
  • widget.ts

Python

  • _version.py
  • example.py
  • requirements.txt
  • _frontend.py

Webpack

Run the following commands to build the JavaScript bundle:

npm run build
npm run build:nbextension
npm run build:labextension

Publish to npm using

npm publish

These instructions are based on the release instructions from the jupyter-widgets/widget-ts-cookiecutterREADME.

Bundling the Python Package

Next, bundle the python package using (optinally delete the old versions under dist)

python setup.py sdist bdist_wheel

Then, upload the PYPI:

twine upload dist/*

Checklist after release

After releasing a new version several things need to be checked to ensure proper widget functioning.

Check Package Managers

  • https://www.npmjs.com/package/clustergrammer2 (can be slow to update)
  • https://pypi.org/project/clustergrammer2/

Check HTML Embedding

  • Run jupyter 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, like https://unpkg.com/[email protected]/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 querystring flush_cache=True in the URL to ensure that NBVIewer re-runs nbconvert.

Check Cloud Services

  • Check MyBinder

Note for Sublime Development

Use this in the where section to restrict search

clustergrammer2/*.py,-*/build/*

Contact

For issues and concerns please use the issue tracker or gitter discussion room.