Time Series Analysis
1
1
Entering edit mode
CE ▴ 20
@ce-15259
Last seen 3.1 years ago
United States

I have a question about analyzing time series data.

If you use the formula

design(dds) <- ~ time + treat + time:treat
dds <- DESeq(dds, test="LRT", reduced = ~ time)

I understand that you are seeing if treatment causes a change in gene expression at any time point, but for the treated term in the formula, are you finding differences between all treated vs all untreated? Not specifically treated vs untreated at time 0?

It seems like this could cause genes to come back as significantly different because it would look like the sample size is tripled when its actually just the same sample on a different day.

For example, with my own data, I have 3 time points and 2 conditions. If I just compare treated vs untreated using Wald test at time 0, I get ~10 significantly different genes.

If I use the time series analysis to see which genes change over time due to the treatment,

design(dds) <- ~ time + treat + time:treat
dds <- DESeq(dds, test="LRT", reduced = ~ time + treat)

I get 0 genes as different.

When I try to see which genes are different at any time point including time 0 due to treatment,

design(dds) <- ~ time + treat + time:treat
dds <- DESeq(dds, test="LRT", reduced = ~ time)

I now get almost 400 genes as significantly different.

Could this simply be because I've tripled my data set comparing treated to untreated, or is something else going on?

Here's an example of my colData:

 sample time treat P000D0_S00_gd 0 yes P000D0_S00_gd 1 yes P000D0_S00_gd 2 yes P002D0_S0_gd 0 no P002D0_S0_gd 1 no P002D0_S0_gd 2 no P004D0_S4_gd 0 yes P004D0_S4_gd 1 yes P004D0_S4_gd 2 yes P006D1_S00_gd 0 no P006D1_S00_gd 1 no P006D1_S00_gd 2 no P007D1_S02_gd 0 no P007D1_S02_gd 1 no P007D1_S02_gd 2 no P008D1_merged 0 no P008D1_merged 1 no P008D1_merged 2 no P001D0_merged_gd 0 yes P001D0_merged_gd 1 yes P001D0_merged_gd 2 yes P002D0_S0_gd 0 yes P002D0_S0_gd 1 yes P002D0_S0_gd 2 yes

Thanks for your help on this!

timecourse deseq2 • 546 views
0
Entering edit mode
@mikelove
Last seen 7 hours ago
United States

Your first reduced design above, where you remove treatment as well as its interaction with time in the reduced model, is testing if there is any effect of treatment at any time point include time=0. In the time series example in the workflow, we include the effect of treatment as time=0 to control for these differences, so we use the second reduced design you have above.

If you want to test the treatment effect only at time=0, you can use a Wald test easily:

res <- results(dds, name="treat_yes_vs_no", test="Wald")