Skip to content

theislab/cellucid

Repository files navigation

Cellucid logo

Cellucid Web Viewer

WebGL-based 3D visualization for single-cell data. Explore UMAP embeddings with interactive coloring, filtering, gene expression overlays, and KNN connectivity graphs.

Live demo: cellucid.com

Features

  • Real-time rendering of millions of cells with adaptive LOD
  • Gene expression overlays with efficient sparse matrix handling
  • Categorical and continuous cell metadata coloring
  • Interactive filtering and cell selection
  • KNN connectivity edge visualization
  • Multi-dimensional support (1D timelines, 2D, 3D)
  • Works in browser without Python (file picker) or with Python (Jupyter, CLI)

Quick Start

Option 1: Browser File Picker (No Setup)

  1. Go to cellucid.com
  2. Click "Browse local data..."
  3. Select a pre-exported folder, .h5ad file, or .zarr store

Option 2: Python CLI

pip install cellucid

# Serve h5ad directly
cellucid-anndata /path/to/data.h5ad

# Serve zarr directly
cellucid-anndata /path/to/data.zarr

# Or serve pre-exported data
cellucid serve ./my_export

Option 3: Jupyter Notebook

from cellucid import show_anndata
show_anndata(adata)  # In-memory or file path

All 14 Loading Options

Cellucid supports 6 deployment modes, each with support for pre-exported binary data, h5ad files, and zarr stores:

# Method Exported h5ad zarr Python Lazy Load Performance
1 Local Demo (GitHub) - - No* Yes Best
2 Remote Demo (GitHub) - - No* Yes Best
3 Browser File Picker - - No Yes Best
4 Browser File Picker - - No No Slower
5 Browser File Picker - - No No Slower
6 Server CLI - - Yes Yes Best
7 Server CLI - Yes Yes Good
8 Python serve() - - Yes Yes Best
9 Python serve_anndata() - Yes Yes Good
10 Jupyter show() - - Yes Yes Best
11 Jupyter show_anndata() - Yes Yes Good

* Python required for initial export, not for viewing

Summary by method:

Method Exported h5ad zarr Total
Local/Remote Demo - - 2
Browser File Picker 3
Server CLI 3
Python serve 3
Jupyter 3
Total 14

Key Notes

  • Browser h5ad/zarr (Options 4-5): Entire file loaded into browser memory - no lazy loading possible due to JavaScript limitations. Best for datasets < 100k cells.
  • Python h5ad/zarr modes (Options 7, 9, 11): True lazy loading via AnnData backed mode (h5ad) or zarr's native chunked access. Recommended for large datasets.
  • Pre-exported data: Always fastest - recommended for production and sharing.
  • zarr stores: Can be a directory (.zarr) or a file - the Python server auto-detects the format.

h5ad / zarr Requirements

  • Required: obsm['X_umap'] or obsm['X_umap_3d'] (shape: n_cells × 2 or 3)
  • Optional: obs (cell metadata), X (expression matrix), obsp['connectivities'] (KNN graph)

Saving as zarr

# Save AnnData as zarr store
adata.write_zarr("data.zarr")

Pre-export for Performance

For best performance, especially with large datasets:

from cellucid import prepare
prepare(adata, output_dir="./my_export", compress=True)

Repository Structure

cellucid/
├── index.html              # Single-page app
├── assets/
│   ├── js/
│   │   ├── app/            # UI, state management
│   │   ├── data/           # Data loaders (binary, h5ad)
│   │   └── rendering/      # WebGL renderer
│   └── exports/            # Sample datasets

Development

python -m http.server 8000
open http://localhost:8000

Python Package

See theislab/cellucid-python for the companion Python package.

License

Proprietary - All rights reserved

About

Interactive 3D UMAP viewer that scales to massive datasets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published