I would like to try to use SVA with a block design. I've been using SVA in separate non-blocked experiments with similar data, with known artifacts which SVA removes quite well, however I am not quite sure how to use it with blocking. SVA doesn't seem to be aware of blocking, so I just run it first, then added the surrogate vectors to the design, before I run duplicate correlation. This is what I have so far, it seems like it will miss something:
svobj<-sva(exprs(eset),modMMR, modMMR0, method="irw", n.sv=n.sv) modsMMR <-cbind(modMMR,svobj$sv) #my version of duplicateCorrelation that uses the parallel foreach instead of for corfit <- parallel_dupCor(eset,modsMMR,block=pData(eset)$Pair) corfit$consensus lfit <- lmFit(exprs(eset), design=modsMMR, block = pData(eset)$Pair, cor = corfit$consensus) fit<-eBayes(lfit)
I know this post is very old but could you post your code that runs duplicateCorrelation in parallel? I have a very big dataset and can't quite figure out how to update the rho variable in parallel... Thanks!