Off topic:Undertanding how DESeq2 handles multiple test conditions
0
0
Entering edit mode
nw328 ▴ 20
@nw328-7354
Last seen 9.2 years ago
United States

Hi,

After browsing through many of the posts on biostars, seqanswers etc, I still am a bit shaky on how best to handle multiple treatments with DESeq2.  I understand that the analysis takes the condition into account during the creation of the deseqDataSet object via the design argument, but how is that handled by the DESeq function?  

For instance, when using the plotMA function following this guide, which conditions are being plotted against the control by default?  I get a nice plot, but which contrast is being plotted?

Below is how I am going about constructing the deseqDataSet object":

countsTable <-data.matrix(df[0:2301,1:10])
samples<-names(df[1:10])
condition<-c(rep("ctrl",2),rep("A",2),rep("B",2),rep("C",2),rep("D",2))
pData = data.frame(cbind(samples, condition))
ddsfm <- DESeqDataSetFromMatrix(countData = countsTable, colData=pData, design=~condition)

dds<-DESeq(ddsfm)

conds<-unique(condition)

 

I had assumed that a way to index out the individual contrasts would be to use the following results functions:

 

aRes<-results(dds, contrast=c("condition", "A", "ctrl"))
bRes<-results(dds, contrast=c("condition", "B", "ctrl"))
cRes<-results(dds, contrast=c("condition", "C", "ctrl"))
dRes<-results(dds, contrast=c("condition", "D", "ctrl"))

This doesn't seem to be returning the contrasts that I was anticipating.  Is there a more idiomatic way to approach this process? 

 

 

 

 

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] plyr_1.8.1              Biobase_2.26.0          DESeq2_1.6.3           
 [4] RcppArmadillo_0.4.600.0 Rcpp_0.11.3             GenomicRanges_1.18.4   
 [7] GenomeInfoDb_1.2.4      IRanges_2.0.1           S4Vectors_0.4.0        
[10] BiocGenerics_0.12.1     ggplot2_1.0.0          

rnaseq deseq2 r • 1.1k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 858 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