spatialdata-db: spatial omics datasets as SpatialData#
spatialdata-db is a catalog of public spatial omics datasets, from Visium and Xenium to MERSCOPE, CosMx and mass spectrometry imaging. Each dataset is converted to a SpatialData Zarr store, described by one row of the catalog and registered in the Lamin instance scverse/spatialdata-db. The catalog of 2026-10-31 holds 7575 datasets from 13 technologies. You can browse every dataset and collection on the website.
This Python client queries the catalog by technology, tissue, organism, gene or free text and loads the datasets you pick as SpatialData objects.
It builds cohorts of datasets that you can freeze, split by study and turn into training data, and it collects the citations of the studies they come from.
The sddb-cli command and the sddb-mcp server give the shell and AI agents the same queries and downloads.
Installation#
pip install "spatialdata-db @ git+https://github.com/theislab/spatialdata-db-client@v0.1.2"
uv pip install "spatialdata-db @ git+https://github.com/theislab/spatialdata-db-client@v0.1.2"
This installs the alpha release, v0.1.2. The main branch may be ahead of it, and you get the newest code if you leave out @v0.1.2.
The client needs Python 3.12 or newer. It is not on PyPI yet, so install it from GitHub.
Quick example#
from sddb import Catalog
hits = Catalog().query(technology="Visium", tissue="lung")
hits.summary()
smallest = min(hits, key=lambda ds: ds.size_bytes)
sdata = smallest.to_sdata() # about 7 MB, copied to the local cache once
Guides and reference#
Load a dataset or collection you found on the website.
Filter by facets or free text, then load what you pick.
Combine datasets, freeze exact versions and split by study.
Load one table from many stores and train on a split.
Query, download and cite from the shell or an AI agent.
Every public class and function, with its parameters.
Cite and license#
The paper that describes the database is forthcoming.
Until then, cite the studies behind the data you use: cohort.citations() writes their BibTeX entries, and sddb-cli cite does the same from the shell.
Each dataset keeps the license of its source, and Cite and license explains how to check and filter by license.