Skip to main content

🧬 Comparing embeddings for single-cell and spatial data

Tests Documentation Coverage Pre-commit.ci PyPI Downloads Zenodo

Single-cell RNA-sequencing (scRNA-seq) 🧪 measures gene expression in individual cells and generates large datasets. Typically, these datasets consist of several samples, each corresponding to a combination of covariates (e.g. patient, time point, disease status, technology, etc.). Analyzing these vast datasets (often containing millions of cells for thousands of genes) is facilitated by data integration approaches, which learn lower-dimensional representations that remove the effects of certain unwanted covariates (such as experimental batch, the chip the data was run on, etc).

🎯 Overview

Here, we use slurm_sweep to efficiently parallelize and track different data integration approaches, and we compare their performance in terms of scIB metrics (Luecken et al., 2022). For each data integration method, we compute a shared latent space, quantify integration performance in terms of batch correction and bio conservation, visualize the latent space with UMAP, store the model and embedding coordinates, and store all relevant data on wandb, so that we can retrieve it after the sweep.

scembed consists of shallow wrappers around commonly used integration tools, a class to facilitate scIB comparisons, and another class to retrieve and aggregate sweep results.

🚀 Getting started

Please refer to the documentation, in particular, the API documentation.

📦 Installation

You need to have Python 3.10 or newer installed on your system. If you don't have Python installed, we recommend installing uv.

There are several alternative options to install scembed:

  1. Install the latest release of scembed from PyPI:
pip install scembed
  1. Install the latest development version:
pip install git+https://github.com/quadbio/scembed.git@main

🎯 Dependency Groups

The package uses optional dependency groups to minimize installation overhead:

  • Base: Core functionality (scanpy, scib-metrics, wandb)
  • [cpu]: CPU-based methods (e.g. Harmony, LIGER, Scanorama)
  • [gpu]: GPU-based methods (e.g. scVI, scANVI, scPoli)
  • [fast_metrics]: Accelerated evaluation with faiss and RAPIDS ⚡
  • [all]: All optional dependencies

⚠️ Note: If you encounter C++ compilation errors (e.g., with louvain or annoy), install those packages via conda/mamba first:

mamba install louvain python-annoy

📝 Release notes

See the changelog.

💬 Contact

For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.

📖 Citation

Please use our zenodo entry to cite this software.

Metadata

Release files for scembed 0.1.1

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

Source distribution (sdist)

Source distribution for scembed 0.1.1
File Size Uploaded
scembed-0.1.1.tar.gz 353.8 kB Details

Built distribution (wheel)

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

Total release size: 393.4 kB

Release files / scembed-0.1.1.tar.gz

Download URL scembed-0.1.1.tar.gz
Size 353.8 kB
Tags Source
SHA-256 checksum
How to use checksums
022f731701d9264712dc04c76924b0c7b4c67c4b8f44d8c0a0b141b65f4ccd57
BLAKE2b-256 checksum
How to use checksums
d1b7d93cda16ea87f323676ef09fb1935b39400d46cebc94b3c1c1922ba73a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.

Transparency log

Release files / scembed-0.1.1-py3-none-any.whl

Download URL scembed-0.1.1-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a73ff29cfcd7b9320570425058c2857fa36f02e614787df2658dd4c182f46b10
BLAKE2b-256 checksum
How to use checksums
f85b9260c9b28bdd452f29be6af046fae39d9c8fa64583651eaeb75af2f55f44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

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