Skip to main content

Kompot

DOI PyPI Tests codecov Documentation Status

Kompot Logo

Kompot is a Python package for differential abundance and gene expression analysis using Gaussian Process models with JAX backend.

Overview

Kompot implements methodologies from the Mellon package for computing differential abundance and gene expression, with a focus on using Mahalanobis distance as a measure of differential expression significance. It leverages JAX for efficient computations and provides a scikit-learn like API with .fit() and .predict() methods.

Key features:

  • Computation of differential abundance between conditions
  • Gene expression smoothing and uncertainty estimation
  • Mahalanobis distance calculation for differential expression significance
  • JAX-accelerated computations with optional GPU support
  • Disk-backed covariance storage for sample variance estimation
  • Full scverse compatibility with direct AnnData integration
  • Visualization tools for volcano plots, heatmaps, and embeddings
  • Command-line interface for pipeline integration

Installation

pip install kompot

Or via conda:

conda install -c bioconda kompot

See the installation guide for optional dependencies and JAX GPU support.

Usage

Python API

import kompot
import anndata as ad

# Load data
adata = ad.read_h5ad("data.h5ad")

# Differential expression
kompot.de(adata, "condition", "control", "treatment")

# Differential abundance
kompot.da(adata, "condition", "control", "treatment")

# With advanced options
from kompot import GPSettings, FDRSettings

kompot.de(
    adata, "condition", "control", "treatment",
    gp=GPSettings(sigma=0.5),
    fdr=FDRSettings(threshold=0.05),
)

Command-Line Interface

# Differential expression
kompot de input.h5ad -o output.h5ad \
  --groupby condition \
  --condition1 control \
  --condition2 treatment

Documentation

Citation

If you use Kompot in your research, please cite:

@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}
}

License

GNU General Public License v3 (GPLv3)

Metadata

Release files for kompot 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kompot 0.8.0
File Size Uploaded
kompot-0.8.0.tar.gz 300.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kompot 0.8.0
File Interpreter ABI Platform
kompot-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 641.4 kB

Release files / kompot-0.8.0.tar.gz

Download URL kompot-0.8.0.tar.gz
Size 300.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2e0b8b132984b72a3f07fa3a487106856cb5c8d8c00ccde07e6cd0ddff95fb5f
BLAKE2b-256 checksum
How to use checksums
df2f5f62743b3bbee5b2bd097d94cf15d1a2d4b0476695b93d00539988b1cb02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / kompot-0.8.0-py3-none-any.whl

Download URL kompot-0.8.0-py3-none-any.whl
Size 341.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eef14fabc6991f486c35910c155f73a888bfd60abe8a6210ce8493c7f95e188d
BLAKE2b-256 checksum
How to use checksums
3f423c34fa6e60ea28222e558e1efb4a35a9f3aad4380fd93362da3e1c9b9b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page