squidpy.pl.extract
- squidpy.pl.extract(adata, obsm_key='img_features', prefix=None)[source]
Create a temporary
anndata.AnnDataobject for plotting.Move columns from
anndata.AnnData.obsm['{obsm_key}']toanndata.AnnData.obsto enable the use ofscanpy.plfunctions.- Parameters:
adata (
AnnData) – Annotated data object.obsm_key (
list[str] |str) – Entries inanndata.AnnData.obsmthat should be moved toanndata.AnnData.obs.prefix (
list[str] |str|None) – Prefix to prepend to each column name. Should be a :class;`list` ifobsm_keyis alist. If None, use the original column names.
- Return type:
- Returns:
Temporary
anndata.AnnDataobject with desired entries inanndata.AnnData.obs.- Raises:
ValueError – If number of
prefixesdoes not fit to number ofobsm_keys.
Notes
If
anndata.AnnData.obs['{column}']already exists, it will be overwritten and a warning will be issued.