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.11 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-only methods (e.g. LIGER, Scanorama)
  • [gpu]: GPU/torch-based methods (e.g. Harmony, scVI, scANVI, scPoli)
  • [fast-metrics]: Accelerated evaluation with faiss and RAPIDS ⚡
  • [all]: All optional dependencies

⚠️ Notes:

  • For GPU-accelerated FAISS, install faiss-gpu via conda (installation guide).
  • If you encounter C++ compilation errors (e.g., with louvain or annoy), install those packages via conda first.

📝 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.2.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 scembed 0.2.0
File Size Uploaded Provenance Actions
scembed-0.2.0.tar.gz 362.0 kB With provenance Details for scembed-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 404.4 kB

Release files / scembed-0.2.0.tar.gz

Download URL scembed-0.2.0.tar.gz
Size 362.0 kB
Tags Source
SHA-256 checksum
How to use checksums
231c9e7718851e08d658d1fb91d19e021b2601d6d3e06d306ff98df82445fbe9
BLAKE2b-256 checksum
How to use checksums
2fe7fe8f0b2ae17a2d0ca8fa2eb4ad360f42d1ef6deeb0105a458e48743ceb7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

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

Download URL scembed-0.2.0-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc1ba6a610d7f76facde5ff5cc0f09738f46eeef8edefa532958dced62b77b93
BLAKE2b-256 checksum
How to use checksums
0f99d99171fddabace6e7a35830cae697f69dae3468e3ac6ead7d3465ed14063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Security for scembed 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scembed-0.2.0.tar.gz

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 Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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