**20**wrote:

Hi,

I am writing to clarify on the design matrix for running edgeR on data with multiple time points with two conditions.

```
condition time Group
```

sample1 condition1 T0 c1.to sample2 condition2 T0 c2.t0 sample3 condition1 T1 c1.t1 sample4 condition2 T1 c2.t1 sample5 condition1 T2 c1.t2 sample6 condition2 T2 c2.t2

Following section 3,3 in the edgeR manual, to find differentially expressed genes between condition1 and condition2 at baseline, T0,T1 andT2, the contrasts used are for example:

```
my.contrasts <- makeContrasts(
c1.vs.c2.baseline = c1.t0-c2.t0,
c1.vs.c2.T1 = (c1.t1-c1.t0)-(c2.t1-c2.t0),
c1.vs.c2.T2 = (c1.t2-c1.t0)-(c2.t2-c2.t0),
levels=design
)
lrt0<- glmLRT(fit, contrast=my.contrasts[,"c1.vs.c2.baseline"])
lrt1<- glmLRT(fit, contrast=my.contrasts[,"c1.vs.c2.T1"])
lrt2<- glmLRT(fit, contrast=my.contrasts[,"c1.vs.c2.T2"])
```

Can you please let me know if I should be using any different approach for the comparisons.

Thanks for all the help. Sharvari

**37k**• written 5 months ago by sharvari gujja •

**20**

Two quick comments.

First, if the edgeR User's Guide already tells you what to do, what is your question? Why would the advice of the User's Manual not be correct?

Second, we can't tell what your experiment design is or how you have created your design matrix, so we don't have any way to give you advice. It looks like the 3 lines of your question after the first sentence have become garbled by markdown. I can't make sense of them. What did you want to tell us?

37kMy question was to get your feedback about the approach I am using for this multiple time point data analysis, as I have not analyzed time series data before. Or, if you recommend using ANOVA-like test instead.

Sorry about the garbled text. The conditions at different time points are:

Thank you for helping.

20You still haven't said what your design matrix is -- I am assuming it is

`design <- model.matrix(~0+Group)`

.Your experiment doesn't have any replication (6 treatment groups and 6 samples). How were you planning to estimate the dispersion without replicates?

You do have to make your own decisions about which experimental groups you want to compare. It is your experiment after all.

37kDear Gordan, Thank you for the reply, The data is single cell RNAseq data where condition1 is genotype1 and condition2 is genotype2 for three time points.

The data is processed for edgeR analysis using the workflow mentioned in the link below: https://bioconductor.org/packages/release/bioc/vignettes/zinbwave/inst/doc/intro.html#differential-expression-with-edger

Yes,that's the design matrix. To perform ANOVA like testing to find differences between genotype1 and genotype2 across three timepoints, I am creating contrast matrix as:

My questions are: 1. Is the contrast matrix correct to find differences across time points between two genotypes? 2. What kind of post hoc test would you recommend to follow up one-way ANOVA analysis?

Thank you for your feedback.

20