I have a question about how to write the design matrix for normalizeExprs(). Do I include only the uninteresting variables/factors that I wanted to control for in the design matrix or should I also include the condition that I am interested in seeing the effect?
design=model.matrix(~batch)
example_sceset <- normaliseExprs(example_sceset, design=design)
or
design=model.matrix(~batch+condition)
example_sceset <- normaliseExprs(example_sceset, design=design)
This is the detail from the scater manual
design: design matrix defining the linear model to be fitted to the normalised expression values. If not NULL, then the residuals of this linear model fit are used as the normalised expression values.
Thanks!