# Differential gene expression analysis of time series with replicates

I have a dataset that has two groups, perturbed vs control. Each group has 3 replicates. Each replicate has 8 time points. How do we do Differential gene expression analysis to find significantly expressed genes? Any packages in R or web tools etc?

R packages like DESeq2, edgeR, and sleuth will help you perform differential gene expression analysis. These are typically used for control-vs-treatment experimental designs. So you could use them like this and perform a bunch of pair-wise comparisons between the time points (i.e. what are the differentially expressed genes between timepoint $$t_0$$ and timepoint $$t_1$$, $$t_0$$ and $$t_2$$, etc.).

But all of these methods make use of generalized linear models to perform the statistical inference on coefficients. For the simple control-vs-treatment design, above, this looks something like

$$g \left(\mathbb{E} \left[Y_i | X \right] \right) = \mu_i + \beta_i X$$

where $$g$$ is the link function, $$\mu_i$$ is the mean expression of gene $$i$$, $$\beta_i$$ is the expression fold change estimate, and $$X$$ is the indicator variable saying if the sample is a treatment or control sample.

You can modify this equation by adding a time component to it.

$$g \left(\mathbb{E} \left[Y_i | X \right] \right) = \mu_i + \beta_i^{(group)} X + \beta_i^{(time)} t$$

If you specify the timepoint of the sample in the experimental design matrix for DESeq2, edgeR, or Sleuth, you can get information about the effect of the perturbation as well as the effect over time.

You can try more complicated designs, too, like a coefficient for the interaction between timepoint and perturbation status, but with 3 replicates in each, it's probably best to stick with simple, linear models.