美文网首页RNASeq 数据分析
R 函数学习 - ComBat_seq

R 函数学习 - ComBat_seq

作者: Thinkando | 来源:发表于2020-08-11 08:42 被阅读0次
    image.png

    ComBat-seq:使用经验贝叶斯框架调整批处理效果
    输入raw_count 文件,输出也是count 文件
    安装(我在windows 没有安装成功,在linux 安装成功了)

    # install.packages("devtools")
    devtools::install_github("zhangyuqing/sva-devel")
    

    Basic usage (users need to input at least two parameters - a raw count matrix from RNA-Seq studies, without any normalization or transformation, and a vector for batch separation):

    count_matrix <- matrix(rnbinom(400, size=10, prob=0.1), nrow=50, ncol=8)
    batch <- c(rep(1, 4), rep(2, 4))
    
    adjusted <- ComBat_seq(count_matrix, batch=batch, group=NULL)
    
    image.png
    image.png

    In ComBat-Seq, user may specify biological covariates, whose signals will be preserved in the adjusted data. If the user would like to specify one biological variable, they may use the group parameter:

    group <- rep(c(0,1), 4)
    adjusted_counts <- ComBat_seq(count_matrix, batch=batch, group=group)
    

    If users wish to specify multiple biological variables, they may pass them as a matrix or data frame to the covar_mod parameter:

    cov1 <- rep(c(0,1), 4)
    cov2 <- c(0,0,1,1,0,0,1,1)
    covar_mat <- cbind(cov1, cov2)
    adjusted_counts <- ComBat_seq(count_matrix, batch=batch, group=NULL, covar_mod=covar_mat)
    

    相关文章

      网友评论

        本文标题:R 函数学习 - ComBat_seq

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