ROGUE:計算單細胞數據中細胞群的純度(異質性)

在非監督的單細胞數據分析中,給定細胞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
http://www.lxweimin.com/p/1ddf52885833

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
禁止轉載,如需轉載請通過簡信或評論聯系作者。

推薦閱讀更多精彩內容