美文网首页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

    ComBat-seq:使用经验贝叶斯框架调整批处理效果输入raw_count 文件,输出也是count 文件安装(...

  • 哈佛R语言课程--3.函数、参数和R包

    学习目标 R语言函数的描述和应用。 使用参数修改R语言函数的默认操作 从R帮助文档获取有关函数的更多信息 创建用户...

  • 学习R记录 <- 函数

    对应《学习R》中第六章,学习之后整理。 本章目标 函数由什么组成,怎么样编写函数 变量的作用域 函数 R允许用户自...

  • R语言_函数认知&R包安装

    主要从以下三方面去学习R语言函数与R包: 1.R语言函数:形式参数实际参数默认参数了解函数的方式2.R包:什么是R...

  • 无标题文章

    广义线性模型 R--glm函数 R语言glm函数学习: 【转载时请注明来源】:http://www.cnblogs...

  • Day-6 I want food

    学习安装R包 R语言中R包的安装都是一个语句#install.packages("") 学习dyplr五个函数的使...

  • E战到底训练营第8期~~第14天

    学习《统计函数》 一、统计函数(Subtotal) 1、基本用法 =SUBTOTAL(function_num,r...

  • 学习小组笔记Day6-Jocelyn

    #2020年7月8日学习笔记 学习R包 ##一、安装R包(dplyr) ##二、使用R包之常用的五个基本函数 ##...

  • 学习小组Day5笔记--慧美

    R语言学习笔记 R语言常识部分 R语句由函数和赋值构成。 R使用 <-,而不是传统的 = 作为赋值符号。 寻求帮助...

  • 007-20180107-【Excel运算函数】求和函数、最值函

    O 今天学习Excel中的运算函数模块,其中主要学习了求和函数、最值函数以及均值函数。 R 看到评论里面小伙伴对我...

网友评论

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

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