Question: Limma time course experiments
gravatar for shuvadeep.maity
9 months ago by
shuvadeep.maity0 wrote:

In limma manual, the example of time course experiment (Section 9.6) the target frame showed 2 replicates of 0hr wt and mutant but why it was not considered in the levels or in design? Can anyone please explain the discrepancy? The example, "we consider here a two-way experiment in which time course profiles are to be compared for two genotypes. Consider the targets frame

FileName Target
File1 wt.0hr
File2 wt.0hr
File3 wt.6hr
File4 wt.24hr
File5 mu.0hr
File6 mu.0hr
File7 mu.6hr
File8 mu.24hr

The targets are RNA samples collected from wild-type and mutant animals at 0, 6 and 24 hour time points. This can be viewed as a factorial experiment but a simpler approach is to use the group-mean parametrization.

> 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)


limma • 190 views
ADD COMMENTlink modified 9 months ago • written 9 months ago by shuvadeep.maity0
Answer: Limma time course experiments
gravatar for James W. MacDonald
9 months ago by
United States
James W. MacDonald51k wrote:

You can often answer your own question by processing things using R and seeing what happens. As an example:

> targets <- data.frame(FileName = paste0("File", 1:8), Target = paste0(rep(c("wt.","mu."),each = 4), rep(c(0,0,6,24), 2), "hr"))
> targets
  FileName  Target
1    File1  wt.0hr
2    File2  wt.0hr
3    File3  wt.6hr
4    File4 wt.24hr
5    File5  mu.0hr
6    File6  mu.0hr
7    File7  mu.6hr
8    File8 mu.24hr
> targets$Target
[1] wt.0hr  wt.0hr  wt.6hr  wt.24hr mu.0hr  mu.0hr  mu.6hr  mu.24hr
Levels: mu.0hr mu.24hr mu.6hr wt.0hr wt.24hr wt.6hr
> lev <- c("wt.0hr","wt.6hr","wt.24hr","mu.0hr","mu.6hr","mu.24hr")
> f <- factor(targets$Target, levels = lev)
> f
[1] wt.0hr  wt.0hr  wt.6hr  wt.24hr mu.0hr  mu.0hr  mu.6hr  mu.24hr
Levels: wt.0hr wt.6hr wt.24hr mu.0hr mu.6hr mu.24hr

So the duplicates ARE accounted for - the lev object is just used to reorder the factor levels.

The duplicates aren't incorporated in the contrasts matrix, because the contrast is made between the coefficients, rather than the observations. In other words, in this model the coefficients are the mean of each group, and the contrasts are the difference between those means.

ADD COMMENTlink written 9 months ago by James W. MacDonald51k

Just to make sure, the correlation between the duplicates can be modeled with the duplicateCorrelation function, right?

ADD REPLYlink written 9 months ago by mikhael.manurung190

Hypothetically yes, but you need a reason to want to do that sort of thing, and there isn't a compelling reason here. In other words, you use duplicateCorrelation when you have a reason to believe that there will be correlations between observations that you want to control for. So if the time course involved taking samples from the same animals at each time (which is apparently not the case for this example), then the repeated measurements from each animal could be correlated.

In this case the only duplicates are for the 0 hr WT and MU animals, and unless they were measured twice (why?) there is no expectation that they should be correlated, and duplicateCorrelation should return a value very close to zero.

ADD REPLYlink written 9 months ago by James W. MacDonald51k

Thank you for the explanation

ADD REPLYlink written 9 months ago by shuvadeep.maity0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 182 users visited in the last hour