SVA报错
如果加入分组
library(sva)
batchType=c(rep("case",12),rep("control",12))
model <- model.matrix(~as.factor(group_list))
combat_exp <- ComBat(dat = exp,
batch = batchType,
mod = model,
par.prior=TRUE)
报错:
Error in ComBat(dat = exp, batch = batchType, mod = model, par.prior = TRUE) :
The covariate is confounded with batch! Remove the covariate and rerun ComBat
需要去除分组,即把mod = NULL即可
代码:
library(sva)
batchType=c(rep("case",12),rep("control",12))
model <- model.matrix(~as.factor(group_list))
combat_exp <- ComBat(dat = exp,
batch = batchType,
mod = NULL,
par.prior=TRUE)
赞 (0)
