DESeq2 batch effects with nonuniform design matrix
0
0
Entering edit mode
2.2 years ago
mcsimenc ▴ 20

I'm trying to make a DESeqDataSet for comparing against multiple controls using a design matrix specifying set, group, and batch, where set specifies which set of groups to compare. I want to compare each group vs its control within a set while controlling for batch effects. But sometimes a batch has only one set and other times it has multiple sets.

My design is: design = ~ Group + Set + Batch

The error I'm getting is:

Error in DESeqDataSet(se, design = design, ignoreRank) : 
  design contains one or more variables with all samples having the same value,
  remove these variables from the design

Here is a snippet from my design matrix:
enter image description here

I want to compare:

  • Set1_Group1 vs Set1_Group0
  • Set1_Group2 vs Set1_Group0
  • Set2_Group1 vs Set2_Group0
  • Set3_Group1 vs Set3_Group0

Is it possible to do this?

DESeqDataSet DESeq2 batch • 906 views
ADD COMMENT
1
Entering edit mode

batch1 is perfectly confounded with set1, so you can't separate the effect of batch1 from set1. However, since all of your desired comparisons are within sets, and every set is contained within the same batch, it's likely fine to remove the batch variable.

ADD REPLY
0
Entering edit mode

I see, thanks rpolicastro. I would still want to remove the batch effect for batch 5. Is this possible? If I use only the subset of the design matrix for batch 5 and design = ~ Group + Set + Batch I get the same error.

ADD REPLY
1
Entering edit mode

If you only subset the Batch5 samples, they all have the same batch so nothing can be done.

ADD REPLY
0
Entering edit mode

I understand. Thank you!

ADD REPLY

Login before adding your answer.

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