[BioC] DESeq pairwise comparisons between conditions within a multi-factor design
Simon Anders
anders at embl.de
Sat Mar 16 13:15:24 CET 2013
Hi Andrew
On 15/03/13 22:56, Andrew Lysaght wrote:
[...]
> fit1 <- nbinomFitGLM(cds, count ~ Blocking + Exposure )
> fit2 <- nbinomFitGLM(cds, count ~ Blocking + Exposure + Time)
> pvals <- nbinomGLMTest( fit2, fit1 )
>
> I am unclear whether the significant genes returned by this analysis are
> significant across all time points or any time point. Is there a way to
> test pairwise (time1 vs. time2) while preserving the blocking and exposure
> components (ie not using nbinomTest to directly compare time1 and time 2)
Significance with the test you use above means that you can reject the
null hypothesis that expression does not change over time, i.e. that at
least one time point is different.
To compare two specific time points, subset the cds object to the
samples from these two time point before the test:
cds2 <- cds[ , pData(cds)$Time %in% c( "timepoint1", "timepoint2" ) ]
where "timepoint1" and "timepoint2" are the levels describing the two
time points you want to compare.
Then run nbinomFitGLMs and nbinomGLMTest as above on cds2.
Unless noise (within-group variability) is very different in different
time points, you get better power if you do the subsetting _after_
calling estimateDispersion.
Simon
More information about the Bioconductor
mailing list