monkeybread.plot.embedding_filter
- monkeybread.plot.embedding_filter(adata, mask, color=None, basis='spatial', show=True, ax=None, masked_color='lightgrey', masked_alpha=1.0, masked_dot_size=None, unmasked_dot_size=None, **kwargs)
Shows a filtered embedding, allowing for examination of specific cells.
Cells in the mask will be larger and colored based on
colorif 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.color (
Optional[str] (default:None)) – Column inadata.obsoradata.var_namesused to color cells.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.