目前該軟件只支持Mouse和Human,不支持其他物種,因此不是這兩個物種的小伙伴可以不用看了。
scCATCH全稱是single cell Cluster-based Annotation Toolkit for Cellular Heterogeneity,是一個用于實現(xiàn)單細胞轉(zhuǎn)錄組聚類結(jié)果進行注釋的工具。軟件核心函數(shù)是和scCATCH,findmarkergenes則是輔助用于尋找標(biāo)記。
目前該軟件托管在GitHub上,因此需要使用devtools::install_github()進行安裝,或者直接從GitHub上下載代碼使用install.packages()進行安裝。我在測試這個R包發(fā)現(xiàn)它直接使用目前原作者已經(jīng)修復(fù)了該問題as.data.frame轉(zhuǎn)換Seurat的稀疏矩陣,而R在轉(zhuǎn)換非常大的稀疏矩陣時會報錯,因此我fork了一份代碼,并做了相應(yīng)的修改,希望原作者能夠合并我的PR。
# 原版
devtools::install_github("ZJUFanLab/scCATCH")
# 修改版本
#devtools::install_github("xuzhougeng/scCATCH")
我們下載10X genomics官網(wǎng)上的一份數(shù)據(jù),地址為http://cf.10xgenomics.com/samples/cell-exp/3.0.2/5k_pbmc_v3/5k_pbmc_v3_filtered_feature_bc_matrix.h5
然后以https://satijalab.org/seurat/v3.1/pbmc3k_tutorial.html的步驟進行數(shù)據(jù)預(yù)處理
library(Seurat)
library(scCATCH)
h5_file <- "F:/5k_pbmc_v3_filtered_feature_bc_matrix.h5"
# Load the PBMC dataset
#pbmc.data <- Read10X(data.dir = "../data/pbmc3k/filtered_gene_bc_matrices/hg19/")
pbmc.data <- Read10X_h5(h5_file)
# Initialize the Seurat object with the raw (non-normalized data).
pbmc <- CreateSeuratObject(counts = pbmc.data, project = "pbmc3k", min.cells = 3, min.features = 200)
pbmc
pbmc[["percent.mt"]] <- PercentageFeatureSet(pbmc, pattern = "^MT-")
VlnPlot(pbmc, features = c("nFeature_RNA", "nCount_RNA", "percent.mt"), ncol = 3)
pbmc <- subset(pbmc, subset = nFeature_RNA > 500 & nFeature_RNA < 5000 & percent.mt < 20)
pbmc <- NormalizeData(pbmc, normalization.method = "LogNormalize", scale.factor = 10000)
pbmc <- FindVariableFeatures(pbmc, selection.method = "vst", nfeatures = 2000)
all.genes <- rownames(pbmc)
pbmc <- ScaleData(pbmc, features = all.genes)
pbmc <- RunPCA(pbmc, features = VariableFeatures(object = pbmc))
ElbowPlot(pbmc)
pbmc <- FindNeighbors(pbmc, dims = 1:10)
pbmc <- FindClusters(pbmc, resolution = 0.2)
pbmc <- RunUMAP(pbmc, dims = 1:10)
DimPlot(pbmc, label = TRUE)
以UMAP對聚類結(jié)果進行可視化展示

接下來,使用findmarkergenes尋找每個cluster的差異基因。這一步的運行時間比較長,因為每個cluster都需要和其他的所有cluster按個比較,然后確定出當(dāng)前cluster的特異基因。
clu_markers <- findmarkergenes(pbmc,
species = "Human",
cluster = 'All',
match_CellMatch = FALSE,
cancer = NULL,
tissue = NULL,
cell_min_pct = 0.25,
logfc = 0.25,
pvalue = 0.05)
最終得到的clu_markers是一個list,包括一個新的表達量矩陣(基于NCBI最新的Gene Symbols,并移除重復(fù)和不匹配的基因) 以及一個包括每個cluster的所有潛在標(biāo)記基因。
之后使用scCATCH根據(jù)標(biāo)記基因?qū)垲愡M行注釋
clu_ann <- scCATCH(clu_markers$clu_markers,
species = "Human",
cancer = NULL,
tissue = "Blood")
輸出的clu_ann能用來修改原來的注釋信息,代碼如下
new.cluster.ids <- clu_ann$cell_type
names(new.cluster.ids) <- clu_ann$cluster
pbmc <- RenameIdents(pbmc, new.cluster.ids)
DimPlot(pbmc, reduction = "umap", label = TRUE, pt.size = 0.5) + NoLegend()
注釋結(jié)果如下

根據(jù)Seurat的教程,這個注釋可能有一些問題,比如說T細胞,NK細胞沒有正確注釋。

我覺得這可能是我選擇的組織不對,所以我重新以"Blood", "Bone marrow"兩個數(shù)據(jù)集進行注釋
clu_ann <- scCATCH(clu_markers$clu_markers,
species = "Human",
cancer = NULL,
tissue = c("Blood", "Bone marrow"))
雖然結(jié)果還是有一些問題,但是和預(yù)期結(jié)果比較接近了。

scCATCH文章里提到它的注釋準(zhǔn)確度其實非常高的,因此我這一次找到了文章里的測試腳本https://github.com/ZJUFanLab/scCATCH_performance_comparison/blob/master/scCATCH/scCATCH.R
根據(jù)腳本設(shè)置了參數(shù),也就是選擇'Blood','Peripheral blood','Bone marrow'作為組織類型
clu_ann <- scCATCH(clu_markers$clu_markers,
species = "Human",
cancer = NULL,
tissue = c('Blood','Peripheral blood','Bone marrow'))
這一次大部分的細胞都被正確注釋

因此想要用好這個軟件,需要非常注意組織類型的選擇。如果你發(fā)現(xiàn)注釋和預(yù)期不符,你可能沒有漏了一些組織。
更多和scCATCH有關(guān)的參數(shù)閱讀,請移步https://github.com/ZJUFanLab/scCATCH
引用信息:
Shao et al., scCATCH:Automatic Annotation on Cell Types of Clusters from Single-Cell RNA Sequencing Data, iScience, Volume 23, Issue 3, 27 March 2020. doi: 10.1016/j.isci.2020.100882. PMID:32062421