**530**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

**32k**• written 3.3 years ago by Rao,Xiayu •

**530**