I'm pretty new to this, so please bear with me.
I am trying to analyse complicated dataset of microbiome data and I can't figure out what I'm doing...
I have three conditions:
- Treatment: None, Chronic Stress
- Status: PNS, Control
- Time.Point: Before, After
I'm trying to see if there is a main effect or interaction of any of these conditions, and then do pairwise comparisons.
Because it's a phyloseq object I first convert it to a DESeq Data Set
dsq <- phyloseq_to_deseq2(subset2, ~Status+Treatment+Time.Point)
Then I turn the columns into factors
dsq$Status <- factor(dsq$Status, levels = c("Control","PNS"))
dsq$Treatment <- factor(dsq$Treatment, levels = c("None","Chronic Stress"))
dsq$Time.Point <- factor(dsq$Time.Point, levels = c("Before","After"))
I then run DESeq
dsq <- DESeq(dsq)
And get the names
resultsNames(dsq)
[1] "Intercept" "Status_PNS_vs_Control" "Treatment_Chronic.Stress_vs_None"
[4] "Time.Point_After_vs_Before"
Then the reults
res2 <- results(dsq)
log2 fold change (MLE): Time.Point After vs Before
LRT p-value: '~ Status + Treatment + Time.Point' vs '~ 1'
DataFrame with 39751 rows and 6 columns
etc.
How do I see if there is a main effect of any of the conditions?
I have tried:
dsq <- phyloseq_to_deseq2(subset2, ~Status+Treatment+Time.Point + Status:Treatment:Time.Point)
But get an error
Error in checkFullRank(modelMatrix) :
the model matrix is not full rank, so the model cannot be fit as specified.
Levels or combinations of levels without any samples have resulted in
column(s) of zeros in the model matrix.