squidpy.pl.extract

squidpy.pl.extract(adata, obsm_key='img_features', prefix=None)[source]

Create a temporary anndata.AnnData object for plotting.

Move columns from anndata.AnnData.obsm ['{obsm_key}'] to anndata.AnnData.obs to enable the use of scanpy.plotting functions.

Parameters:
Return type:

AnnData

Returns:

: Temporary anndata.AnnData object with desired entries in anndata.AnnData.obs.

Raises:

ValueError – If number of prefixes does not fit to number of obsm_keys.

Notes

If anndata.AnnData.obs ['{column}'] already exists, it will be overwritten and a warning will be issued.