DEseq three-group comparison
1
4
Entering edit mode
3.4 years ago
duvaller ▴ 40

I would like to look at the differential expression of three groups- all with the same condition. Most resources I found focus on two-group comparison or two condition and two group comparison. I have not found anything for one condition and three group comparisons.

For example, I want to know what genes differ among three types of cells- type A, type B, and type C. I found suggestions to set up three separate pairwise comparisons (A/B, A/C, B/C), but would like to set up one three-group comparison (A/B/C) to determine which genes are unique to each cell type.

I have looked into using the contrast argument of the results function to extract comparisons, but get the error “(Type A) should be the name of a factor in the colData of the DESeqDataSet.”

dds <- DESeqDataSetFromMatrix(counts, DataFrame(groups), ~groups)
dds <- DESeq(dds)
res <- results(dds, contrast = c("Type A", "Type B", "Type C"))

Any advice is appreciated!

deseq differential expression analysis RNA-Seq • 6.5k views
ADD COMMENT
3
Entering edit mode
res <- results(dds, contrast = c("Type A", "Type B", "Type C"))

I think this is not the proper way to use the contrast argument. If I understand correct what you need is, the genes specific to one type compared to the average of 2 other types. If so, following should work

type_A_result = results(dds, contrast = c(1, -1/2, -1/2))

type_B_result = results(dds, contrast = c(-1/2, 1, -1/2))

type_C_result = results(dds, contrast = c(-1/2, -1/2, 1))
ADD REPLY
0
Entering edit mode

So type_A_result means how A changes with B and C as reference right?

Eg: if the Logfoldchange for Gene1 in type_A_result is 2.002, that means Gene1 is upregulated in A over B and C right?

ADD REPLY
0
Entering edit mode

Another kind of clunky way to do it would be to make more groups, one being "A" and "notA", the next group being "B" or "notB", etc.

ADD REPLY
0
Entering edit mode

According to your error, I thought your colData input (DataFrame(groups) in your case) is not understandable for the function. So, the groups should be determined with factor function, and converted to the database which has the row.names are the names you wrote in contrast. I think you can create the different scenarios such as one condition and three comparisons with this way, I think.

condition <- factor(c(rep("Type A", 2), rep("Type B", 2), rep("Type C", 2))) 
coldata <- data.frame(row.names=colnames(countdata), condition)

And after DESeq function, results function should work when you type inputs like this (those codes will be different for your scenario for sure):

res <- results(dds, contrast = c("condition","Type A","Type B"))
ADD REPLY
1
Entering edit mode
3.1 years ago

Has nobody yet mentioned performing a simple Likelihood Ratio Test (LRT), i.e., ANOVA? https://support.bioconductor.org/p/61563/#61564

ADD COMMENT

Login before adding your answer.

Traffic: 2311 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6