[BioC] Differential expression in time series
James W. MacDonald
jmacdon at med.umich.edu
Tue May 22 15:37:35 CEST 2007
Hi Lev,
Lev Soinov wrote:
> Dear List,
> On the page 49 of the LIMMA user guide there is an example of how to make a difference of differences in experiments with several factors:
>
> "Which genes respond differently in the mutant relative to the wild-type?
> > cont.dif <- makeContrasts(
> + Dif6hr =(mu.6hr-mu.0hr)-(wt.6hr-wt.0hr),
> + Dif24hr=(mu.24hr-mu.6hr)-(wt.24hr-wt.6hr),
> + levels=design)
> > fit2 <- contrasts.fit(fit, cont.dif)
> > fit2 <- eBayes(fit2)
> > topTableF(fit2, adjust="BH")"
>
> I use a very similar code to find differences between time effects and strain effects.
> I have two strains (B and W) and two different time points (2 and 1 hours). I am trying to find genes which respond differently:
> 1. in B vs W, when comparing time points 1 and 2 (i.e. I compare BvsW in time point 1 to BvsW in time point 2)
> 2. in time in different strains (i.e. I compare B1vsB2 versus W1vsW2)
>
> I am getting the same results, or they should be the same?
> Could you comment on whether this is a right way to analyse time series?
It appears you want to test for the interaction between time and strain.
Both of your points (1 and 2 above) are essentially identical. You
want to know what genes react differently over time in the two strains
(and worded differently, but meaning the same thing - what genes react
differently between the strains at different times). These two things
are verbo-algebraically the same (yup, new word. My next move is to
start a new Wikipedia entry describing exactly what it means ;-D)
>
> My code is below.
>
>
> Thank you,
> Lev.
>
> > temp<-rma(data)
> > targets <- readTargets("Targets.txt")
>
>>lev <- c("W.1","B.1","W.2","B.2")
>>f <- factor(targets$Target, levels=lev)
>>design <- model.matrix(~0+f)
>>colnames(design) <- lev
>>fit <- lmFit(temp, design)
>>cont.dif <- makeContrasts(Diff.Time=(B.2-W.2)-(B.1-W.1), Diff.Strain=(B.2-B.1)-(W.2-W.1), levels=design)
As the statements above are verbo-algebraically the same, these two
terms are algebraically the same.
(B.2-W.2)-(B.1-W.1) = (B.2-B.1)-(W.2-W.1)
Hence you should get the same results from each contrast. And yes, this
contrast does give you the interaction.
Best,
Jim
>>fit2 <- contrasts.fit(fit, cont.dif)
>>fit2 <- eBayes(fit2)
>
>
> I am getting the same results for both coefficients:
>
>>results<-decideTests(fit2, method="separate", p=0.01, lfc=1)
>>summary(results)
>
> Diff.Time Diff.Strain
> -1 61 61
> 0 44951 44951
> 1 89 89
>
> My target file is:
> FileName Target
> 3517 W.1
> 3518 W.1
> 3519 W.1
> 3520 W.1
> 3521 W.1
> 3522 B.1
> 3524 B.1
> 3525 B.1
> 3526 B.1
> 3527 W.2
> 3528 W.2
> 3529 W.2
> 3530 W.2
> 3531 B.2
> 3532 B.2
> 3533 B.2
> 3534 B.2
>
>
>
> ---------------------------------
> Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your freeaccount today.
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
More information about the Bioconductor
mailing list