opendvp.datasets.tutorial_data

Contents

opendvp.datasets.tutorial_data#

tutorial_data(path=None)#

Download, verify and cache the openDVP tutorial dataset.

Fetches a single 133 MB archive from Zenodo, checks it against a known MD5, extracts it, and returns the paths of the files the tutorials use. The download happens once: later calls verify the cache and return immediately.

Parameters:

path (str or pathlib.Path, optional) – Directory to cache the dataset in. Defaults to the per-user cache directory (~/Library/Caches/opendvp on macOS, ~/.cache/opendvp on Linux), which can also be overridden by setting the OPENDVP_DATA_DIR environment variable.

Returns:

One entry per tutorial input, plus "root" for the extracted directory itself:

image

Multiplexed immunofluorescence image, OME-TIFF.

segmentation

Single-cell segmentation mask, TIFF.

quantification

Per-cell marker intensities, CSV.

artefact_annotations

Manually drawn artefact regions, GeoJSON.

gates

Per-marker gating thresholds, CSV.

celltype_matrix

Marker-to-cell-type definitions for phenotyping, CSV.

proteomics

DIA-NN protein group matrix, tab-separated.

proteomics_metadata

Sample metadata for the DIA-NN matrix, semicolon-separated.

collection_shapes

Laser-microdissection collection shapes, GeoJSON.

Return type:

dict[str, pathlib.Path]

Raises:

FileNotFoundError – If the archive extracts without a file the tutorials expect.

Notes

The dataset is archived on Zenodo under DOI 10.5281/zenodo.15830141. That DOI points at one specific version, so the contents cannot change and the MD5 in this module will keep matching.

Examples

>>> import opendvp as dvp
>>> paths = dvp.datasets.tutorial_data()  
>>> adata = dvp.io.quant_to_adata(paths["quantification"])