DEseq with 3 replicates and two conditions
0
2
Entering edit mode
7.3 years ago
S ▴ 20

Hi,

I am new to the RNA-seq analysis. I am trying to analyze DE genes using DESeq. I have three conditions and each with triplicates.

What would be the best way to find pair wise comparison of the DE genes.

The way I go about it is make a data matrix with all the replicates and samples (3x3) and specify the groups for DEseq. Following which I perform pairwise contrast. However, when my data replicate columns are not organized I get different result compared to when the replicate are placed in columns next to each other.

This I believe is strange as the order of the columns/replicates should not matter as the column head would define the replicates.

Also, would it be better to perform DESeq separately for the pairwise comparisons rather than all at once.

Thanks in advance for the help.

-S

RNA-Seq • 3.5k views
0
Entering edit mode

I think you should explain with more detail and show which commands you did run. For example, from your description I understand you have two conditions, e.g. control vs treatment, if so there is only one comparison to be done and I don't understand the question "would it be better to perform DESEQ separately for the pairwise comparisons rather than all at once?"

0
Entering edit mode

I have three conditions - Wt, het and KO I wish to compare pairwise with i these conditions. While performing DEseq, If my data is arranged with replicates next to each other like table 1 below

Table 1

genes   Wt_1    Wt_2    Wt_3    Het_1   Het_2   Het_3   KO_1    KO_2    KO_3
abc
xyz

grp.idx<-rep(c("Wt","Het","KO"), each=3)
..
..

ddsinput <- DESeqDataSetFromMatrix(countMatNon0, colData=coldat, design = ~ grp)
ddsmain <- DESeq(ddsinput)


Following this if I perform contrast between two groups, I get list of DE genes

deseq.contr1 <- results(ddsmain, contrast=c("grp","Het","KO"))


Now when i have the data arranged with replicates randomly arranged as in table 2

Table2

genes   Wt_1    Wt_2    Het_1   KO_2    Het_2   Het_1   KO_1    Wt_3    KO_3
abc
xyz


Then I get quite different list of DE in the same comparison.

Part2 of the question is Whether to make the data matrix as Het Vs KO, Hetvs Wt etc. separately.

Hope I was able to explain it better now.

0
Entering edit mode

As Devon Ryan pointed out, if you change the columns order for the samples, the sample table needs to be changed accordingly, so for your second example:

grp.idx<-c("Wt_1","Wt_2","Het_1","KO_2","Het_2","Het_1","KO_1","Wt_3","KO_3")

0
Entering edit mode

When you construct the DESeqDataSet, you need to ensure that the sample table is in the exact same order as the samples. It sounds like you're changing the column order without changing the sample table, but without more information we can't say for sure.

0
Entering edit mode

Just for knowing, can you compare 3 or more groups in DEseq simultaneously? I thought I would need to make (WT) x (1 Experimental group) each run.

2
Entering edit mode

You would use contrasts for each pairwise comparison, since that's what you seem to want. This is actually the same in all tools (edgeR, limma, etc.).

0
Entering edit mode

Thanks a lot Everyone! This was quite helpful. I realized the error. Will get back if I need further help.

-S