Hi,

I've a small question concerning differential expression analysis. So I've a 12 samples divided into three groups (A, B and C ). If a do that :

    samples <- read.table("samples.txt",sep="\t",as.is=T)
    colnames(samples)<-c("sampleName","fileName","condition")
    dds1 <- DESeqDataSetFromHTSeqCount(sampleTable=samples,directory="./",design= ~ condition)
    dds1 <- DESeq(dds1)
    res <- results(dds1)

What will the p-value represent? If it's significatif, is it because the gene of interest is up or down regulated in one of the three groups?

To do pairwise comparison, I do that. Is it correct?

    res.A.B <- results(dds1, contrast=c("condition","A","B"))
    res.A.C <- results(dds1, contrast=c("condition","A","C"))
    res.B.C <- results(dds1, contrast=c("condition","B","C"))

Thanks
By default, DESeq2 uses a Wald test to compute the p-values, so it's likely that `res` just has the output of the A vs. C contrast (rather than using a likelihood ratio test to compare `~condition` versus `~1`). Regardless of the test, the direction of change and the p-value are separate, so you'll have significant findings in both directions.

Yes, the method you showed for the pairwise comparisons looks correct.

BTW, if you really do want to test whether something is changed due to condition in general (i.e., do something like a one-way ANOVA), you can just use the LRT methods. Keep in mind that the direction of change there can be questionable, since you're then asking if the full model fits better than the reduced rather than asking of parameter estimates (i.e., fold-changes) are different than 0 (or a different threshold, should you specify something else...though that's not common).