[BioC] [limma] Strange results in contrasts with dye-swap
mjonczyk at biol.uw.edu.pl
mjonczyk at biol.uw.edu.pl
Sat Aug 20 11:06:11 CEST 2011
Dear Gordon & List Members,
I've made few hybridizations which I'd like to incorporate to the design
described in this thread (It was reference design, two temperature treatments
with seven samples (time points) in both, all compared directly to "time 0" sample).
Treatments I'd like to merge with that experiment are direct comparison of:
c2 vs k2
c6 vs k6
c8 vs k8
As main experiment this comparisons were repeated four times with dye-swap (two
labellings in both directions), using the same biological material as in
corresponding replications in the main experiment.
Here is my new target frame:
FileName Cy3 Cy5 powt
_024_1_vs_7ex.gpr k0 k2 1
_228_k0_vs_16ex.gpr k0 c12 1
_229_k0_vs_8ex.gpr k0 c4 1
_230_k0_vs_15ex.gpr k0 k10 1
_235_k0_vs_19ex.gpr k0 k14 1
_237_k0_vs_14ex.gpr k0 c10 1
_238_k0_vs_10ex.gpr k0 c6 1
_239_k0_vs_12ex.gpr k0 c8 1
_240_k0_vs_13ex.gpr k0 k8 1
_248_k0_vs_17ex.gpr k0 k12 1
_249_k0_vs_9ex.gpr k0 k4 1
_253_k0_vs_11ex.gpr k0 k6 1
_254_k0_vs_6ex.gpr k0 c2 1
_256_k0_vs_18ex.gpr k0 c14 1
_189_K8_vs_K0ex.gpr k8 k0 2
_190_K4_vs_K0ex.gpr k4 k0 2
_191_K6_vs_K0ex.gpr k6 k0 2
_192_C8_vs_K0ex.gpr c8 k0 2
_193_C10_vs_K0ex.gpr c10 k0 2
_194_C2_vs_K0ex.gpr c2 k0 2
_198_C14_vs_K0ex.gpr c14 k0 2
_200_K12_vs_K0ex.gpr k12 k0 2
_202_K10_vs_K0ex.gpr k10 k0 2
_206_C6_vs_K0ex.gpr c6 k0 2
_207_C12_vs_K0ex.gpr c12 k0 2
_208_K2_vs_K0ex.gpr k2 k0 2
_209_K14_vs_K0ex.gpr k14 k0 2
_210_C4_vs_K0ex.gpr c4 k0 2
_201_k0_vs_C2ex.gpr k0 c2 3
_203_k0_vs_K6ex.gpr k0 k6 3
_205_k0_vs_C12ex.gpr k0 c12 3
_217_k0_vs_K14ex.gpr k0 k14 3
_219_k0_vs_C4ex.gpr k0 c4 3
_231_k0_vs_C10ex.gpr k0 c10 3
_232_k0_vs_K8ex.gpr k0 k8 3
_233_k0_vs_C8ex.gpr k0 c8 3
_234_k0_vs_C14ex.gpr k0 c14 3
_235_k0_vs_C6ex.gpr k0 c6 3
_236_k0_vs_K10ex.gpr k0 k10 3
_237_k0_vs_K2ex.gpr k0 k2 3
_238_k0_vs_K4ex.gpr k0 k4 3
_239_k0_vs_K12ex.gpr k0 k12 3
_004_8_vs_1ex.gpr c8 k0 4
_005_10_vs_1ex.gpr c10 k0 4
_006_2_vs_1ex.gpr c2 k0 4
_007_15_vs_1ex.gpr k14 k0 4
_008_4_vs_1ex.gpr c4 k0 4
_010_3_vs_1ex.gpr k2 k0 4
_011_9_vs_1ex.gpr k8 k0 4
_012_14_vs_1ex.gpr c14 k0 4
_014_12_vs_1ex.gpr c12 k0 4
_026_13_vs_1ex.gpr k12 k0 4
_036_11_vs_1ex.gpr k10 k0 4
_037_6_vs_1ex.gpr c6 k0 4
_043_7_vs_1ex.gpr k6 k0 4
_044_5_vs_1ex.gpr k4 k0 4
127 k2 c2 1
049 c2 k2 2
133 c2 k2 4
128 k2 c2 3
047 k6 c6 1
050 c6 k6 2
046 c6 k6 4
048 k6 c6 3
130 k8 c8 1
134 c8 k8 2
132 c8 k8 4
045 k8 c8 3
So design matrix will be
> xdesign=modelMatrix(xtrg,ref="k0")
> xdesign
c10 c12 c14 c2 c4 c6 c8 k10 k12 k14 k2 k4 k6 k8
[1,] 0 0 0 0 0 0 0 0 0 0 1 0 0 0
[2,] 0 1 0 0 0 0 0 0 0 0 0 0 0 0
[3,] 0 0 0 0 1 0 0 0 0 0 0 0 0 0
[4,] 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 0 1 0 0 0 0
[6,] 1 0 0 0 0 0 0 0 0 0 0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 0 0 0 1
[68,] 0 0 0 0 0 0 1 0 0 0 0 0 0 -1
*Is* it correct? I.e. is it make correct use of direct (cx vs kx) comparisons?
*Can* I use the same code as previously
> xdesign_dye=cbind(DyeEffect=1,xdesign)
> fit.userguide.dye=lmFit(img_lA_ncav,xdesign_dye)
>
contrast.matrix.d=makeContrasts(p2="c2-k2",p4="c4-k4",p6="c6-k6",p8="c8-k8",p10="c10-k10",p12="c12-k12",p14="c14-k14",levels=xdesign_dye)
> fit2.ug.d=contrasts.fit(fit.userguide.dye,contrast.matrix.d)
> fit2.ug.d=eBayes(fit2.ug.d)
> test.ug.d=decideTests(fit2.ug.d,method="global",adjust.method="BH",p.value=0.05)
Thanks in advance,
Best Regards,
Maciej Jończyk, MSc
Department of Plant Molecular Ecophysiology
Institute of Plant Experimental Biology
Faculty of Biology, University of Warsaw
02-096 Warszawa, Miecznikowa 1
> On Fri, 5 Aug 2011, mjonczyk at biol.uw.edu.pl wrote:
>
> > Dear Gordon,
> >
> > thank you for clarifying this issue.
> >
> >
> >>> Results:
> >>>
> >>> TEST WITHOUT DYE EFFECT
> >>>> summary(test.ug)
> >>> c2 - k2 c4 - k4 c6 - k6 c8 - k8 c10 - k10 c12 - k12 c14 - k14
> >>> -1 115 96 377 141 263 175 265
> >>> 0 43082 43048 42326 42973 42694 42842 42752
> >>> 1 196 249 690 279 436 376 376
> >>>
> >>>
> >>> TEST WITH DYE EFFECT
> >>>> summary(test.ug.d)
> >>> p2 p4 p6 p8 p10 p12 p14
> >>> -1 246 217 686 317 530 316 526
> >>> 0 42797 42755 41594 42530 42103 42446 42239
> >>> 1 350 421 1113 546 760 631 628
> >>>
> >>> TEST WITH DYE EFFECT AND CONTRAST FOR DYE EFFECT
> >>>> summary(test.ug.d2)
> >>> DyeEffect p2 p4 p6 p8 p10 p12 p14
> >>> -1 6660 452 402 1103 593 858 539 883
> >>> 0 30803 42353 42261 40659 41853 41359 41888 41564
> >>> 1 5930 588 730 1631 947 1176 966 946
> >>>
> >
> >> The lesson here is that you should not include DyeEffect in decideTests()
> >> with your other contrasts. When using method="global", you should only
> >> include contrasts that are closely comparable to one another, and about
> >> which you will be making conclusions as a group.
> >>
> >>> *OTHER QUESTIONS*
> >>> 1. Is second model (WITH DYE EFFECT) correct?
> >>
> >> Fine.
> >>
> > Ok, so I use this model and "global" method.
> >>
> >>
> >>> 4. Should I include biol-replication effect in analysis (as block)?
> >>
> >> If the biol replicates seem to vary randomly, and are only slightly
> >> different, then I would suggest that you enter them as a random effect
> >> using block instead. If there are large differences between the biol
> >> reps, in particular if one rep is different to the others, then including
> >> them in the design matrix as you have done is safer and probably better.
> >
> > The second scenario is true in this experiment, from PCA I know that differences
> > between replications isn't negligible.
> > So replication effect is already included, just because in target frame (and
> > consequently design matrix) each combination of samples on array is repeated
> > four times?
>
> Yes, the analysis is adjusting for any batch effect between your
> replicates.
>
> Best wishes
> Gordon
>
> > Best regards,
> >
Maciej
More information about the Bioconductor
mailing list