美文网首页生信
10x Genomics PBMC(五):细胞类型识别

10x Genomics PBMC(五):细胞类型识别

作者: 程凉皮儿 | 来源:发表于2020-06-08 20:20 被阅读0次

    Cell Identification

    clp

    08 June, 2020

    加载上一步获取的R环境变量,

    library(data.table)
    library(ggplot2)
    library(Seurat)
    
    load('filtered_gene_bc_matrices/hg19/02_pbmc3k_cluster.rd') #pbmc
    load('filtered_gene_bc_matrices/hg19/03_pbmc3k_clusterAnalysis.rd') #pbmc.markers,top3,top10
    

    我们利用一些例如已经在细胞ID,FACS分类已经得到了广泛应用的标记基因注释细胞类型。数据集来源于PBMC样本。

    在cluster水平分配细胞类型标识

    幸运的是,在此数据集的情况下,我们可以使用经典标记轻松地将无偏聚类与已知细胞类型相匹配。下表显示了在每个簇中表达的标记基因,并且每个标记与已知的细胞类型相关联。

    Cluster ID Markers Cell Type
    0 IL7R, CCR7 Naive CD4+ T
    1 CD14, LYZ CD14+ Mono
    2 IL7R, S100A4 Memory CD4+
    3 CD8A CD8+ T
    4 MS4A1 B
    5 GNLY, NKG7 NK
    6 FCGR3A, MS4A7 FCGR3A+ Mono
    7 FCER1A, CST3 DC
    8 PPBP Platelet
    marker_genes <- sort(c('IL7R','CD4','CCR7','S100A4','CD14','LYZ','MS4A1','CD8A','CD8B', 'FCGR3A','MS4A7','GNLY','NKG7','FCER1A','CST3','PPBP'))
    
    DoHeatmap(pbmc, features = marker_genes) + NoLegend()
    
    image.png
    
    # enumerate the cell type ID in the following order
    new.cluster.ids <- c("Naive CD4 T", "CD14+ Mono","Memory CD4 T", "CD8 T","B", "NK", "FCGR3A+ Mono", "DC", "Platelet")
    
    # assign name to each element
    names(new.cluster.ids) <- levels(pbmc)
    
    # add the cell type name and choose it as a cluster identity
    pbmc <- RenameIdents(pbmc, new.cluster.ids)
    
    # plot UMAP
    DimPlot(pbmc,
            reduction = "umap", 
            label = TRUE, 
            pt.size = 0.5) + NoLegend()
    #> Warning: Using `as.character()` on a quosure is deprecated as of rlang 0.3.0.
    #> Please use `as_label()` or `as_name()` instead.
    #> This warning is displayed once per session.
    
    image.png

    在细胞水平将细胞类型标识进行指定

    该簇是使用高度可变的基因进行计算分配的。在实际应用中,标记基因对聚类的影响可能不大。一些细胞可能会经历这种转变。因此,在单细胞水平分配类型更为自然。

    在这里,我们使用上面相同的基因标记,并预测基于mRNA的基因表达丰度的每个细胞的细胞类型。我们将使用SCINA来执行此任务。

    任务:进入 website ,安装R包SCINA

    #install.packages("SCINA")
    

    让我们使用基因标记进行细胞识别。

    library(SCINA)
    
    markers <- preprocess.signatures('media/pbmc_simple.csv')
    head(markers)
    #> $Naive_CD4_T
    #> [1] "IL7R" "CCR7"
    #> 
    #> $Memory_CD4_T
    #> [1] "IL7R"   "S100A4" "LTB"   
    #> 
    #> $CD14_Mono
    #> [1] "CD14" "LYZ"  "CST3"
    #> 
    #> $B
    #> [1] "MS4A1"
    #> 
    #> $CD8_T
    #> [1] "CD8A"     "CD8B"     "low_CST3" "low_LYZ" 
    #> 
    #> $FCGR3A_Mono
    #> [1] "FCGR3A" "MS4A7"  "LST1"
    
    pred_cell_ids <- SCINA(pbmc[["SCT"]]@counts,
                           markers,
                           max_iter = 100,
                           convergence_n = 10,
                           convergence_rate = 0.999,
                           sensitivity_cutoff = 0.9,
                           rm_overlap=FALSE,
                           allow_unknown=FALSE,
                           log_file='filtered_gene_bc_matrices/hg19/SCINA.log')
    
    scina_field <- 'cellid_by_scina'
    
    pbmc <- AddMetaData(object=pbmc,metadata=pred_cell_ids$cell_labels,col.name=scina_field)
    Idents(pbmc) <- scina_field
    
    DimPlot(pbmc, 
            reduction = "umap", 
            label = TRUE, 
            pt.size = 0.5)
    
    image.png
    
    # back to seurat_cluster
    Idents(pbmc) <- "seurat_clusters"
    

    保存R变量,这样明天就可以继续工作了。

    save(pbmc, file = "filtered_gene_bc_matrices/hg19/04_pbmc3k_cellid.Rmd",compress = TRUE)
    

    通过feature barcode分配细胞类型标识

    最近,10x Genomics公司提供了 Feature Barcoding technology。用户选择多个抗体。基因表达和足够的蛋白共享相同的cell barcode。我们通过对细胞的基因表达和蛋白质进行分析来分析每个细胞。

    本节要点

    • What is cell-type identification?
    • When cluster level cell type ID is useful?
    • When cell level ID is useful?

    相关文章

      网友评论

        本文标题:10x Genomics PBMC(五):细胞类型识别

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