To visualize TSNE

作者: 不学无数YD | 来源:发表于2021-07-30 13:56 被阅读0次
    # 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)
    

    相关文章

      网友评论

        本文标题:To visualize TSNE

        本文链接:https://www.haomeiwen.com/subject/dtzqvltx.html