Hello,
I have a quick question. I have used Deseq before but I did not need to run a time-series on my data before and so I am a little stumped. For my data, I have sampled over time, from the same subplots which are nested within a plot for an entire year. So my data looks as follows: with 9 sites (3 unburned controls and 6 burned), each plot has 4 subplots embedded within them.
![Sample Data[1] [1]: https://ibb.co/m9dT7X9
I have run the following code and it works, but when I enter the site, which is where the samples are imbedded I get an error stating Error in checkFullRank(modelMatrix). Please see code below.
I have looked online and though this site and I am honestly not sure how to proceed.
- I was originally following this tutorial from Deseq under time series, but again I am stumped at the nested part.
- I want to contrast for treatment between the different time points,so any help or guidance is really appreciated.
This is the code I have as of right now dds<-phyloseqtodeseq2(physeq, design = ~ Treatment + TimePoint) gmmean = function(x, na.rm=TRUE){ exp(sum(log(x[x > 0]), na.rm=na.rm) / length(x)) } geoMeans<-apply(counts(dds), 1, gmmean) dds<-estimateSizeFactors(dds, geoMeans = geoMeans) dds<-DESeq(dds, test= "LRT", fitType="local", reduced = ~ Treatment)
#Look at results res<- results(dds, contrast = list(c("T1",c("T2" ,"T3","T4","T5","T6","T7","T8","T9")) res<- res[order(res$padj, na.last=NA), ] alpha<-0.01 signif<-res[(res$padj < alpha), ] sigif<-cbind(as(sigtab, "data.frame"), as(tax_table(dds)[rownames(sigtab), ], "matrix")) signif
This code works but when I add Site as a variable I can no longer run the code: and instead, I get the following error: dds<-phyloseqtodeseq2(physeq, design = ~ Treatment + TimePoint+ Site )
I've tried this but not sure if this is right and or how to to get Deseq to understand it. 1. Create a nested column nested column and (link here) 2. Is this the proper way of doing it how do I add it and have the Deseq function read it.
Please help, I have spent all day on this and have no idea how to proceed.

I know how to add it in a normal regression, is it added in the same manner in Deseq?
DESeq2 is simply based on linear models. You are getting the same model you would get with
lm. They both usemodel.matrixto generate X.