Nebulosa icon indicating copy to clipboard operation
Nebulosa copied to clipboard

Introduce split.by?

Open kmshort opened this issue 3 years ago • 1 comments

Hi, Thanks for this very handy tool for cluster exploration. It would be most useful if a "split.by" function could be added to Nebulosa, with behaviour similar to Seurat's split.by options for featureplot & dimplot, where plots can be partitioned by the factors/levels that are provided. ggplot2 facet_wrap() will take plot_density output and split by factor: plot_density(someSeuratObject, "CD4") + facet_wrap(someSeuratObject$orig.ident) but as Nebulosa density is calculated feature-wise for all cells in the object, the Nebulosa viridus overlay is duplicated and overlayed on each facet. So, something like: plot_density(someSeuratObject, "CD4", split.by = "orig.ident") would be nice, with densities calculated for each "orig.ident" and overlayed accordingly. This would be a really nice addition and provide a naming convention from Seurat.

kmshort avatar Nov 05 '20 03:11 kmshort