Hi,
To identify genes that respond differently to inflammation in females and males (with ulcerative colitis) I have set up the following contrast using makeContrasts of the limma package, and analyzed it using limma and edgeR: (UlcerativeColitis.Inflamed.Male-UlcerativeColitis.notInflamed.Male)-(UlcerativeColitis.Inflamed.Female-UlcerativeColitis.notInflamed.Female).
How can this be accomplished for DESeq2? As I understand it the ‘contrast’ argument of the results function of DESeq2 can be provided a list, but the list should have a length of two. I would need a list of length four for this contrast. Can someone please help me solve this?
Sincerely,
Jan
Hi Michael,
Thanks for your reply. I have a follow-up question.
First, however, I will comment on the reasons for switching among three packages. New to RNA-seq analysis and without a strong preference based on literature I started out with limma. However, I also wanted to explore the workflow of other packages and to assess to what extent my results could be confirmed using a package based on a different framework compared to limma's data transformation. I was able to easily fit edgeR into what I had already done. Later I read a paper describing a comparatively large number of genes that responded differently to inflammation in females compared to males with ulcerative colitis (using DESeq2), whereas I had not found any such genes (using limma or edgeR). I wanted to check if this discrepancy is due to the data itself (i.e. patient samples) or due to the use of DESeq2 (vs. limma or edgeR) for data analysis.
If I have the correct set-up for the contrast I still get the same result, i.e. no genes that respond differently to inflammation in females compared to males.
Since I investigate a difference of differences (i.e. (a/x)/(b/y)) I thought I would provide the following arguments:
contrast = list(c("a", "x"), c("b", "y"))
listValues = list(c(1, -1), c(1, -1)) or listValues = list(1, -1, 1, -1)
which, however, is not allowed.
Because of this I mathematically rearranged the expression (a/x)/(b/y) to its equivalence (a*y)/(b*x), and provided the argument:
contrast = list(c("a", "y"), c("b", "x"))
Is this the way to handle a difference of differences using DESeq2?
Sincerely/ Jan
Yes, you got it.