On 3/20/2012 6:50 AM, Chunxuan Shao wrote:
> Hi everyone:
> I have one microarray data set considering differentiation in a cell
line. About 7 time points for both control and treatment, no
> I would like to use limma to find the differentially expressed genes
between time points for control and treatment, and want to compare the
gene expression between control and treatment for the same time point.
But I don't know how to make the right design and contrast matrix.
> After searching mail archive, the closest related answer is
> In my case, is it correct to set this?
Probably not. This implies that your time points are equally spaced,
with one time period between them (e.g., you collected samples after
1,2,3,4,5,6,7 hours or days or some other period). If you didn't use
equally spaced time points, you need to change to reflect that.
In addition, you need to set the design matrix up to include the
control/treatment comparison. If I assume you are in fact using seven
equally spaced time intervals, then you would want:
tm <- rep(1:7,2)
trt <- factor(rep(0:1, each = 7))
design <- model.matrix(~tm+trt)
And the trt1 coefficient estimates the difference in the intercepts,
which is what you are looking for. In other words, this is fitting a
model where you are allowing the two sample types to have different
intercepts, but assuming the same slope. If the intercepts are
different, then one sample type has overall higher expression than the
You could also allow for different slopes by adding a time/treatment
design2 <- model.matrix(~tm*trt)
Here the main coefficient of interest would be tm:trt1, which measures
the difference in slope between the treatment and control.
> (Intercept) time
> 1 1 1
> 2 1 2
> 3 1 3
> 4 1 4
> 5 1 5
> 6 1 6
> 7 1 7
> 8 1 1
> 9 1 2
> 10 1 3
> 11 1 4
> 12 1 5
> 13 1 6
> 14 1 7
>  0 1
> Then how to set the contrast matrix?
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at r-project.org
> Search the archives:
James W. MacDonald, M.S.
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099