7、Cell type annotation

原文鏈接Chapter 12 Cell type annotation

1、概述

  • straightforward annotation approach is to compare the single-cell expression profiles with previously annotated reference datasets.

  • 其中最關鍵的就是reference datasets參考數據
    關于參考數據,本質上就是sce對象,其中colData slot 含有cell type 的 label信息

  • 本文筆記主要基于SingleR包的注釋方法,而且該包也內置了許多 reference data可供使用。

    SingleR 內置數據集概況

2、SingleR注釋

(1)基本方法

#加載待注釋sce
load("fluidigm.clust.RData")
fluidigm.clust

#準備合適的ref data
library(SingleR)
ref <- BlueprintEncodeData()
ref
pred <- SingleR(test=fluidigm.clust, ref=ref, labels=ref$label.main)
#pred <- SingleR(test=fluidigm.clust, ref=ref, labels=ref$label.fine)
table(pred$labels)
  • ref$label.fine provides more resolution at the cost of speed and increased ambiguity in the assignments.
    簡單來說就是reflabel.main分得粗,reflabel.fine分得細
2-1
fluidigm.clust
colnames(colData(fluidigm.clust))
fluidigm.clust$celltype <- pred$labels
table(fluidigm.clust$celltype)
plotReducedDim(fluidigm.clust, dimred="UMAP", colour_by="celltype")
fluidigm.anno <- fluidigm.clust
save(fluidigm.anno,file = "fluidigm.anno.Rdata")

(2)visualization digonosis

  • heatmap
    每一列為細胞與細胞類型(行)的比對情況,列標注取比對值最高對應的細胞類型
plotScoreHeatmap(pred)
plotScoreHeatmap(pred)
  • jitter and violin plots
    showing assignment scores or related values for all cells across one or more labels.
sum(is.na(pred$pruned.labels)) 
#無 pruned cell
plotScoreDistribution(pred)
#black point for each cell
#grey area for cells that were assigned to the label.
#yellow area for other cells not assigned to the label.
plotScoreDistribution(pred)
  • 最后還可以比較下已知注釋分類與singler預測分類的關系
tab <- table(Assigned=pred$pruned.labels, Cluster=fluidigm.clust$Cluster2)
tab
# Adding a pseudo-count of 10 to avoid strong color jumps with just 1 cell.
library(pheatmap)
pheatmap(log2(tab+10), color=colorRampPalette(c("white", "blue"))(101))

ref data from other source

  • 代表性的就是scRNAseq contains many single-cell datasets, many of which contain the authors’ manual annotations.可以用來當做ref data。
library(scRNAseq)
sceM <- MuraroPancreasData()
sceM
#此外要注意的是基因名為Ensemble ID
table(sceM$label)
sceM
  • 待分類數據
#ID轉換:symbol→ensemble
library(AnnotationHub)
edb <- AnnotationHub()[["AH73881"]]
gene.symb <- sub("__chr.*$", "", rownames(sceG))
gene.ids <- mapIds(edb, keys=gene.symb, 
                   keytype="SYMBOL", column="GENEID")
keep <- !is.na(gene.ids) & !duplicated(gene.ids)
sceG <- sceG[keep,]
rownames(sceG) <- gene.ids[keep]
counts(sceG)[1:4,1:4]
sceG
  • 注釋
pred.sceG <- SingleR(test=sceG, ref=sceM, 
                      labels=sceM$label, de.method="wilcox")
table(pred.sceG$labels)

3、其它注釋方法

簡單介紹,不再操作,詳見原文

(1)Assigning cell labels from gene sets

  • A related strategy is to explicitly identify sets of marker genes that are highly expressed in each individual cell.
  • 簡單來說是比較特定細胞代表基因特征與待分類sce的每一個細胞的表達概況的相似度,以AUC曲線為指標確定最符合的cell type

(2)Assigning cluster labels from markers

  • Yet another strategy for annotation is to perform a gene set enrichment analysis on the marker genes defining each cluster.
  • This identifies the pathways and processes that are (relatively) active in each cluster based on upregulation of the associated genes compared to other clusters.
  • 簡單來說,就是對每個clust的marker基因進行go/kegg點的富集分析,通過對應結果的discription確定cell type

以上是第十二章Clustering部分的簡單流程筆記,主要學習了基于SingleR的cell type注釋方法。其它方式詳見原文Chapter 12 Cell type annotation
本系列筆記基于OSCA全流程的大致流程梳理,詳細原理可參考原文。如有錯誤,懇請指正!
此外還有劉小澤老師整理的全文翻譯筆記,詳見目錄

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內容