Hide cells like split.by from Seurat


One of my cell types exists in very little abundance and I believe it would be easier if I could see where it is located in the UMAP by hiding other cells, which can be done in Seurat with the split.by argument. I could not find any similar function in the pl.umap documentation.

I have also tried subsetting each cell type and run the UMAP, but the cell distribution in the new objects seem very different from the original. Any workaround this?

How about:

sc.pl.umap(adata, color="celltype", groups=("rare_celltype",))

For example:

pbmc = sc.datasets.pbmc3k_processed()
sc.pl.umap(pbmc, color="louvain", groups=("B cells",))

We’re thinking of ways to have better support for having orthogonal masks and coloring, but there are workarounds. This has previously been discussed in this issue, and I think a few other places on the repo.