[BioC] setting up the correlation matrix with two channel, dye swapped data . How to deal with Bio and Tech replicates?

Richard Green greener at uw.edu
Wed Mar 14 16:40:27 CET 2012


Howdy folks, I could use some help. I have 32 two arrays that I need to run
differential expression on. My target file (with notes) is attached. The
comparisons are :

infected_time_2h     mock_2h
infected_time_6h     mock_6h
infected_time_24h     mock_24h
mock_2h     infected_time_2h
mock_6h     infected_time_6h
mock_24h     infected_time_24h


The arrays are dye swapped. Basically I would like to compare my infected
time point with my mock time point. But here is the catch, I have pairs of
biological replicates and then there were sets of technical replicates done
off of those,so my question is how to address the biololgical and technical
replicates within the design and how to address viewing these differences
within a contrast matrix .

Would you set it up this way and average the dye swapped with those that
are not dye swapped? Is this still taking into account the technical
replicates and calculating differential expression? It appears to be.

design <- cbind(INF2hvsMOCK2h =
c(1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
INF2hvsMOCK2hneg =
c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0),
INF6hvsMOCK =
c(0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
INF6hvsMOCKneg =
c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,0,0,0,0,0,0),
INF24hvsMOCK =
c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
INF24hvsMOCKneg =
c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1))

cont.matrix <- makeContrasts(INF2hvsMOCK2h_avg = (INF2hvsMOCK2h +
INF2hvsMOCK2hneg)/2, INF6hvsMOCK6h_avg = (INF6hvsMOCK + INF6hvsMOCKneg)/2,
INF24hvsMOCK24h_avg = (INF24hvsMOCK + INF24hvsMOCKneg)/2, levels = design)

fit2 <- contrasts.fit(fit, cont.matrix)


Or this way?

biolrep <-
c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,-7,-7,-8,-8)
library("statmod")
corfit <- duplicateCorrelation(E2.avg, ndups = 1, block = biolrep)
fit <- lmFit(E2.avg, block = biolrep, cor = corfit$consensus)

This does seem to calculate DE but takes into account the replicates


This way does not account for the contrast and looking at differences





Any advice folks have is much appreciated. Thanks
-Rich
-------------- next part --------------
Filename	Cy3	Cy5	biological replicate	technical replicate
US23502338_251485025519_S01_GE2_107_Sep09_1_3.txt	time_2h	mock_2h	1	1
US23502338_251485025519_S01_GE2_107_Sep09_1_4.txt	time_2h	mock_2h	2	1
US23502338_251485025520_S01_GE2_107_Sep09_1_3.txt	time_2h	mock_2h	1	2
US23502338_251485025520_S01_GE2_107_Sep09_1_4.txt	time_2h	mock_2h	2	2
US23502338_251485025521_S01_GE2_107_Sep09_1_3.txt	time_2h	mock_2h	1	3
US23502338_251485025521_S01_GE2_107_Sep09_1_4.txt	time_2h	mock_2h	2	3
US23502338_251485029145_S01_GE2_107_Sep09_1_3.txt	time_6h	mock_6h	1	1
US23502338_251485029145_S01_GE2_107_Sep09_1_4.txt	time_6h	mock_6h	2	1
US23502338_251485029151_S01_GE2_107_Sep09_1_3.txt	time_6h	mock_6h	1	2
US23502338_251485029151_S01_GE2_107_Sep09_1_4.txt	time_6h	mock_6h	2	2
US23502338_251485029633_S01_GE2_107_Sep09_1_3.txt	time_24h	mock_24h	1	1
US23502338_251485029633_S01_GE2_107_Sep09_1_4.txt	time_24h	mock_24h	2	1
US23502338_251485029602_S01_GE2_107_Sep09_1_3.txt	time_24h	mock_24h	1	2
US23502338_251485029602_S01_GE2_107_Sep09_1_4.txt	time_24h	mock_24h	2	2
US23502338_251485029141_S01_GE2_107_Sep09_1_3.txt	time_24h	mock_24h	1	3
US23502338_251485029141_S01_GE2_107_Sep09_1_4.txt	time_24h	mock_24h	2	3
US23502338_251485025519_S01_GE2_107_Sep09_1_1.txt	mock_2h	time_2h	-1	-1
US23502338_251485025519_S01_GE2_107_Sep09_1_2.txt	mock_2h	time_2h	-2	-1
US23502338_251485025520_S01_GE2_107_Sep09_1_1.txt	mock_2h	time_2h	-1	-2
US23502338_251485025520_S01_GE2_107_Sep09_1_2.txt	mock_2h	time_2h	-2	-2
US23502338_251485025521_S01_GE2_107_Sep09_1_1.txt	mock_2h	time_2h	-1	-3
US23502338_251485025521_S01_GE2_107_Sep09_1_2.txt	mock_2h	time_2h	-2	-3
US23502338_251485029145_S01_GE2_107_Sep09_1_1.txt	mock_6h	time_6h	-1	-1
US23502338_251485029145_S01_GE2_107_Sep09_1_2.txt	mock_6h	time_6h	-2	-1
US23502338_251485029151_S01_GE2_107_Sep09_1_1.txt	mock_6h	time_6h	-1	-2
US23502338_251485029151_S01_GE2_107_Sep09_1_2.txt	mock_6h	time_6h	-2	-2
US23502338_251485029633_S01_GE2_107_Sep09_1_1.txt	mock_24h	time_24h	-1	-1
US23502338_251485029633_S01_GE2_107_Sep09_1_2.txt	mock_24h	time_24h	-2	-1
US23502338_251485029602_S01_GE2_107_Sep09_1_1.txt	mock_24h	time_24h	-1	-2
US23502338_251485029602_S01_GE2_107_Sep09_1_2.txt	mock_24h	time_24h	-2	-2
US23502338_251485029141_S01_GE2_107_Sep09_1_1.txt	mock_24h	time_24h	-1	-3
US23502338_251485029141_S01_GE2_107_Sep09_1_2.txt	mock_24h	time_24h	-2	-3


More information about the Bioconductor mailing list