[BioC] LIMMA: paired samples AND technical replicates

Charlotte Schjerling araneus at mRNA.dk
Wed Sep 5 17:54:42 CEST 2007


I have tried to search the BioC archives but have not found posts 
dealing with both paired samples and technical replicates in a setup
like mine.

I have 3 patients A, B, and C from which I have 4 samples: M.early, 
nM.early, M.late, and nM.late. Each sample has a technical
replicate resulting in 24 arrays (Affymetrix).

biolrep Patient M.early nM.early        M.late  nM.late
1       A       1       0       0       0
1       A       1       0       0       0
2       A       0       1       0       0
2       A       0       1       0       0
3       A       0       0       1       0
3       A       0       0       1       0
4       A       0       0       0       1
4       A       0       0       0       1
5       B       1       0       0       0
5       B       1       0       0       0
6       B       0       1       0       0
6       B       0       1       0       0
7       B       0       0       1       0
7       B       0       0       1       0
8       B       0       0       0       1
8       B       0       0       0       1
9       C       1       0       0       0
9       C       1       0       0       0
10      C       0       1       0       0
10      C       0       1       0       0
11      C       0       0       1       0
11      C       0       0       1       0
12      C       0       0       0       1
12      C       0       0       0       1

I would like to find the following 4 contrasts:

1) M.early - nM.early
2) M.late - nM.late
3) M.early - M.late
4) nM.early - nM.late

biolrep <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12)
corfit <- duplicateCorrelation(eset, design, ndups=1, block=biolrep)

If I ignore the pairing part I have constructed the following design matrix:

 > design
    M.early nM.early M.late nM.late
1             1               0           0              0
2             1               0           0              0
3             0               1           0              0
4             0               1           0              0
5             0               0           1              0
6             0               0           1              0
7             0               0           0              1
8             0               0           0              1
9             1               0           0              0
10            1               0           0              0
11            0               1           0              0
12            0               1           0              0
13            0               0           1              0
14            0               0           1              0
15            0               0           0              1
16            0               0           0              1
17            1               0           0              0
18            1               0           0              0
19            0               1           0              0
20            0               1           0              0
21            0               0           1              0
22            0               0           1              0
23            0               0           0              1
24            0               0           0              1
attr(,"assign")
[1] 1 1 1 1
attr(,"contrasts")
attr(,"contrasts")$f
[1] "contr.treatment"


fit <- lmFit(eset, design, ndups=1, block=biolrep, cor=corfit$consensus)
contrasts <- makeContrasts(M.early-nM.early, M.late-nM.late, 
M.early-M.late, nM.early-nM.late, levels=design)
fit2 <- contrasts.fit(fit, contrasts)
fit2 <- eBayes(fit2)

However, I would like to include the pairing by patient into the 
analyses and that I cannot figure out how to do.

Hope someone can help,

Charlotte



More information about the Bioconductor mailing list