Dear all,
I am performing a differential expressed genes analysis using DESeq2
and I want to correct the design by donor and by season (winter vs. summer where the extraction was done). The problem is that the the donor corresponds with the season in sets.
An example of data is:
id time season sp1 ID_003 0 W sp2 ID_003 4 W sp3 ID_003 6 W sp4 ID_003 8 W sp5 ID_004 0 W sp6 ID_004 4 W sp7 ID_004 6 W sp8 ID_004 8 W sp9 ID_005 0 S sp10 ID_005 4 S sp11 ID_005 6 S sp12 ID_005 8 S [...]
For hence, when I add the design ~ id + time*season
, DESeq
returns the following error:
R> dds.blood <- DESeqDataSetFromMatrix( + countData = counts, + colData = desc, + design = ~ id + plate_batch + flowcell + time + season + time:season + ) Error in checkFullRank(modelMatrix) : the model matrix is not full rank, so the model cannot be fit as specified. One or more variables or interaction terms in the design formula are linear combinations of the others and must be removed. See the section 'Model matrix not full rank' in vignette('DESeq2')
So my questions is: There is a right way to correct by donor in this case were season corresponds in block with the donor? I'm using DESeq2_1.8.1
As the error suggest I read the section Model matrix not full rank from DESeq2
's vignette and I followed the instruction:
<<In both of these cases, the batch effect cannot be fit and must be removed from the model formula.>>
So I removed the id
from the model. But I want to be sure this is the correct way to follow up in my case.