Skip to content

settylab/kompot_notebooks

Repository files navigation

Kompot Paper - Plotting Notebooks

Repository containing Jupyter notebooks used to generate figures for the Kompot paper.

About Kompot

Kompot is a method for detecting differential abundance and gene expression at single-cell resolution by comparing phenotypic manifolds.

Main Repository: https://github.com/settylab/kompot

For installation instructions, tutorials, and comprehensive documentation, please visit the main Kompot repository.

Citation

@article{Otto2025.06.03.657769,
    author = {Otto, Dominik J. and Arriaga-Gomez, Erica and Thieme, Elana and Yang, Ruijin and Lee, Stanley C. and Setty, Manu},
    title = {Comparing phenotypic manifolds with Kompot: Detecting differential abundance and gene expression at single-cell resolution},
    year = {2025},
    doi = {10.1101/2025.06.03.657769},
    publisher = {Cold Spring Harbor Laboratory},
    journal = {bioRxiv},
    URL = {https://www.biorxiv.org/content/10.1101/2025.06.03.657769}
}

Overview

This repository contains the notebooks that produce publication-quality figures demonstrating Kompot's capabilities for differential abundance and differential expression analysis in single-cell data.

The analyses showcase:

  • Differential abundance detection in aging hematopoiesis
  • Differential expression analysis across age groups
  • Visualization of gene expression patterns across phenotypic manifolds
  • Integration of multiple comparison groups (Young, Mid, Old)

Notebooks

kompot_aging_bm.ipynb

Main analysis notebook for aging bone marrow hematopoiesis dataset. This notebook:

  • Performs differential abundance (DA) analysis comparing Young vs Old, Young vs Mid, and Mid vs Old samples
  • Performs differential expression (DE) analysis across age groups
  • Generates multi-volcano plots for DA results stratified by cell type
  • Creates heatmaps showing gene expression patterns across conditions
  • Visualizes expression changes on UMAP embeddings
  • Demonstrates Kompot's ability to detect both high-fold-change and high-Mahalanobis genes

Key Figures:

  • Multi-volcano plots showing DA results per cell type
  • Gene expression heatmaps across age groups and cell types
  • 3-way condition comparison grids (Young, Mid, Old)
  • Volcano plots with highlighted gene categories

SuppFig9.ipynb

Analysis notebooks for the Tal1-/- mouse gastrulation comparisons in Supplementary Fig. 9.

Fig4_prep.ipynb and Fig4_plot.ipynb

Analysis notebooks for the results in Figure 4 about trajectories of treatment response to immune checkpoint inhibition in melanoma

Fig5_prep.ipynb and Fig5_plot.ipynb

Analysis notebooks for the results in Figure 5 about neuroblastoma.

Related Repositories

This repository focuses on generating paper figures. For comprehensive benchmarking and validation, see:

Kompot Memory + Runtime Scaling

Repository: https://github.com/settylab/kompot_scaling Local Path: /fh/fast/setty_m/user/dotto/2025_kompot_complexity/

Systematic benchmarking of Kompot's computational performance:

  • Memory scaling: Cell counts (1k-422k), gene counts (50-33k), landmarks (500-10k)
  • Runtime scaling: Comprehensive timing analysis across all parameter combinations
  • Hardware comparisons: CPU vs GPU, 1 CPU vs 16 CPUs
  • Configuration testing: Sample variance, batching strategies, disk vs memory storage
  • Robust statistics: 2,870 benchmark configurations with 10 replicates each

Kompot Stability + Runtime Benchmarking

Repository: https://github.com/settylab/kompot_de_benchmark Local Path: /fh/fast/setty_m/user/dotto/2025_differential_expression_bench/

Comprehensive stability and performance analysis:

  • Parameter stability: Sensitivity analysis for ls_factor (201 values), sigma (201 values), n_components (1-100)
  • Subsampling stability: Robustness testing across cell count ranges (100 to 400k+ cells)
  • Runtime profiling: Large-scale subsampling across multiple datasets
  • Multi-dataset validation: Testing on aging, COVID-19, and BCR-XL stimulation datasets

Requirements

  • Python 3.10+
  • kompot package (install from https://github.com/settylab/kompot)
  • Standard single-cell analysis stack (scanpy, anndata, palantir)
  • Visualization libraries (matplotlib, seaborn)

Installation

# Install Kompot
pip install kompot

# Or install from source
git clone https://github.com/settylab/kompot.git
cd kompot
pip install -e .

For detailed installation instructions and dependencies, see the main Kompot repository.

Usage

# Launch Jupyter notebook
jupyter notebook kompot_aging_bm.ipynb

The notebook is designed to be run sequentially. Key parameters are defined at the top for easy modification.

Data

The analysis uses an aging hematopoiesis dataset with:

  • 8,090 cells × 16,285 genes
  • Three age groups: Young, Mid, Old
  • Pre-computed diffusion map embeddings (50 components)
  • Multiple cell type annotations (high and mid resolution)

Data path is specified in the notebook and should be updated for local use.

License

This analysis code is provided for reproducibility. Kompot itself is licensed under GNU General Public License v3 (GPLv3). See the main Kompot repository for license details.

Contact

For questions about Kompot or this analysis, please open an issue on the Kompot GitHub repository.

About

Notebooks used to make plots for the kompot paper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published