Skip to content

Jupyter Notebook Examples

These example notebooks demonstrate how to use Celldega to analyze and visualize spatial and single-cell data. Each notebook is designed to be run in a Jupyter environment and showcases different features of the library.

Spatial Transcriptomics Tutorials

Comprehensive tutorials that walk through complete workflows:

3D Spatial Transcriptomics

Explore the Broad–Allen E15.5 developing mouse brain across 43 aligned Xenium sections. Follow these notebooks in order, or open the visualization notebook directly to use the already hosted DegaFiles:

  1. Broad–Allen Mouse Brain: Preprocessing and Alignment — align sections using cluster-centroid landmarks and neighborhood overlap, compare the results, and write named CellCloud DegaFiles variants.
  2. Broad–Allen Mouse Brain: Visualization — explore a 2D section, compare cluster composition across slices, and link the 3D CellCloud to a gene-expression Clustergram.

Single Cell Tutorials

Tutorials that explore single-cell RNA-seq data with UMAP Landscapes linked to Clustergrams:

  • Chromium PBMC Landscape-Clustergram-Enrich - Clusters the 10x Chromium PBMC 3k dataset with Scanpy and explores it from Hugging Face: a UMAP Landscape that reads the AnnData Zarr store in the browser, a Clustergram of each cluster's rank_genes_groups markers loaded from a Matrix Zarr store, and a single-cell Clustergram of the same markers linked to its own Landscape, each with Enrich
  • Tabula Sapiens Atlas Landscape-Clustergram-Enrich - Explores the 1.1-million-cell Tabula Sapiens atlas from AnnData Zarr stores on Hugging Face: a UMAP Landscape with cell-type signature estimates as you zoom, a cell-type marker Clustergram and Enrich linked to it, and a plasma-cell subset with its own signatures

Brief Notebooks

Focused examples demonstrating specific features:

Running the Notebooks

Prerequisites

Install Celldega and its dependencies:

pip install celldega

For full analysis workflows, you may also need:

pip install scanpy squidpy

Online Resources

You can also run Celldega notebooks in the cloud:

Contributing examples

Instructions for publishing notebooks with saved widget state are in Contributing.