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

A question of ggscplot #4

Open
Chen123456-stack opened this issue Oct 23, 2024 · 3 comments
Open

A question of ggscplot #4

Chen123456-stack opened this issue Oct 23, 2024 · 3 comments

Comments

@Chen123456-stack
Copy link

ggscplot(object = pbmc)
Error in geom_blank():
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in FUN():
! data must be uniquely named but has duplicate columns
Run rlang::last_trace() to see where the error occurred.

error occurred when i use ggscplot, could you give me some advise?

@junjunlab
Copy link
Owner

Please supply detailed code or information.

@Chen123456-stack
Copy link
Author

OK, thank you for your reply!
I supply the detailed code as follow:

library(Seurat)
library(ggplot2)
library(ggscatter)
library(ggSCvis)

Load Seurat object

pbmc <- readRDS("./2.after_celltype_anno.rds")

p2 <- ggscplot(object = pbmc) +
geom_scPoint(aes(color = cell_type, cluster = cell_type),
show.legend = FALSE,
label.gp = gpar(fontsize = 8, fontface = "bold.italic")) +
facet_wrap(~group, ncol = 3) +
theme_bw() +
theme(panel.grid = element_blank(),
axis.ticks = element_blank(),
strip.background = element_blank(),
strip.text = element_text(face = "bold.italic", size = rel(1)),
axis.text = element_blank()) +
xlab("")

pbmc was a seurat V5 object
I want to draw a single cell density map using the above code, but the above error occurs

@junjunlab
Copy link
Owner

Please upload your test data, let me have a try.

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