spora [io]#

spora [io] is the interface for spora [data]. It gives access to H&E, IHC, and diverse multiplex technologies, so you can open a tissue, stream a tile, or sample across cohorts.

  1. [data]harmonized datasets
  2. [io]load and sample
  3. [bench]evaluate models

Why spora [io]#

Spatial proteomics datasets differ widely in file format, channel naming, resolution, and annotation across laboratories and imaging technologies. spora [data] brings them into one harmonized format, and spora [io] gives you a single, consistent way to access them, so your code stays the same from the first cohort to the thirty-fifth.

Load a Tissue#

Point a dataset class at a spora [data] directory and ask for a tissue. You get a (C, H, W) tensor together with its channel annotations, and only that tissue’s image is read from disk.

This example needs no tile coordinates or standardization statistics. The Quick Start shows tiles, multimodal datasets, and sampling across cohorts.

from spora_io import SporaDataset

dataset = SporaDataset(
    dataset_names=["my_dataset"],
    # Parent directory; if omitted, uses SPORA_DATASETS_DIR.
    datasets_dir="/path/to/datasets",
    modalities=["imc"],
    resolution=1.0,
    sampling_unit="tissues",
    modality_kwargs={"imc": {"standardization": "identity"}},
)
sample = dataset.get_tissue_sample(
    dataset_name="my_dataset",
    tissue_id=dataset.get_tissue_ids("my_dataset")[0],
    kind="complete",
)
tissue = sample["modalities"]["imc"]
print(tissue.image.shape)  # (C, H, W)
print(tissue.channel_names)

Built on spora [data]#

spora [io] reads the harmonized collection of spora [data]: images, masks, cell types, and patient metadata, standardized across cohorts and technologies.

13,546multiplex images
5,477patients
35cohorts
14tissue origins
5imaging technologies
Tissue Origin944,680 multiplex tiles, log scale
  1. Pancreas418,132
  2. Colon219,132
  3. Breast144,960
  4. Lung62,110
  5. Brain28,890
  6. Liver28,781
  7. Lymph node18,859
  8. Spleen11,426
  9. Head and neck6,864
  10. Skin2,063
  11. Other1,913
  12. Soft tissue1,065
  13. Bladder242
  14. Tonsil242
TechnologyShare of multiplex tiles
  • IF 43.2%
  • Orion 21.0%
  • IMC 20.2%
  • CODEX 10.9%
  • MIBI 4.7%
Pairing with H&EShare of multiplex tiles
Multimodal 30.7%
  • Unimodal 69.3%
  • Multimodal 30.7%
  • Registered 26.1%
  • Matched 4.7%

Percentages refer to the total number of multiplex tiles. Technology labels describe the collection; see the format reference for spora-io modality keys and file conventions.

Bring Your Own Data#

Any imaging dataset can join: write the images and channel metadata, then let the repository scripts derive masks, OME-Zarr stores, statistics, and tiles.

Dataset Format

Directory layout, metadata tables, channel annotations, masks, and tiling.

Dataset Format
Convert New Datasets

The six steps from source images to tiles, with the commands for hoefflin2026spatial.

Convert New Datasets

Explore the Docs#

Overview

Loading interfaces, lazy loading from OME-Zarr, and typed outputs.

Overview
Standardization

Standardization methods, their statistics, and the settings per model.

Standardization
Tools and Scripts

Compute tissue masks, convert to OME-Zarr, generate tiles, and inspect datasets.

Tools and Scripts
API Reference

Dataset classes, typed outputs, methods, and helper functions.

API Reference