About
spVIPES enables robust integration of multi-group single-cell datasets through a principled shared-private latent space decomposition. The method leverages a Product of Experts (PoE) framework to learn both shared biological signals common across datasets and private representations capturing group-specific variations.
Integration Strategies
spVIPES provides three complementary approaches for dataset alignment:
| Method | Description | Best Use Case |
|---|---|---|
| Label-based PoE | Uses cell type annotations for direct supervision | High-quality cell type labels available |
| OT Paired PoE | Direct cell-to-cell correspondences via optimal transport | Known cellular correspondences (e.g., time series) |
| OT Cluster-based PoE | Automated cluster matching with transport plans | Similar cell populations, no direct correspondences |
Note: The method automatically selects the most appropriate strategy based on available annotations and transport information.
Installation
Requirements
- Python 3.9+
- PyTorch (GPU support strongly recommended)
Quick Install
Install the latest stable release from PyPI:
pip install spVIPES
For the development version:
pip install git+https://github.com/nrclaudio/spVIPES.git@main
GPU Setup (Recommended)
For optimal performance, ensure CUDA-compatible PyTorch is installed:
# Check GPU availability
nvidia-smi
# Install PyTorch with CUDA support (example for CUDA 11.3)
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
# Verify GPU detection
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
See PyTorch installation guide for version-specific instructions.
Quick Start
Basic Workflow
import spVIPES
import scanpy as sc
# Load your multi-group dataset
adata = sc.read_h5ad("data.h5ad")
# Configure integration strategy
spVIPES.model.setup_anndata(
adata,
groups_key="dataset",
label_key="cell_type", # Optional: for supervised integration
)
# Initialize and train model
model = spVIPES.model(adata)
model.train(max_epochs=200)
# Extract integrated representations
latent = model.get_latent_representation()
adata.obsm["X_spVIPES"] = latent
Integration Strategies
📋 Label-based Integration
Use when high-quality cell type annotations are available:
spVIPES.model.setup_anndata(
adata,
groups_key="dataset",
label_key="cell_type",
batch_key="batch", # Optional batch correction
)
🔄 Optimal Transport: Paired Cells
For datasets with known cell-to-cell correspondences:
# Assumes transport plan stored in adata.uns["transport_plan"]
spVIPES.model.setup_anndata(
adata,
groups_key="dataset",
transport_plan_key="transport_plan",
match_clusters=False,
)
🧩 Optimal Transport: Cluster Matching
For automatic cluster-based alignment:
spVIPES.model.setup_anndata(
adata,
groups_key="dataset",
transport_plan_key="transport_plan",
match_clusters=True, # Enables automated cluster matching
)
Advanced Configuration
# Custom model parameters
model = spVIPES.model(
adata,
n_dimensions_shared=25, # Shared latent dimensions
n_dimensions_private=10, # Private latent dimensions
n_hidden=128, # Hidden layer size
dropout_rate=0.1, # Regularization
)
# Training with custom settings
model.train(
max_epochs=300, batch_size=512, early_stopping=True, check_val_every_n_epoch=10
)
Documentation & Tutorials
📚 Getting Started
- Basic Tutorial — Complete walkthrough of spVIPES functionality
- API Documentation — Comprehensive API reference
Support & Community
💬 Get Help
- Issue Tracker — Report bugs and request features
Citation
If you use spVIPES in your research, please cite:
@article{spVIPES2023,
title={Integrative learning of disentangled representations},
author={C. Novella-Rausell, D.J.M Peters and A. Mahfouz},
journal={bioRxiv},
year={2023},
doi={10.1101/2023.11.07.565957},
url={https://www.biorxiv.org/content/10.1101/2023.11.07.565957v1}
}
Paper: bioRxiv preprint
Metadata
Release files for spVIPES 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spvipes-0.3.0.tar.gz | 57.4 kB | Without provenance | Details for spvipes-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spvipes-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for spvipes-0.3.0-py3-none-any.whl |
Total release size: 105.4 kB
Release files / spvipes-0.3.0.tar.gz
| Download URL | spvipes-0.3.0.tar.gz |
|---|---|
| Size | 57.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2978529b3f38082b5508130eaa26bf984bbc0b565733166c83dab6d777e92556
|
|
BLAKE2b-256 checksum How to use checksums |
df9099cb2589352986cfe7ca4d78f723f8724633a1d24f3ce67d01278fb01e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / spvipes-0.3.0-py3-none-any.whl
| Download URL | spvipes-0.3.0-py3-none-any.whl |
|---|---|
| Size | 48.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27f66ac6480074954d32b7f2518e4aad6be686e185b0aef9d9bf14d491f4ad9e
|
|
BLAKE2b-256 checksum How to use checksums |
64681964c5abe2eea2ad4610e29d101fead5fdfd3382f69206b55e952130d1dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for spVIPES 0.3.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.
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.