生物信息

To visualize TSNE

2021-07-30  本文已影响0人  不学无数YD
# To visualize
# If cells are too spread out, you can raise the perplexity. If you have few cells, try a lower perplexity
#(but never less than 10).
tiss <- RunTSNE(object = tiss, dims.use = 1:n.pcs, seed.use = 10, perplexity=30, dim.embed = 2)
library(ggplot2)
# note that you can set do.label=T to help label individual clusters
TSNEPlot(object = tiss, group.by = 'channel', pt.size = 0.1)
p1 <- TSNEPlot(object = tiss, group.by = 'channel', pt.size = 0.1)
ggsave("TSNEPlot_1.pdf", plot = p1, width = 15, height = 18)
# note that you can set do.label=T to help label individual clusters
TSNEPlot(object = tiss, pt.size = 0.1)
p2 <- TSNEPlot(object = tiss, pt.size = 0.1)
ggsave("TSNEPlot_2.pdf", plot = p2, width = 15, height = 18)
# note that you can set do.label=T to help label individual clusters
TSNEPlot(object = tiss, group.by = 'tissue', pt.size = 0.1)
p3 <- TSNEPlot(object = tiss, group.by = 'tissue', pt.size = 0.1)
ggsave("TSNEPlot_3.pdf", plot = p3, width = 15, height = 18)
上一篇 下一篇

猜你喜欢

热点阅读