Multiple comparisons with DESeq2
1
0
Entering edit mode
spr ▴ 10
@spr-13965
Last seen 4.7 years ago

Hello, 

I have a dataset that consists of four conditions (one control, and three different stages of disease) and four batches. 

I accounted for batch effects, by: 

dds <- DESeqDataSetFromTximport(txi.rsem, sampleTable, ~batch + condition)

I then explicitly set the levels of factor condition to make sure every stage is compared to my control. 

dds$condition <- factor(dds$condition, levels=c("Normal","Stage1", "Stage2", "Stage3"))

And performed differential expression: dds <- DESeq(dds). 

My questions are: 

1) Do I need to do anything else to account for batch effects?

2) Having set my "Normal" samples as the reference level, can I expect that every stage has been separately compared to "Normal"? 

3) I am also interested in comparing Stage 2 to Stage 1, Stage 3 to Stage 2 and Stage 3 to Stage 1. Is there a way to code this? I assume I could reset the levels and choose Stage 1 or 2 as reference, then keep only the comparisons that make sense.

Thanks so much for your help!

 

deseq2 • 1.1k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 days ago
United States

1) No, just using ~batch + condition accounts for batch effects.

2) The coefficients that are built from this setup are against Normal, yes. You can always contrast any two levels using results(dds, contrast=c("condition","...","..."). See the help page for ?results.

ADD COMMENT
0
Entering edit mode

Thanks so much!

ADD REPLY
0
Entering edit mode

As far as the multiple comparisons go, even if I specify three levels to be compared with Normal, I still get a single column of LFC values. 

Is there a way that I can get three columns, one per each level compared to Normal? 

Interestingly, too, the LFC values seem "flipped", as if I specified the levels in the opposite order. I did dds$condition <- factor(dds$condition, levels=c("Normal","Stage1", "Stage2", "Stage3")), which according to the vignette is correct. 

ADD REPLY
0
Entering edit mode

results() only does one contrast at a time. coef() can be used to get a matrix of model coefficients.  The LFC values from a contrast: (variable, numerator, denominator) give log2 of numerator/denominator.

ADD REPLY

Login before adding your answer.

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