This is a test version of Biostars. For the public version, visit https://www.biostars.org.
contrast file in DESeq2 bioconductor

Hi everyone, I have 3 time points and want to do deseq2 for comparing these 3 time points: is it correct to build my contrast file like below?

results(dds, contrast = c("timepoints", "TS","EOT", "FU"))

I can also take TS (Therapy start) as control and compare EOT (End of treatments) and FU (follow up) as treatment.

deseq2

1 answer

What do you want to compare?

1) You can compare pairwise, like TS vs EOT and TS vs FU and EOT vs FU.

That would be

results(dds, contrast = c("timepoints", "TS", "EOT"))`

2) You can compare one group versus the average of the other two. For example, TS versus the average of EOT and FU would be something like:

results(dds, contrast = list("TS ", c("EOT ","FU ")), listValues=c(1, -1/2))

The exact syntax depends on how resultsNames(dds) looks, see ?results and also https://support.bioconductor.org/p/69104/ to get that right.

3) You can use the LRT (See vignette of DESeq2) to find any differences between groups, though I personally would only do that with many more than three groups. Pairwise comparisons are probably what you want here.

Log in to answer this question.