Question: DEseq with 3 replicates and two conditions
1
gravatar for S
4.1 years ago by
S10
BE
S10 wrote:

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 • 2.1k views
ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by S10

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?"

ADD REPLYlink written 4.1 years ago by h.mon27k

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.

 

Thanks in advance.

 

 

ADD REPLYlink written 4.1 years ago by S10

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")

ADD REPLYlink written 4.1 years ago by h.mon27k

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.
 

ADD REPLYlink written 4.1 years ago by Devon Ryan91k

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

ADD REPLYlink written 4.1 years ago by tiago2112871.1k
1

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.).
 

ADD REPLYlink written 4.1 years ago by Devon Ryan91k
0
gravatar for S
4.1 years ago by
S10
BE
S10 wrote:

 

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

-S

 

ADD COMMENTlink written 4.1 years ago by S10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1966 users visited in the last hour