I was wondering how to run the DESeq()
=> results()
=> lfcShrink()
when my resultsNames()
doesn't list the comparisons I would like to do.
I have a data set with four different conditions within each of my two time-points. For my comparisons I would like to compare the four conditions within each of the timepoints against each other. As for a control condition, i have one for each of the two timepoints.
Unfortunately the resultsNames()
function doesn't list all of the wanted comparisons.
my conditions are listed below
condition <- factor(rep(c("GFPMinus24","GFPPlus24","ArtMinus24", "ArtPlus24","Q97Plus24","Q97Minus24","GFPMinus40","GFPPlus40","ArtMinus40", "ArtPlus40","Q97Plus40","Q97Minus40"),each=3))
## or creating the three different vectors separately
Agg <- factor(rep(rep(c("Minus", "Plus"), each = 6), each = 3) )
group <- factor(rep(c("GFP", "Art", "Q97"), each = 12) )
TP <- factor(rep(rep(c(24, 40), each = 3), each = 6))
while the GFP
samples are my (sort of) control I'm also comparing Art vs. Q97 samples. Minus
and Plus
state whether or not an additional compound was added, while the Art
and Q97
stands for another additional aggregate.
So I'm not sure how to build my model.matrix here to include all the coefficients in resultsNames()
object.
Would it make more sense (and easier to handle ) to analyze the different situations on a pair-wise basis? If not, can someone please help me to create a model.matrix for the various comparisons?
thanks Assa
Hi both,
I'm very new using DESeq2.
I have the same problem as Assa. I have a data set with 3 conditions. And the
resultsNames()
function only list two of the three comparasion that I need.Conditions: Control, 18h_Polylack, 72_Polylack
so, when i run
resultsNames()
i getbut I need to compare treatment_Control_LB_vs_72h_Polylack using
lfcShrink()
with apeglm. And it doens't appear.So, how I can run
nbinomWaldTest()
or what can i do?Thanks
Did you read the section Kevin linked to yet?
See where it says "Although apeglm cannot be used with contrast, we note that many designs can be easily rearranged such that what was a contrast becomes its own coefficient..."