[BioC] 2x2 factorial loop without common reference (pool)
Gordon Smyth
smyth at wehi.EDU.AU
Tue Apr 25 02:34:47 CEST 2006
Dear Francois,
Let's assume you're working with your second (simpler) targets file.
All you need is
design <- modelMatrix(targets, ref="a")
This will give you a matrix with columns "b", "c" and "d" with
actually represent b vs a, c vs a and d vs a. To get the four
comparisons you ask for, you need
cont.matrix <- makeContrasts(avsb=b,avsc=c,bvsd=d-b,cvsd=d-c, levels=design)
then
fit <- lmFit(MA, design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit)
If you wanted the interaction term, this would be: int=d-b-c.
Best wishes
Gordon
PS. Although you don't say explicitly, I'm assuming that a1, a2 etc
represent some sort of biological replication. The above analysis
does not keep track of which array has which biological replicate of
each treatment. If you wanted to do a careful job of that, you would
have no choice but to do a "separate channel" analysis, as Naomi
Altman has suggested separately. If your biological replicates a1, a2
etc are not very different, compared to microarray measurement error,
then the above simpler analysis may be good enough.
Date: Sun, 23 Apr 2006 13:41:22 -0400
>From: "francois fauteux" <francois.fauteux at gmail.com>
>Subject: [BioC] 2x2 factorial loop without common reference (pool)
>To: bioconductor at stat.math.ethz.ch, " Fran?ois fauteux "
> <francois.fauteux at gmail.com>, " Richard B?langer "
> <richard.belanger at plg.ulaval.ca>
>Message-ID:
> <53328b400604231041v51db3863i8bb48b2fbf725229 at mail.gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>Hi;
>
>We are doing an experiment with agilent 44K (3 biological reps,
>complete dye-swap):
>
>a - control
>b - treatment 1
>c - treatment 2
>d - treatment 1 + treatment 2
>
>and I would like to output evidence of the interaction between two
>treatments and effect on gene expression.
>
>24 chips:
>
>SlideNumber Cy3 Cy5
>1 a1 b1
>2 a2 b2
>3 a3 b3
>4 b1 a1
>5 b2 a2
>6 b3 a3
>7 a1 c1
>8 a2 c2
>9 a3 c3
>10 c1 a1
>11 c2 a2
>12 c3 a3
>13 b1 d1
>14 b2 d2
>15 b3 d3
>16 d1 b1
>17 d2 b2
>18 d3 b3
>19 c1 d1
>20 c2 d2
>21 c3 d3
>22 d1 c1
>23 d2 c2
>24 d3 c3
>
>I've done several tests with limma to isolate significant results in
>the following:
>1- a vs b;
>2- a vs c;
>3- b bs d;
>4- c vs d;
>
>with this "targets.txt":
>
>SlideNumber Cy3 Cy5
>1 a b
>2 a b
>3 a b
>4 b a
>5 b a
>6 b a
>7 a c
>8 a c
>9 a c
>10 c a
>11 c a
>12 c a
>13 b d
>14 b d
>15 b d
>16 d b
>17 d b
>18 d b
>19 c d
>20 c d
>21 c d
>22 d c
>23 d c
>24 d c
>
>First option:
>
> > f <- paste(targets$Cy3, targets$Cy5, sep = ".")
> > f <- factor(f, levels = c("a.b", "b.a", "a.c", "c.a", "b.d",
> "d.a", "c.d", "d.a"))
> > design1 <- model.matrix(~0 + f)
>
> > design
> a.b b.a a.c c.a b.d d.b c.d d.c
>1 1 0 0 0 0 0 0 0
>2 1 0 0 0 0 0 0 0
>3 1 0 0 0 0 0 0 0
>4 0 1 0 0 0 0 0 0
>5 0 1 0 0 0 0 0 0
>6 0 1 0 0 0 0 0 0
>7 0 0 1 0 0 0 0 0
>8 0 0 1 0 0 0 0 0
>9 0 0 1 0 0 0 0 0
>10 0 0 0 1 0 0 0 0
>11 0 0 0 1 0 0 0 0
>12 0 0 0 1 0 0 0 0
>13 0 0 0 0 1 0 0 0
>14 0 0 0 0 1 0 0 0
>15 0 0 0 0 1 0 0 0
>16 0 0 0 0 0 1 0 0
>17 0 0 0 0 0 1 0 0
>18 0 0 0 0 0 1 0 0
>19 0 0 0 0 0 0 1 0
>20 0 0 0 0 0 0 1 0
>21 0 0 0 0 0 0 1 0
>22 0 0 0 0 0 0 0 1
>23 0 0 0 0 0 0 0 1
>24 0 0 0 0 0 0 0 1
>
>This gives significant results for each one of the "levels" but does
>not take into account the dye-swap (i.e "a.b" and "b.a" are considered
>independent).
>
>Other tested option is:
> > design2 <- modelMatrix(targets,ref="a")
>
> > design
> p s sp
>ab1 0 1 0
>ab2 0 1 0
>ab3 0 1 0
>ba1 0 -1 0
>ba2 0 -1 0
>ba3 0 -1 0
>ac1 1 0 0
>ac2 1 0 0
>ac3 1 0 0
>ca1 -1 0 0
>ca2 -1 0 0
>ca3 -1 0 0
>bd1 0 -1 1
>bd2 0 -1 1
>bd3 0 -1 1
>db1 0 1 -1
>db2 0 1 -1
>db3 0 1 -1
>cd1 -1 0 1
>cd2 -1 0 1
>cd3 -1 0 1
>dc1 1 0 -1
>dc2 1 0 -1
>dc3 1 0 -1
>
>This gives results for "b" effect, "c" effect, and "d" effect.
>However, I could'nt get results for the 4 comparisons of interest
>(even though the matrix is coherent).
>
>Questions:
>
>1 - What would be the best option (design and operations) to get to
>contrasts of interest considering that the experiment has a 4
>treatments in a factorial design without common reference (a vs b, a
>vs c, b vs d, c vs d) and taking into account the dye-effect;
>
>2- Is this method (4 contrasts) the best one considering that
>treatment "d" is a combination of treatments "b" and "c" (factorial
>type design). How could one directly get to identify genes
>differentially expressed due to the interaction between treatment "b"
>and treatment "c" (i.e effect of "d" over "b" and "c").
>
>In Limma Users Guide and elsewhere on this forum, I could not find a
>clear description of how this type of analysis should be performed,
>even though it is a simple design (i.e 2X2 factorial without a common
>reference - two color arrays - complete dye swap).
>
>Thanks for your time, best regards.
>
>Fran?ois Fauteux
>?tudiant ? la ma?trise en biologie v?g?tale
>Centre de recherche en horticulture
>Universit? Laval
>francois.fauteux at gmail.com
More information about the Bioconductor
mailing list