I have been reading lots of posts about DESeq2 and time course/repeated measures experiment but I still cannot find the answer to my question. The fact that measures are repeated on the same set of samples is rarely mentionned but it seems crucial to me. My design is similar to the one in the table below : (3 Groups) x (3 Time points) x (more than 2 subjects per Group):
I would like to identify the differentially expressed genes at (at least) 1 time point between any pairs of Group while taking the intra-subject variability into account. Is it correct to use the code below?
dds <- DESeqDataSet(data, ~ Subject + Time + Group + Group:Time)ddsLRT <- DESeq(dds, test="LRT", reduced = ~ Subject + Time + Group) resLRT <- results(ddsLRT)
If I understood correctly, I will get a unique p-value per gene for the signifiance of the global test (differentially expressed at (at least) 1 time point between at least one pair of Group while taking the intra-subject variability into account).
Would it then be correct to perfom kind of post-hoc test using
res <- results(dds)
and changing the contrasts to get all desired comparisons?
I hope that I am being clear, don't hesitate to ask otherwise as it is my first post here.