美文网首页单细胞测序
ROGUE:计算单细胞数据中细胞群的纯度(异质性)

ROGUE:计算单细胞数据中细胞群的纯度(异质性)

作者: Hayley笔记 | 来源:发表于2022-02-23 11:56 被阅读0次

    在非监督的单细胞数据分析中,给定细胞cluster的均一性往往是不清楚的,也就是说我们并不知道分出的一个cluster中是否是一种细胞,还是依然包含了多种细胞。因此有人提出了cluster purity的概念,并建立了一个新的方法ROGUE来计算给定的细胞cluter是否是一个纯度较高的均一细胞群。
    文章链接:An entropy-based metric for assessing the purity of single cell populations

    1. R包安装
    install.packages("tidyverse")
    if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")
    devtools::install_github("PaulingLiu/ROGUE")
    
    2. 演示数据下载

    数据集来自文献Single-Cell Transcriptomics of Human and Mouse Lung Cancers Reveals Conserved Myeloid Populations across Individuals and Species

    演示数据:expression matrixmeta information.

    3. 分析
    载入R包
    suppressMessages(library(ROGUE))
    suppressMessages(library(ggplot2))
    suppressMessages(library(tidyverse))
    
    导入数据
    • 表达矩阵的格式:行是基因,列是细胞。表达值应该是UMI counts (droplet-based datasets) 或 TPM (full-length based datasets)。
    • mata矩阵中的ct是细胞类型,和第一列的病人一一对应(也就是每个细胞是来自哪个病人的信息)
    expr <- readRDS("DC.rds")
    meta <- readRDS("info.rds")
    expr[1:5, 1:4]
    ##       _p1t1__bcGDSJ _p1t1__bcDRQX _p1t1__bcFPXB _p1t1__bcHVVV
    ## A2M               0             0             0             0
    ## A2ML1             0             0             0             0
    ## AAAS              0             0             0             0
    ## AACS              0             0             0             0
    ## AAGAB             0             0             0             0
    head(meta)
    ### A tibble: 6 × 26
    ##  Patient Tissue `Barcoding emulsion` Library Barcode `Total counts` `Percent counts from mi… `Most likely LM22 … `Major cell typ… ct   
    ##  <chr>   <chr>  <chr>                <chr>   <chr>            <dbl>                    <dbl> <chr>               <chr>            <chr>
    ## 1 p1      tumor  p1t                  p1t1    bcGDSJ            4731                     6.47 Dendritic cells re… tMoMacDC         tDC2 
    ## 2 p1      tumor  p1t                  p1t1    bcDRQX            1212                     5.28 Monocytes           tpDC             tpDC 
    ## 3 p1      tumor  p1t                  p1t1    bcFPXB            2639                     5.15 B cells memory      tpDC             tpDC 
    ## 4 p1      tumor  p1t                  p1t1    bcHVVV            2978                     2.89 Eosinophils         tpDC             tpDC 
    ## 5 p1      tumor  p1t                  p1t1    bcGJVN            1509                     5.04 B cells memory      tpDC             tpDC 
    ## 6 p1      tumor  p1t                  p1t1    bcFSSY            3369                     5.05 Dendritic cells ac… tMoMacDC         tDC3 
    
    过滤低质量细胞
    expr <- matr.filter(expr, min.cells = 10, min.genes = 10)
    
    Expression entropy model

    为了使用S-E模型,首先使用SE_fun功能计算每个基因的expression entropy

    ent.res <- SE_fun(expr)
    head(ent.res)
    ## A tibble: 6 × 7
    #   Gene     mean.expr entropy   fit    ds p.value p.adj
    #   <chr>        <dbl>   <dbl> <dbl> <dbl>   <dbl> <dbl>
    # 1 LYZ           1.65   0.762 1.27  0.510       0     0
    # 2 HLA-DQB2      1.35   0.569 1.01  0.437       0     0
    # 3 BIRC3         1.21   0.458 0.886 0.428       0     0
    # 4 HSPA1A        1.54   0.766 1.17  0.406       0     0
    # 5 HLA-DRB1      2.99   2.24  2.59  0.353       0     0
    # 6 GZMB          1.26   0.586 0.931 0.345       0     0
    
    S-E plot

    使用SEplot功能去可视化S和E的关系

    SEplot(ent.res)
    

    The identified highly informative genes could be applied to both clustering and pseudotime analyses.

    ROGUE calculation

    使用CalculateRogue功能去计算VOGUE值以评估DC群的纯度

    rogue.value <- CalculateRogue(ent.res, platform = "UMI")
    rogue.value
    ## [1] 0.7219202
    

    这个细胞群的ROGUE值是0.72,提示了它们的异质性

    Calculate the ROGUE value of each putative cluster for each sample

    为了得到对各个cluster纯度的精确评估,作者推荐区分样本来源计算各细胞类型ROGUE值

    rogue.res <- rogue(expr, labels = meta$ct, samples = meta$Patient, platform = "UMI", span = 0.6)
    rogue.res
    #         tDC2      tpDC      tDC3      tDC1
    # p1 0.8376831 0.8604547 0.8494896 0.8481964
    # p2        NA        NA        NA        NA
    # p3 0.8028900 0.8941508 0.8995863 0.9150546
    # p4 0.8041421 0.8992421 0.8763108 0.8658948
    # p5 0.8702724 0.9321946 0.9247687        NA
    # p6 0.8596472        NA 0.8892388 0.9280764
    # p7 0.9262411 0.9028763 0.8949111 0.9419589
    
    ROGUE值 可视化
    rogue.boxplot(rogue.res)
    

    参考:
    https://htmlpreview.github.io/?https://github.com/PaulingLiu/ROGUE/blob/master/vignettes/ROGUE_Tutorials.html
    https://www.jianshu.com/p/1ddf52885833

    相关文章

      网友评论

        本文标题:ROGUE:计算单细胞数据中细胞群的纯度(异质性)

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