[BioC] time course experiment design

James W. MacDonald jmacdon at uw.edu
Tue Jul 22 17:22:37 CEST 2014


Hi Xiayu,

On 7/21/2014 3:20 PM, Rao,Xiayu wrote:
> Hello,
>
> Thank you for providing limma user guide, which is of great help. It is very clear on the guide of how to analyze time course data. But I was asked to answer different questions.
>
> The study design of my data is quite similar to that described on the guide. There are duplicates for each of the 6 conditions. The code below is from the guide.
>> lev <- c("wt.0hr","wt.6hr","wt.24hr","mu.0hr","mu.6hr","mu.24hr")
>> f <- factor(targets$Target, levels=lev)
>> design <- model.matrix(~0+f)
>> colnames(design) <- lev
>> fit <- lmFit(eset, design)
> #1. Which genes respond at either the 6 hour or 24 hour times in the wild-type? Any two contrasts between the three times would give the same result.
>> cont.wt <- makeContrasts("wt.6hr-wt.0hr", "wt.24hr-wt.6hr", levels=design)
>> fit2 <- contrasts.fit(fit, cont.wt)
>> fit2 <- eBayes(fit2)
>> topTableF(fit2, adjust="BH")
> #2. Which genes respond (i.e., change over time) in the mutant?
>> cont.mu <- makeContrasts("mu.6hr-mu.0hr", "mu.24hr-mu.6hr", levels=design)
>> fit2 <- contrasts.fit(fit, cont.mu)
> ……
>
> #3. Which genes respond differently over time in the mutant relative to the wild-type?
>> cont.dif <- makeContrasts(Dif6hr =(mu.6hr-mu.0hr)-(wt.6hr-wt.0hr), Dif24hr=(mu.24hr-mu.6hr)-(wt.24hr-wt.6hr), levels=design)
>> fit2 <- contrasts.fit(fit, cont.dif)
> ……
>
> But I was asked to find the changed genes under the following specific conditions.
>
> 1.       Comparisons of the two types at each time point:
>
> wt.0hr vs. mu.0hr
>
> wt.6hr vs. mu.6hr
>
> wt.24hr vs. mu.24hr
>
> 2.       Comparisons of different time points in wt:
>
> wt.0hr vs. wt.6hr
>
> wt.6hr vs. wt.24hr
>
> 3.       Comparisons of different time points in mu:
>
> mu.0hr vs. mu.6hr
>
> mu.6hr vs. mu.24hr
> In this case, I was thinking to do the following but I do not feel it right. Or should I subset the data according to each comparison to do the analysis?
> makeContrasts(“mu.0hr-wt.0hr”, “mu.6hr-wt.6hr”, “mu.24hr-wt.24hr”, levels=design) for 1
> makeContrasts("wt.6hr-wt.0hr", "wt.24hr-wt.6hr", "wt.24hr-wt.0hr", levels=design) for 2
> makeContrasts("mu.6hr-mu.0hr", "mu.24hr-mu.6hr", "mu.24hr-mu.0hr", levels=design) for 3

You don't have to do three different calls to makeContrast(). Simply put 
all the contrasts you care about in one contrasts matrix:

contrast <- makeContrasts("mu.0hr-wt.0hr", "mu.6hr-wt.6hr", 
"mu.24hr-wt.24hr","wt.6hr-wt.0hr", "wt.24hr-wt.6hr", 
"wt.24hr-wt.0hr","mu.6hr-mu.0hr", "mu.24hr-mu.6hr", "mu.24hr-mu.0hr", 
levels=design)

Best,

Jim


>
> Any suggestions? Thank you very much in advance!
>
> Thanks,
> Xiayu
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list