美文网首页生信分析工具包
去除细胞周期效应——ccRemover包

去除细胞周期效应——ccRemover包

作者: Forest_Lee | 来源:发表于2020-02-29 21:25 被阅读0次

    原文题目:Identifying and removing the cellcycle effect from single-cell RNASequencing data

    #####step1
    ##Normalized Data Matrix
    
    #chooseCRANmirror()
    #install.packages('ccRemover')
    library(ccRemover)
    browseVignettes('ccRemover')
    
    data(t.cell_data)
    dim(t.cell_data)
    head(t.cell_data[,1:5])
    
    summary(apply(t.cell_data,1, mean))
    
    mean_gene_exp <- rowMeans(t.cell_data)
    t_cell_data_cen <- t.cell_data - mean_gene_exp
    summary(apply(t_cell_data_cen,1,mean))
    
    
    #####step2
    ##The cell-cycle genes
    gene_names <- rownames(t_cell_data_cen)
    
    cell_cycle_gene_indices <- gene_indexer(gene_names, species = "mouse", 
                                            name_type = "symbols" )
    length(cell_cycle_gene_indices)
    
    if_cc <- rep(FALSE,nrow(t_cell_data_cen)) 
    if_cc[cell_cycle_gene_indices] <- TRUE
    summary(if_cc)
    
    
    #####step3
    ##Putting it Together
    dat <- list(x=t_cell_data_cen, if_cc=if_cc)
    
    
    #####step4
    ##Applying ccRemover
    xhat <- ccRemover(dat, bar=FALSE)
    
    #The final step here is to add the mean values back to the cleaned data matrix:
    xhat <- xhat + mean_gene_exp
    
    #####step4+
    ##Settings
    #If you choose to run ccRemover not using the default
    #settings the following options are available to you:
    xhat_2 <- ccRemover(dat, cutoff = 3, max_it = 4, nboot = 200, ntop = 10, bar=FALSE)
    

    参考:单细胞天地——在单细胞转录组表达矩阵里面去除细胞周期影响

    相关文章

      网友评论

        本文标题:去除细胞周期效应——ccRemover包

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