monkeybread.plot.embedding_filter
- monkeybread.plot.embedding_filter(adata, mask, group=None, basis='spatial', show=True, ax=None, **kwargs)
Shows a filtered embedding, allowing for examination of specific cells.
Cells in the mask will be larger and colored based on
group
if provided, otherwise red. Cells not in the mask will be smaller and colored gray.- Parameters
adata (
AnnData
) – Annotated data matrix.mask (
Union
[List
[bool
],List
[str
]]) – A mask to apply toadata.obs.index
. Can be a list of cell indices or a boolean mask with the same length as the index.group (
Optional
[str
] (default:None
)) – Column inadata.obs
oradata.var_names
to label cell contacts by.basis (
Optional
[str
] (default:'spatial'
)) – Coordinates inadata.obsm[X_{basis}]
to use. Defaults tospatial
.show (
Optional
[bool
] (default:True
)) – Whether to show the plot or return the Axes object.ax (
Optional
[Axes
] (default:None
)) – An Axes object to add the plots to.kwargs – Keyword arguments that will be passed to
scanpy.pl.embedding()
.
- Return type
- Returns
If
show = True
, returns nothing. Otherwise, returns the Axes object the plot is contained within.