How to set group in EdgeR and DEseq2?
2
2
Entering edit mode
4.7 years ago
deb0612 ▴ 30

I got a sample sheet like this:

 name condition  
 sampe1    T  
 sampe2    T  
 sampe3    N  
 sampe4    T  
 sampe5    N 
 sampe6    N 
 sampe7   N

(T:tumor, N:normal)

When I use this condition in DEseq2, it will use N vs T as default.

If I set group <- factor(c(1,1,2,1,2,2,2)) in EdgeR. It will get opposite result to DEseq2.

I would like to know. If I want to get the up-down regulated gene in Tumor sample.

Should I set tumor as "1" or "2" in EdgeR ?

RNA-Seq R EdgeR DEseq2 • 2.4k views
ADD COMMENT
1
Entering edit mode

And beware of the using of "T" and "F" as they can be considered as TRUE and FALSE into R

ADD REPLY
2
Entering edit mode
4.7 years ago

It it not important the way you name your factors as long as you can separate and group your samples. You can name factor as letters or as numbers

But at the time of doing the DE analysis, it matters the ORDER you define that factor when the DE analysis is requested. By default, DESEq2 order that factors alphabetically, being used as "control" the first one. You need to use the relevel() function to change your factors if they are not in the order you desire.

In other words. Try to control the way your factors are defined and used in the analysis

ADD COMMENT

Login before adding your answer.

Traffic: 1999 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