Question about DESeq2 desgin
1
0
Entering edit mode
ribioinfo ▴ 100
@ribioinfo-9434
Last seen 3.6 years ago

Hi, if I wanted to use this design in order to take in account the batch effects:

dds = DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~ condition + batch)

Is it correct to use this colData?

               condition       batch

test1        test                1

test2        test                1

test3        test                2

control1   control           1

control2   control           1

control3   control           2

 

Or this colData?

               condition       batch

test1        test                A

test2        test                A

test3        test                B

control1   control           A

control2   control           A

control3   control           B

 

Thank you.

Riccardo

 

 

deseq2 • 817 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

We recommend in our vignette to put condition at the end of the design formula. This is in case you forget and ask for results(dds), you would get the batch results, which is not what you want.

As long as batch is a factor, it doesn't matter how you label them.

It's safer to use letters, so you can't accidentally forget to make it a factor. (It wouldn't matter with just two batches, but if you had a numeric batch variables and > 2 batches it would be a serious modeling mistake.)

ADD COMMENT
0
Entering edit mode

Thank you. 

Using this command:

res = results(dds, contrast = c("condition", "test", "control"))

 Will I get my test vs control comparison with the batch effects correction?

Thanks.

Riccardo

ADD REPLY
0
Entering edit mode
Yes
ADD REPLY

Login before adding your answer.

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