美文网首页单细胞测序专题集合
scHCL || 鉴定人的单细胞数据细胞类型

scHCL || 鉴定人的单细胞数据细胞类型

作者: 生信编程日常 | 来源:发表于2021-03-24 20:00 被阅读0次
    install.packages('devtools')
    library(devtools)
    # scHCL requires ggplot2/reshape2/plotly/shiny/shinythemes/shiny
    install_github("ggjlab/scHCL")
    
    #示例数据
    library(scHCL)
    # hcl_lung is an example expression matrix from HCL project.
    data(hcl_lung)
    dim(hcl_lung)
    #[1] 2884   80
    ## 2884 genes expression value of 80 cells
    
    # scHCL has two parameters , single cell expression matrix(scdata) and 
    # the number of most similar cell types
     hcl_result <- scHCL(scdata = hcl_lung, numbers_plot = 3)
    

    以自己的seurat对象的分群来鉴定细胞类群

    CM.mt<-cbind(as.data.frame(CM.mt@meta.data$seurat_clusters),as.matrix(t(GetAssayData(seurat.object,slot = "data"))))
    colnames(CM.mt)[1]<-"cluster"
    CM.mt<-aggregate(.~cluster,CM.mt,mean)
    rownames(CM.mt)<-CM.mt$cluster
    CM.mt<-CM.mt[,-1]
    CM.mt<-t(CM.mt)
    hcl_result <- scHCL(scdata = CM.mt, numbers_plot = 3)
    head(hcl_result$scHCL_probility,15)
    

    参考:https://github.com/ggjlab/scHCL

    相关文章

      网友评论

        本文标题:scHCL || 鉴定人的单细胞数据细胞类型

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