HaojiaWu / plot1cell

A R package for advanced single cell data viz
MIT License
38 stars 22 forks source link

object 'UMAP1' not found when running complex_featureplot #8

Open pandaqiuqiu opened 6 months ago

pandaqiuqiu commented 6 months ago

When I ran the complex_featureplot function, I encountered the following error:

complex_featureplot(object, features = genes, group = "Group", order = T)

"Error in geom_point(): ! Problem while computing aesthetics. i Error occurred in the 1st layer. Caused by error in FUN(): ! object 'UMAP1' not found Run rlang::last_trace() to see where the error occurred."

However, my object@reductions contains UMAP information.

image

I used the following code to change 'umap' to 'UMAP', yet the error persists. object@reductions$UMAP <- object@reductions$umap

How can I resolve this issue? Thank you.

HaojiaWu commented 6 months ago

Hi @pandaqiuqiu After you did this:

object@reductions$umap <- object@reductions$UMAP

Can you do one additional steps and see if the error goes away?

colnames(object@reductions$umap@cell.embeddings) <- c("UMAP_1", "UMAP_2")

I will fix it to make it more flexible on the dimension selection on the next release.

pandaqiuqiu commented 6 months ago

Hi @pandaqiuqiu After you did this:

object@reductions$umap <- object@reductions$UMAP

Can you do one additional steps and see if the error goes away?

colnames(object@reductions$umap@cell.embeddings) <- c("UMAP_1", "UMAP_2")

I will fix it to make it more flexible on the dimension selection on the next release.

Yes, @HaojiaWu it's working now. Thank you for your prompt reply. Looking forward to the next release, it's sure to be even better.