Question: DESeq2 using 'relevel' for different comparisons
0
gravatar for Matan G.
10 days ago by
Matan G.0
Matan G.0 wrote:

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 • 52 views
ADD COMMENTlink modified 10 days ago by Michael Love26k • written 10 days ago by Matan G.0
Answer: DESeq2 using 'relevel' for different comparisons
0
gravatar for Michael Love
10 days ago by
Michael Love26k
United States
Michael Love26k wrote:

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

ADD COMMENTlink written 10 days ago by Michael Love26k

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 REPLYlink written 10 days ago by Matan G.0

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 REPLYlink written 10 days ago by Michael Love26k
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: 139 users visited in the last hour