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

Problems trying to generate a kernel density plot with more than 2 genes #28

Open
evaesquinas opened this issue Jun 27, 2024 · 0 comments

Comments

@evaesquinas
Copy link

I want to generate a Kernel Density plot with my scRNAseq data for a particular list of genes. The vignette of this package shows you an example plotting the join density of 2 genes. I have been checking the documentation and it doesn't seem that you have a limit of genes to plot.

However, when I try to add more genes (<2)... I am having problems (it doesn't generate anything).

Example:

library(Seurat)
library(Nebulosa)
data <- SeuratObject::pbmc_small
data <- RunPCA(data)
data <- RunUMAP(data, dims = 1:10)
data <- FindNeighbors(data, dims = 1:10)
data <- FindClusters(data)

# it works
p4 <- plot_density(data, c("CD8A", "RUFY1"), joint = TRUE)
p4 + plot_layout(ncol = 1)

Captura de pantalla 2024-06-27 154517

If I add more genes,, it generates an empty plot (it doesn't give me any error)

p4 <- plot_density(data, c("CD8A", "CCR7", "VDAC3", "TREML1", "CA2", "SDPR", "PPBP", "IGLL5", "GNLY", "CD1C", "S100A9", "RUFY1"), joint = TRUE)
p4 + plot_layout(ncol = 1)

My environment:

  • R version 4.2.2 (2022-10-31 ucrt)
  • Nebulosa_1.0.1
  • patchwork_1.2.0
  • ggplot2_3.5.1
  • SeuratObject_4.1.3
  • Seurat_4.3.0

Could anybody help me, please? Any feedback will be well received.

Thanks very much in advance!

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

1 participant