powellgenomicslab / Nebulosa

R package to visualize gene expression data based on weighted kernel density estimation
89 stars 8 forks source link

A few of advices for this package #12

Open honghh2018 opened 3 years ago

honghh2018 commented 3 years ago

Hi , Thanks to develop the great tools to visulize the scRNA data. I hope the plot_density function can add the split_by parameter in it to display different group data. Besides, i hope the plot_density's legend can set the real value not the converted value ? Hope the package best, hanhuihong

martin-jeremy commented 1 year ago

Hi, as you are inferring kernel density estimation to impute the zero-inflatted matrices of scRNA seq, I don't think it's possible to show the "real value" on the legend.

For the split.by parameter, you can trick it using facetting of ggplot such as:

library(Seurat)
library(Nebulosa)
library(SeuratData)

pbmc3k <- LoadData('pbmc3k', 'pbmc3k.final')

plot_density(pbmc3k, 'CD3E')
plot_density(pbmc3k, 'CD3E') + facet_wrap(~pbmc3k$seurat_annotations)

Hope it helps, Jeremy