Skip to main content

scConfluence

Tests codecov Documentation Status PyPI version Code style: black

scConfluence is a novel method for the integration of unpaired multiomics data combining uncoupled autoencoders and Inverse Optimal Transport to learn low-dimensional cell embeddings. These embeddings can then be used for visualization and clustering, useful for discovering subpopulations of cells, and for imputation of features across modalities. Read the paper!

figure

Install the package

scConfluence is implemented as a Python package seamlessly integrated within the scverse ecosystem, in particular Muon and Scanpy.

via PyPI

On all operating systems, the easiest way to install scConfluence is via PyPI. Installation should typically take a minute and is continuously tested.

pip install scconfluence

via GitHub (development version)

git clone git@github.com:cantinilab/scconfluence.git
cd scconfluence
pip install .

Test your development installation (optional)

pip install pytest
pytest .

Getting started

scConfluence takes as an input a MuData object and populates its obsm field with the latent embeddings. Visit http://scconfluence.rtfd.io/ for more documentation and tutorials (in docs/source/tutorials on this repository).

You may download a preprocessed 10X Multiome demo dataset here.

A GPU is not required for the method to run, but is strongly recommended.

import scconfluence
import mudata as md
import scanpy as sc
from scipy.spatial.distance import cdist

# Load data into a Muon object.
mdata = md.read_h5mu("my_data.h5mu")

# Compute the cross-modality distance matrix using connected features
mdata.uns["cross_modality1+modality2"] = cdist(mdata["modality1"].obsm["cm_features"], 
                                               mdata["modality2"].obsm["cm_features"])
mdata.uns["cross_keys"] = ["cross_modality1+modality2"]


# Initialize and train the model.
autoencoders = {"modality1": scconfluence.model.AutoEncoder(mdata["modality1"],
                                                             modality="modality1"),
                "modality2": scconfluence.model.AutoEncoder(mdata["modality2"],
                                                             modality="modality2")}
model = scconfluence.model.ScConfluence(mdata, unimodal_aes=autoencoders)
model.fit(save_path="results")
mdata.obsm["latent"] = model.get_latent().loc[mdata.obs_names]

# Visualize the embedding with UMAP.
sc.pp.neighbors(mdata, use_rep="latent")
sc.tl.umap(mdata)
sc.pl.umap(mdata)

Our paper

https://www.nature.com/articles/s41467-024-51382-x

@article {Samaran2024unpaired,
  author = {Jules Samaran and Gabriel Peyre and Laura Cantini},
  title = {scConfluence : single-cell diagonal integration with regularized Inverse Optimal Transport on weakly connected features},
  year = {2024},
  doi = {10.1038/s41467-024-51382-x},
  journal = {Nature Communications}
}

If you're looking for the repository with code to reproduce the experiments in our paper, here it is!

Metadata

Release files for scconfluence 0.1.2

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

Source distribution (sdist)

Source distribution for scconfluence 0.1.2
File Size Uploaded Provenance Actions
scconfluence-0.1.2.tar.gz 34.0 kB Without provenance Details for scconfluence-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 70.5 kB

Release files / scconfluence-0.1.2.tar.gz

Download URL scconfluence-0.1.2.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
842c7d2913b65fbe6c18284107be1dee3d41ec46bd2e6d1bf48e8b58803efd10
BLAKE2b-256 checksum
How to use checksums
209ddebcf0d571199c6cbf0877b306353ce5f8594b9286947ec68df8c556b5d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.6 Darwin/27.0.0

Release files / scconfluence-0.1.2-py3-none-any.whl

Download URL scconfluence-0.1.2-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ae5fbf6c78f670fc6f212901223319e9d374099661e6c9a3552c8c62e47fd4a
BLAKE2b-256 checksum
How to use checksums
4693fdb99c81ac78b7a06c5221f713d1bf99621394855905c646667d016c19e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.6 Darwin/27.0.0

Security for scconfluence 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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