Extract residuals from DESeq2 fit
1
0
Entering edit mode
MWSchmid • 0
@mwschmid-10936
Last seen 5.3 years ago

Hi there

I'm not sure how it's called what I'm trying to do, but I would like to extract (residuals of) normalized expression/abundance values that are "corrected/adjusted" for certain design factors.

For example, using the regular lm(), I can correct for spatial variation (characterized by a bunch of variables, everything on the right hand side of the tilde) like this:

resid(lm(myVar ~ R+H+I(RR)+I(HH)+I(R*H), data = forTest, na.action = na.exclude))

and then do further analyses or plotting on the residuals.

Is there a way to do something similar directly with DESeq2? I.e., not via using normalized and log2(x+1)-transformed in a separate lm().

Best regards,

Marc

deseq2 residuals • 1.6k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

There isn’t really a residual in a GLM that is similar to the residual in a linear model. I’d recommend working with the VST data if you want to assess the variation in the data before and after controlling for variables.

ADD COMMENT
0
Entering edit mode

Thanks for your help. I will have a look at the VST data.

ADD REPLY
0
Entering edit mode

Though - wouldn't it be possible to use deviances instead of the residuals?

ADD REPLY
0
Entering edit mode

I don’t see how deviances would help here.

ADD REPLY

Login before adding your answer.

Traffic: 833 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6