DESeq2 condition table
1
0
Entering edit mode
ribioinfo ▴ 100
@ribioinfo-9434
Last seen 3.6 years ago

Hello, usually I load the condition table from a table in order to have a data frame with a column called condition that I put in the design formula:

dds = DESeqDataSetFromTximport(txi, cond, ~condition)

I do not create a factor of the column condition ad I usually use contrast in order to do choose the comparisons that I need.

Is it correct do in this way or it is mandatory to create a factor?

Thank you.

deseq2 • 3.3k views
ADD COMMENT
0
Entering edit mode

The condition table has this format:

                  condition

Sample1       A

Sample2       A

Sample3       B

Sample4       B

Sample5       C

Sample6       C

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 2 hours ago
United States

'condition' does need to be a factor but functions do this for you, either read.table() or DESeqDataSet*

ADD COMMENT
0
Entering edit mode

Thank you very much!

ADD REPLY
0
Entering edit mode

Hello,

I did again the same thing that I posted before but this time using the same approach but with different values in the condition table I got this message:

  it appears that the last variable in the design formula, 'condition',
  has a factor level, 'control', which is not the reference level. we recommend
  to use factor(...,levels=...) or relevel() to set this as the reference level
  before proceeding. for more information, please see the 'Note on factor levels'
  in vignette('DESeq2').

Can you help me?

 

ADD REPLY
0
Entering edit mode

Can you be more specific? What kind of help do you need? 

ADD REPLY
0
Entering edit mode

I just realized that if I put "control" in the condition I get the message and checking the code I saw this:

controlSynonyms <- c("control", "Control", "CONTROL")

for (cSyn in controlSynonyms) {
        if (cSyn %in% lastDVLvls) {
          if (cSyn != lastDVLvls[1]) {
            message(paste0("it appears that the last variable in the design formula, '", 
                           designVars[lastDV], "',\n  has a factor level, '", 
                           cSyn, "', which is not the reference level. we recommend\n  to use factor(...,levels=...) or relevel() to set this as the reference level\n  before proceeding. for more information, please see the 'Note on factor levels'\n  in vignette('DESeq2')."))
          }
        }
      }

Why you do that?

If I use the contrast I will not have any problem to select the correct condition even with that message, right?

Thanks.

 

 

ADD REPLY
1
Entering edit mode

It's just a message and can be ignored if you already know that control is not the reference level.

Having some users have to ignore messages is better than other users not knowing that they've accidentally put control / treated in their paper figures.

ADD REPLY

Login before adding your answer.

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