You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are feeding a diverging palette to sequential.palette parameter. Normally, this should throw an error, but somehow it is not happening. I will fix that for the next update.
Since the error is not being called, you actually get the side effect of the diverging palette being treated as sequential, for which I add a white and black end to the palette. That is why you are getting the error.
I did not intend this function to accept diverging palettes, as I thought there was no use case for it. I will implement its usage for the next update. For now, I would suggest you to use a sequential palette.
However, if you really want to use it with a diverging palette, given the side effect, you can just remove the behaviour of adding the white and black end to sequential color palettes with:
options("SCpubr.ColorPaletteEnds" = FALSE)
This should give you the output you want. But please, be mindful that when I update to fix this side effect, this will no longer work. Here is an example:
Current behaviour
options("SCpubr.ColorPaletteEnds" = TRUE)
SCpubr::do_DotPlot(sample, features = Seurat::VariableFeatures(sample)[1:10], sequential.palette = "RdBu")
Hotfix
options("SCpubr.ColorPaletteEnds" = FALSE)
SCpubr::do_DotPlot(sample, features = Seurat::VariableFeatures(sample)[1:10], sequential.palette = "RdBu")
Hope that works! Feel free to reopen the issue if not!
I am running the following code:
do_DotPlot(alldata,features = c("P2RY12","CX3CR1","TMEM119","CSF1R","CD3E","TNF","TNFSF10","IFNG","GZMA","PRF1","FASLG","NKG7","CD163","TGFB1","IL10","HAVCR2","TIGIT","LAG3","PDCD1","CD274","LAIR1","STAT3","ITGAX","HLA-DRA","B2M","TAPBP","HSPA5","CALR","CIITA","CD14","MRC1","FCGR3A","FCGR1A","ITGAV"),sequential.palette = "RdGy",dot_border = TRUE,scale = TRUE,scale.by = "size")+ theme(axis.text.x = element_text(angle = 90,face = "plain",hjust=1,vjust = 0.5),axis.text.y = element_text(face = "plain"),panel.border = element_rect(colour = "black", fill=NA, size=1),legend.text = element_text(face = "plain"))
and the -2 value is showing as white instead of dark red, this is occur with all the diverging color palettes.
The text was updated successfully, but these errors were encountered: