Question: DESeq2 releveling not changing resultsNames options
0
gravatar for rclaire
3.1 years ago by
rclaire0
United States
rclaire0 wrote:

Hello,

I have some questions about releveling to reset the factor level.

I am running an experiment in DESeq2 with 4 stages that I want to compare to each other under one treatment. My goal is to change which factor is the reference for generating result outputs. I understand that the default is the 1st factor, by alphabetical order. I have tried releveling with both of the following ways:

dds.t0$stage <- relevel(dds.t0$stage, "D2")

and

dds.t0$stage <- factor(dds.t0$stage, levels=c("D2", "4dpd", "12dpd", "20dpd"))

However, both of these still return the same default resultsNames list: 

> resultsNames(dds.t0)
[1] "Intercept"            "stage_20dpd_vs_12dpd"
[3] "stage_4dpd_vs_12dpd"  "stage_D2_vs_12dpd"

 

My goal is to have the following: 

> resultsNames(dds.t0)
[1] "Intercept"            "stage_D2_vs_4dpd"
[3] "stage_D2_vs_12dpd"  "stage_D2_vs_20dpd"

 

Can anyone help me figure out where I've gone wrong?

Thanks very much!

 

 

 

 

ADD COMMENTlink modified 3.1 years ago by Michael Love23k • written 3.1 years ago by rclaire0
Answer: DESeq2 releveling not changing resultsNames options
0
gravatar for Michael Love
3.1 years ago by
Michael Love23k
United States
Michael Love23k wrote:

I don't know exactly what order you performed these operations, but note that you have to relevel before running DESeq() to impact the resultsNames(dds) output.

relevel() selects the reference level, so the denominator. You will have "stage_...vs_X" for whatever X you you chose as the reference level.

Finally, note that you can extract any comparison you want using the 'contrast' argument. See ?results.

ADD COMMENTlink written 3.1 years ago by Michael Love23k
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 16.09
Traffic: 252 users visited in the last hour