Question: Extract residuals from DESeq2 fit
0
gravatar for MWSchmid
3 months ago by
MWSchmid0
MWSchmid0 wrote:

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 • 142 views
ADD COMMENTlink modified 3 months ago by Michael Love26k • written 3 months ago by MWSchmid0
Answer: Extract residuals from DESeq2 fit
0
gravatar for Michael Love
3 months ago by
Michael Love26k
United States
Michael Love26k wrote:

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 COMMENTlink written 3 months ago by Michael Love26k

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

ADD REPLYlink written 3 months ago by MWSchmid0

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

ADD REPLYlink written 3 months ago by MWSchmid0

I don’t see how deviances would help here.

ADD REPLYlink written 3 months ago by Michael Love26k
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 16.09
Traffic: 403 users visited in the last hour