SVA package: remove batch effects using ComBat
0
0
Entering edit mode
Tim Smith ★ 1.1k
@tim-smith-1532
Last seen 7.9 years ago
Hi, I was exploring batch effects in my data. At this stage, I don't want to introduce the 'variable of interest' (i.e. 'cancer' in the vignette/example given in sva.pdf that is used to get 'mod' - the model matrix). Should I use the mod0 matrix (i.e. the NULL matrix) as an input to the ComBat function (and get combat_edata2)? Will this correctly reflect the expression data corrected for batch effects? ###### Code ##### library(sva) library(bladderbatch) data(bladderdata) library(pamr) library(limma) pheno = pData(bladderEset) edata = exprs(bladderEset) mod = model.matrix(~as.factor(cancer), data=pheno) mod0 = model.matrix(~1,data=pheno) batch0 <- c(rep(1,12),rep(2,15),rep(3,30)) ## use mod combat_edata = ComBat(dat=edata, batch=batch, mod=mod, numCovs=NULL, par.prior=TRUE) ### use mod0 combat_edata2 = ComBat(dat=edata, batch=batch0, mod=mod0, numCovs=NULL, par.prior=TRUE) ################## thanks! [[alternative HTML version deleted]]
sva sva • 1.7k views
ADD COMMENT

Login before adding your answer.

Traffic: 182 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6