美文网首页
03.查看不同粒度下的分群走向

03.查看不同粒度下的分群走向

作者: 科研小徐 | 来源:发表于2022-03-16 00:02 被阅读0次
    在对粒度进行选择或注释存在疑问时,往往需要对粒度进行调整,为方便的查看不同粒度下的细胞走向,使用以下代码进行可视化。
    rm(list = ls())
    library(Seurat)
    # devtools::install_github('satijalab/seurat-data')
    library(SeuratData)
    library(ggplot2)
    library(patchwork)
    library(dplyr)
    load(file = 'basic.sce.pbmc.Rdata')
    DimPlot(pbmc, reduction = 'umap', 
            label = TRUE, pt.size = 0.5) + NoLegend()
    sce=pbmc
    #先执行不同resolution 下的分群
    library(Seurat)
    library(clustree)
    sce <- FindClusters(
      object = sce,
      resolution = c(seq(.1,1.6,.2)) #起始粒度,结束粒度,间隔
    )
    clustree(sce@meta.data, prefix = "RNA_snn_res.")
    
    image

    参考来源:
    https://mp.weixin.qq.com/s/WRhMC3Ojy1GWYfLS_4vSeA

    鸣谢:
    I thank Dr.Jianming Zeng(University of Macau), and all the members of his bioinformatics team, biotrainee, for generously sharing their experience and codes.

    问题交流:
    Email: xuran@hrbmu.edu.cn

    相关文章

      网友评论

          本文标题:03.查看不同粒度下的分群走向

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