Skip to main content

Differential abundance and gene expression analysis using Mahalanobis distance with JAX backend

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kompot-0.6.1.tar.gz (289.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kompot-0.6.1-py3-none-any.whl (465.2 kB view details)

Uploaded Python 3

File details

Details for the file kompot-0.6.1.tar.gz.

File metadata

  • Download URL: kompot-0.6.1.tar.gz
  • Upload date:
  • Size: 289.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for kompot-0.6.1.tar.gz
Algorithm Hash digest
SHA256 b285d4c4d77c1d3994489e8efc2fbb6381e3d9996358b8bcb7179fc11f41701d
MD5 ecb8d46e80228ea57c7cc17b746c992d
BLAKE2b-256 87518e7c6e5afbcda44e444bb0df03c147fd940ba363966a026f0d09934b94e0

See more details on using hashes here.

File details

Details for the file kompot-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: kompot-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 465.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for kompot-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 678f6edcc656cb849a9edd902345eac9d679b93e87b3ec71d8c824f84272aa22
MD5 3e2c9e38a4ce5e5344771c0d3eb88970
BLAKE2b-256 731635cf3b977e08bee693f5448c27235d97a13c2ced5aef49eacd11e57188bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page