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.3.tar.gz (412.9 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.3-py3-none-any.whl (252.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kompot-0.6.3.tar.gz
Algorithm Hash digest
SHA256 aaf00d8c45254f884dc42f7730b3d552c3f9dca93e896749af5af4bd057d97b1
MD5 567d94263b6322340df64716c38c71a5
BLAKE2b-256 8e282d4e786991c70fbf02c3a134985cd4a22a45e357037af9101f5719405350

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for kompot-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 25f934a9b5f4602ab54b53291fc84c43587ec555de21198bc4a15f6e04928925
MD5 4a02d6bc03e2698b0db26dc0d9dbe233
BLAKE2b-256 ebde156af912fc8867d175755f4e8c4ef46d7cc2df61ea0e3630cb60076afd70

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