[BioC] design and contrast matrix for limma time series without replicates

James W. MacDonald jmacdon at uw.edu
Tue Mar 20 14:48:47 CET 2012


Hi Xuan,

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 replicates
> 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 "https://stat.ethz.ch/pipermail/bioconductor/2010-June/033849.html", which suggest:
>
> "
> time=1:10
> design=model.matrix(~time)
> "
>
> In my case, is it correct to set this?
>
> time=rep(1:7,2)
> design=model.matrix(~time)

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 
other.

You could also allow for different slopes by adding a time/treatment 
interaction term:

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.

Best,

Jim



>> design
>     (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
> attr(,"assign")
> [1] 0 1
>
>
> Then how to set the contrast matrix?
>
>
> Thanks!
>
> --
> xuan
>
>
>
> 	[[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