Hey Lisa,
You have already controlled for time via the inclusion of timepoint in the design formula. You have also done your pairwise comparisons, presumably like this:
res1 <- results(dds, contrast=c("timepoint", "T1", "T0"), independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=FALSE)
res1 <- lfcShrink(dds, contrast=c("timepoint", "T1", "T0"), res=res1)
res2 <- results(dds, contrast=c("timepoint", "T2", "T0"), independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=FALSE)
res2 <- lfcShrink(dds, contrast=c("timepoint", "T2", "T0"), res=res2)
res3 <- results(dds, contrast=c("timepoint", "T3", "T0"), independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=FALSE)
res3 <- lfcShrink(dds, contrast=c("timepoint", "T3", "T0"), res=res3)
If you want to do ANOVA between the timepoints, do:
dds <- DESeq(ddsMat, test="LRT", reduced=~SampleID + timepoint)
res <- results(dds)
----------------------------------------------
The remaining part that you're asking is not strictly covered in DESeq2. I would first transform the normalised counts via rlog() (set blind=FALSE) and then you have a few choices:
- simply plot the distribution of your genes across each
time-point as a bar, box-and-whisker, or line plot. You can then perform further tests on these
- for each gene of interest, independently fit a separate model (e.g. via localised
regression) in which your
timepoint factor is ordered based
on time (so, factor(timepoint, levels=c('T0', 'T1', 'T2', ...)). You can then simply compare these 'gene' models and obtain p-values that
way. This would address the question: 'Does GeneX's path across the
timepoint differ to that of GeneY?"
Kevin