Closed danshu closed 5 years ago
Hi,
Look at the documentation of this function.
SingleR.PlotTsne(SingleR, xy, labels = SingleR$labels, score.thres = 0,
clusters = NULL, do.letters = TRUE, dot.size = 1,
do.labels = FALSE, do.legend = TRUE, label.size = 3, title = "",
colors = singler.colors, font.size = NULL, alpha = 0.5)SingleR.PlotTsne(SingleR, xy, labels = SingleR$labels, score.thres = 0,
clusters = NULL, do.letters = TRUE, dot.size = 1,
do.labels = FALSE, do.legend = TRUE, label.size = 3, title = "",
colors = singler.colors, font.size = NULL, alpha = 0.5)
The second field is xy which is a matrix with two columns and rows as the number of cells. You can use whatever xy you wish. If you want to change the x and y axis labels just do something like:
p = SingleR.PlotTsne(...)
p$p + xlab('UMAP1') + ylab('UMAP2')
Also - the browser uses the field singler@xy - so you can put there whatever you want.
Thanks! This is exactly what I need!
Hi,
I prefer using UMAP for dimension reduction. Would you considering updating "SingleR.PlotTsne" to allow specifying other XY labels instead of tSNE_1 and tSNE_2?
Best, Danshu