squidpy.im.ImageContainer.subset
- ImageContainer.subset(adata, spatial_key='spatial', copy=False)[source]
Subset
anndata.AnnData
using this container.Useful when this container is a crop of the original image.
- Parameters:
adata (
AnnData
) – Annotated data object.spatial_key (
str
) – Key inanndata.AnnData.obsm
where spatial coordinates are stored.copy (
bool
) – Whether to return a copy ofadata
.
- Return type:
- Returns:
: Subset of
anndata.AnnData
.