DESeq 2 and random effects
1
0
Entering edit mode
avmeo • 0
@avmeo-11566
Last seen 9.3 years ago

Dear all,

I have a question regarding random effects in DESeq2.

I am doing differential expression analysis (disease type A vs. disease type B) with a clinical dataset (50 samples for each disease type).

I want to adjust for sex and a continuous variable telling where the sample was taken and known to affect gene expression (I will call this variable "depth").

So the formula would be ~sex+depth+diseasetype...

BUT some of the patients (NOT ALL) are represented by several samples, each with a different depth (but of course the same sex and same disease type). Collapsing is not an option, since the "depth" information is relevant.

In lme-synthax I would consider the formula:

gene~sex+depth+diseaseoutcome, random=1|idpat,

where idpat stands for the patient's ID.

I tried ~idpat+sex+depth+diseaseoutcome in DESeq2 but get the error message that the model matrix is not full rank (not surprising).  If I remove sex or idpat from the formula, it works fine (not surprising either). But I do need both.

idpat is actually a random effect. Is there any way to include such a random effect in DESeq2?

Many thanks in advance!

Best wishes,

Anne

 

 

 

 

deseq2 • 3.3k views
ADD COMMENT
0
Entering edit mode

Dear Michael,

Thanks a lot for your helpful answer! PCA is a good idea, we will try it.

We have tried limma-voom but had problems with it for other reasons.

Our pheno data essentially looks like this:

PatID   diseasetype  sex  depth

1         A                  f      12

1         A                  f      16

2         A                  m    10

3         B                  m    11

3         B                  m    15

4         A                  f      14

....

diseasetype and sex are the same for all samples of the same patients, but depth varies.

Thanks!

Anne

 

ADD REPLY
0
Entering edit mode

Yes, you can't compare across disease type and control for patient using fixed effects, because these variables are confounded. You can control for sex and depth but not patient here using fixed effects. DESeq2 doesn't have support for random effects.

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 9 days ago
United States

Can you post the column data, so it's easier for me to understand the experimental design?

We do not support random effects in DESeq2. So you won't be able to include patient if it is confounded with diseaseoutcome. Have you done a PCA plot to see how closely the replicate patient samples cluster?

Note that the limma-voom method does allow you to inform the model that samples are correlated using the duplicateCorrelation() function.

ADD COMMENT

Login before adding your answer.

Traffic: 1541 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