Datasets#
Convenience small datasets
- spatialdata.datasets.blobs(length=512, n_points=200, n_shapes=5, extra_coord_system=None, n_channels=3, c_coords=None)[source]#
Blobs dataset.
- Parameters:
length (
int(default:512)) – Length of the image/labels.n_points (
int(default:200)) – Number of points to generate.n_shapes (
int(default:5)) – Number of max shapes to generate. At most, as if overlapping they will be discardedextra_coord_system (
str|None(default:None)) – Extra coordinate space on top of the standard global coordinate space. Will have only identity transform.n_channels (
int(default:3)) – Number of channels of the image
- Return type:
- Returns:
: SpatialData object with blobs dataset.
- spatialdata.datasets.blobs_annotating_element(name)[source]#
Return the blobs dataset with the desired element annotated by the table.
- Parameters:
name (
Literal['blobs_labels','blobs_multiscale_labels','blobs_circles','blobs_polygons','blobs_multipolygons']) – Name of the element to annotate. One of “blobs_labels”, “blobs_multiscale_labels”, “blobs_circles”, “blobs_polygons”, “blobs_multipolygons”.- Return type:
- Returns:
: SpatialData object with the desired element annotated by the table.
- spatialdata.datasets.cells(path=None)[source]#
Cells dataset.
Download the
cellsexample dataset and load it as aSpatialDataobject. The download is hash-verified and cached, so repeated calls reuse the local copy instead of downloading again.The dataset is a small region of a Xenium Prime Cervical Cancer sample and contains three multiscale images (
he_aligned,he_image,morphology_focus), three multiscale label layers (cell_labels,nucleus_labels,tissue_labels), thetranscriptspoints, thecell_boundariesandnucleus_boundariesshapes, and a cell-by-genetableannotating the 94 cells.Notes
Derived from the 10x Genomics Xenium Prime Cervical Cancer FFPE dataset (https://www.10xgenomics.com/datasets/xenium-prime-ffpe-human-cervical-cancer), subset to a small tissue region. Licensed under CC BY 4.0; see
datasets.yamlfor the attribution string shipped alongside the data.- Parameters:
path (
str|None(default:None)) – Directory in which to cache the downloaded data. IfNone, the default OS cache location is used (pooch.os_cache()for"spatialdata").- Return type:
- Returns:
: SpatialData object with the cells dataset.