Search
Question: Scater normalizeExprs() batch effect
0
gravatar for Jenn
10 months ago by
Jenn20
Jenn20 wrote:

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! 

ADD COMMENTlink modified 10 months ago by Aaron Lun19k • written 10 months ago by Jenn20
1
gravatar for Aaron Lun
10 months ago by
Aaron Lun19k
Cambridge, United Kingdom
Aaron Lun19k wrote:

Anything in the design matrix gets regressed out (as residuals are returned), so you don't want to put in features of interest. If you want more control, you can apply removeBatchEffect (from the limma package) on the expression matrix yourself, to define which variables to keep and which variables to remove.

ADD COMMENTlink modified 10 months ago • written 10 months ago by Aaron Lun19k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 245 users visited in the last hour