Skip to main content

Consolidated spatial transcriptomics analysis toolkit with variational inference methods

Project description

scviva-tools

Consolidated spatial transcriptomics analysis toolkit based on scvi-tools.

Provides seven spatial transcriptomics models and tools as first-class citizens:

  • scVIVA — niche-aware representation learning (Levy et al., 2025)
  • DestVI — multi-resolution cell-type deconvolution (Lopez et al., 2022)
  • ResolVI — noise and bias correction for cellular-resolution ST (Ergen & Yosef, 2025)
  • GIMVI — joint imputation of missing genes across paired scRNA-seq and spatial data (Lopez et al., 2019)
  • Stereoscope — probabilistic cell-type deconvolution of spatial spots (Andersson et al., 2020)
  • Tangram — mapping scRNA-seq data onto spatial coordinates (Biancalani et al., 2021)
  • Harreman — metabolic exchange and cell-cell communication inference for spatial data (Etxezarreta-Arrastoa et al., 2025), integrating outputs from DestVI, ResolVI, and SCVIVA

See docs/user_guide/models for a full description of each model, and docs/tutorials for worked examples of every model above.

Installation

pip install scviva-tools

# Optional extras
pip install "scviva-tools[spatial]"    # SpatialData + squidpy integration
pip install "scviva-tools[rapids]"     # GPU-accelerated neighbor graphs (cuML/cuPy/cuGraph)
pip install "scviva-tools[tutorials]"  # jupyter, matplotlib, seaborn
pip install "scviva-tools[all]"        # everything above

See docs/installation.md for details, including a development install.

Quick Start

import scviva

# scVIVA
scviva.SCVIVA.setup_anndata(adata, layer="counts", spatial_key="spatial")
model = scviva.SCVIVA(adata)
model.train()

# DestVI
import scvi
scvi.model.CondSCVI.setup_anndata(sc_adata, labels_key="cell_type", layer="counts")
sc_model = scvi.model.CondSCVI(sc_adata)
sc_model.train()

scviva.DestVI.setup_anndata(st_adata, layer="counts")
st_model = scviva.DestVI.from_rna_model(st_adata, sc_model)
st_model.train()

# ResolVI
scviva.ResolVI.setup_anndata(adata, layer="counts", spatial_key="spatial")
model = scviva.ResolVI(adata)
model.train()

Models beyond scVIVA/DestVI/ResolVI (GIMVI, Stereoscope, Tangram) live under scviva.external, e.g. scviva.external.Tangram.

Downstream tools (scviva.tl / scviva.pl)

scviva.tl and scviva.pl mirror scanpy's sc.tl/sc.pl convention, resolving lazily to scviva.tools/scviva.plotting so heavy optional dependencies aren't imported eagerly:

# Harreman: metabolic exchange & cell-cell communication analysis, optionally
# integrating DestVI/ResolVI/SCVIVA outputs
scviva.tl.harreman.hs.compute_local_autocorrelation(adata, use_metabolic_genes=True)
scviva.pl.harreman.local_correlation_plot(adata)

scviva.tl.harreman itself exposes a scanpy-style sub-API: tl/hs/pp/ds/pl for tools/hotspot/preprocessing/datasets/plotting, plus a stateful HarremanAnalysis wrapper (scviva.tools.harreman.HarremanAnalysis) that can integrate DestVI/ResolVI/SCVIVA outputs.

Documentation

Full documentation, including the user guide, API reference, and tutorials, is under docs/. See CHANGELOG.md for a detailed history of recent changes.

References

See docs/references.md for full citations.

Copyright (c) 2026, Yosef Lab, Weizmann Institute of Science

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

scviva_tools-0.1.5.tar.gz (46.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scviva_tools-0.1.5-py3-none-any.whl (192.1 kB view details)

Uploaded Python 3

File details

Details for the file scviva_tools-0.1.5.tar.gz.

File metadata

  • Download URL: scviva_tools-0.1.5.tar.gz
  • Upload date:
  • Size: 46.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scviva_tools-0.1.5.tar.gz
Algorithm Hash digest
SHA256 95a56ec6562c46989a474f3b405fd4f898d3cd0ae9ebf7178af4f4ca77a464df
MD5 044beacd30ba10b42ac21ed89e1a40db
BLAKE2b-256 650e22b1fbfb78b017bdde5f064c7f0c829e569421b43796c3165c773ec3f5d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for scviva_tools-0.1.5.tar.gz:

Publisher: release.yaml on YosefLab/scviva-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scviva_tools-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: scviva_tools-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 192.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scviva_tools-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 571412c23efcd01154276054ff813535441941301f0ec9af7591458c5f934d81
MD5 8fe99f26eb2adbea23cd0fbadf68692d
BLAKE2b-256 a49081767e71ba864a44cb86a2ae02bfce7e9bc71825bc5b32be56f8663fcf2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scviva_tools-0.1.5-py3-none-any.whl:

Publisher: release.yaml on YosefLab/scviva-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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