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.6.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.6-py3-none-any.whl (192.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scviva_tools-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 e65a44f25f7e1630a17fa6bad046e04dccde60c30b8757f2ac781a9b9380c1a7
MD5 b23a9e7589a8fb1fbe0c11a91f66cbfe
BLAKE2b-256 b90950c808a62f7947ad9ed2a787d175cc0b0aa7b75fa570d1702f837e427213

See more details on using hashes here.

Provenance

The following attestation bundles were made for scviva_tools-0.1.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: scviva_tools-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 192.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 23fdd86cfa3ec540bab6f88e82ee1c5e4e5c9e3c7220d9058e0737d03255fded
MD5 67e489565821ec4f87285af9c29006e0
BLAKE2b-256 2a4957001d55ec5c2eb3b38d040bf10d6e2131fd1934ef89f65af975cb2b210c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scviva_tools-0.1.6-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