[BioC] Limma contrasts question
James W. MacDonald
jmacdon at med.umich.edu
Mon Oct 20 14:47:30 CEST 2008
Daniel Brewer wrote:
> Hello,
>
> Apologies for not providing enough information. It is a two colour
> Agilent array. I was trying to keep the post short, but here is the
> full information (note I didn't design the experiment).
>
> Targets file:
> SlideNumber ArrayNumber FileName Name Cy3 Cy5
> 1 1 Input/1_1.txt 1_1 Scramble Knockdown
> 1 2 Input/1_2.txt 1_2 Knockdown PC3M
> 1 3 Input/1_3.txt 1_3 PNT2 PC3M
> 1 4 Input/1_4.txt 1_4 Pooled PNT2
> 2 2 Input/2_2.txt 2_2 PC3M Scramble
> 2 3 Input/2_3.txt 2_3 PNT2 Scramble
> 3 1 Input/3_1.txt 3_1 PC3M Pooled
> 3 2 Input/3_2.txt 3_2 Pooled Knockdown
> 3 3 Input/3_3.txt 3_3 Scramble Pooled
> 3 4 Input/3_4.txt 3_4 Knockdown PNT2
>
> PC3M = the control cell line
> Knockdown = PC3M with an siRNA knockdown vector
> Scramble = PC3M with a vector with a scrambled sequence
> PNT2 = Another cell line (not of interest here)
> Pooled = poll of knockdowns before you get specific clone, intermediate
> between PCM3 and knockdown - a hetrogenious group (not considered here)
>
> Here is the relevant code (before this the standard steps were used to
> give normalised data without any controls):
>
> #Differential analysis
> design <- modelMatrix(targets,ref="PC3M")
> fit <- lmFit(normNoC, design)
> contrast.matrix <- makeContrasts("Knockdown vs Controls"=(2*Knockdown -
> Scramble)/2, levels=design)
> fit2 <- contrasts.fit(fit, contrast.matrix)
> fit3 <- eBayes(fit2))
>
>> design
> Knockdown PNT2 Pooled Scramble
> [1,] 1 0 0 -1
> [2,] -1 0 0 0
> [3,] 0 -1 0 0
> [4,] 0 1 -1 0
> [5,] 0 0 0 1
> [6,] 0 -1 0 1
> [7,] 0 0 1 0
> [8,] 1 0 -1 0
> [9,] 0 0 1 -1
> [10,] -1 1 0 0
>
>> sessionInfo()
> R version 2.7.2 (2008-08-25)
> x86_64-pc-linux-gnu
>
> locale:
> LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] limma_2.14.7
>
> So I would like to compare the two controls (scramble and PNT2) with the
> knockdown, but I am not sure how to compare one variable in the model
> with two.
I assume you mean PC3M rather than PNT2. Now it depends on whether or
not you want to assume (or maybe check) that the two controls are
essentially the same, and hence want to pool, or if you want to do
knockdown to each control separately.
For the former, this should suffice:
contrast.matrix <- makeContrasts("KvC" = Knockdown - (Scramble +
PC3M)/2, levels = design)
So what we are asking for is the difference between the knockdown and
the average of the two control samples.
An implicit assumption here is that the scramble and PC3M samples have
similar expression values, so you might want to check by adding an
additional term:
contrast.matrix <- makeContrasts("KvC" = Knockdown - (Scramble +
PC3M)/2, "SvP" = Scramble - PC3M, levels = design)
If there are loads of significantly different genes in the SvP contrast,
you might want to rethink the control status of these samples.
For the latter:
contrast.matrix <- makeContrasts("KvS" = Knockdown - Scramble
"KvsC" = Knockdown - PC3M, levels = design)
Here we don't assume the scramble and PC3M samples are similar, and
simply make comparisons individually. If you then wanted to see if the
two control samples seemed similar, you could use decideTests() followed
by vennCounts() and vennDiagram() to make a Venn diagram.
Best,
Jim
>
> I would really appreciate your help with this.
>
> Many thanks
>
> Dan
>
--
James W. MacDonald, M.S.
Biostatistician
Hildebrandt Lab
8220D MSRB III
1150 W. Medical Center Drive
Ann Arbor MI 48109-0646
734-936-8662
More information about the Bioconductor
mailing list