[BioC] removeBatchEffect options: design and covariates

Ryan C. Thompson rct at thompsonclan.org
Wed Aug 6 00:18:11 CEST 2014


When calling removeBatchEffect, you should use the same design that you 
used for limma, but with with batch effect term removed from the 
design. Then you would pass the batch effect factor as the batch 
argument instead. So, if the design matrix that you used for limma was 
constructed as:

model.matrix(~Condition + Batch),

then for removeBatchEffect, you would use 
design=model.matrix(~Condition), and batch=Batch. In other words, you 
take the batch effect out of your model design and pass it as the batch 
argument instead.


On Tue 05 Aug 2014 03:12:26 PM PDT, Rao,Xiayu wrote:
> Hello,
> I want to use removeBatchEffect() on the expression data (Elist) prior to drawing a heatmap based on the expression of sig diff genes. Those sig diff genes were generated from limma linear modelling, with the batch factor already included in the linear model.
> I saw people use removeBatchEffect(y, batch=batch) and removeBatchEffect(y, batch=batch, design=design). I  would very much like to know in what condition I should include the design matrix, and when to also include covariates ???  Any comments would be very appreciated.  Thank you in advance!
> removeBatchEffect(x, batch=NULL, covariates=NULL, design=matrix(1,ncol(x),1), ...)
> Thanks,
> Xiayu
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioconductor mailing list