Thanks to visit codestin.com
Credit goes to github.com

Skip to content

settylab/kompot

Repository files navigation

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 imputation 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.compute_differential_expression(
    adata,
    groupby="condition",
    condition1="control",
    condition2="treatment",
    obsm_key="X_pca"
)

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)

About

Differential abundance and gene expression in single-cell data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages