# LRT or LRT-like test on cyclical (Sleep) data

I have RNA-Seq data from 4 time points (3 hours awake, 9 hours awake, 3 hours asleep, 9 hours asleep). I'm interested in doing something similar to a LRT where genes are found to be significant if they changed at any point in the time course.

However, I'm not sure how to do this considering this is cyclical. Running a LRT test in DESeq2 gives different results depending on which timepoint I choose as the beginning of the time course since I assume it doesn't calculate the last transition back to being awake (Or asleep depending on your reference).
Any ideas on an appropriate way to do this?

time = c(3,9,15,21)
ddsLRT <- DESeqDataSetFromTximport(txi.rsem.lrt, sampleTable, ~time)
ddsLRT<- DESeq(ddsLRT, test="LRT", reduced = ~1)


I think the problem is that you have time as a linear value rather than a factor. While this naively makes sense (after all, you have to go through 3 hours awake before you can get to 9 hours awake), what you end up doing is fitting a single coefficient to each gene of "linearly changes with time". What you want instead is factor, so you can have a system where things like per and clk can cycle:
time = factor(c(3,9,15,21))