DESeq2 using 'relevel' for different comparisons
1
0
Entering edit mode
Matan G. ▴ 60
@matan-g-22483
Last seen 3.3 years ago

Let's say that I have RNA seq data with multiple clinical conditions from multiple patients/samples. As far as I understand, the first level that is used is the reference level that other conditions will be compared to. For example if I have the following conditions: 1. Control 2. Treatment 1 3. Treatment 2

One option is to put the "control" as the first level that the other conditions will be compared to separately: Treatment 1 vs control Treatment 2 vs control

The question: If I want to compare the treatments (i.e. Treatment 1 vs Treatment 2), what's the level that should be run first as the reference level?

Thanks

deseq2 • 1.7k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 18 hours ago
United States

You can just use the contrast argument. See the vignette and ?results

ADD COMMENT
0
Entering edit mode

Thank you for the prompt reply. I have read the contrast argument section.

  1. If you use the contrast argument you discard the relevel (ie deactivate it)?
  2. In one of the vignettes, it written that there is a great importance for writing the control/reference first. How does the contrast argument take it into consideration?
  3. Is putting treatment 1 as the first level statistically make sense when comparing it to treatment 2?

Best

ADD REPLY
0
Entering edit mode

By default, R will choose a reference level for factors based on alphabetical order. Then, if you never tell the DESeq2 functions which level you want to compare against (e.g. which level represents the control group), the comparisons will be based on the alphabetical order of the levels. There are two solutions: you can either explicitly tell results which comparison to make using the contrast argument (this will be shown later), or you can explicitly set the factors levels.

ADD REPLY

Login before adding your answer.

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