Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce split.by? #5

Open
kmshort opened this issue Nov 5, 2020 · 1 comment
Open

Introduce split.by? #5

kmshort opened this issue Nov 5, 2020 · 1 comment

Comments

@kmshort
Copy link

kmshort commented Nov 5, 2020

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.

@shaniAmare
Copy link

I agree too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants