[BioC] Limma: how to extract mean of groups?
James W. MacDonald
jmacdon at med.umich.edu
Mon Jul 6 21:45:27 CEST 2009
Hooiveld, Guido wrote:
> Hi James,
> Thanks. I indeed had seen that before, but I had the impression the
> 'coefficients' actually are the log2 of the fold change...?!?
> Anywayz, I'll have a closer look at it to make sure I understand it
It depends on how you set up the design matrix. If you have an
intercept, then the coefficients will be the difference between a
baseline level and whatever level you are looking at. However, if you
don't have an intercept, then the coefficients represent the group means.
>> -----Original Message-----
>> From: James W. MacDonald [mailto:jmacdon at med.umich.edu]
>> Sent: 06 July 2009 18:50
>> To: Hooiveld, Guido
>> Cc: bioconductor at stat.math.ethz.ch
>> Subject: Re: [BioC] Limma: how to extract mean of groups?
>> Hi Guido,
>> Hooiveld, Guido wrote:
>>> Dear list,
>>> Is it possible to extract the group means + SD from Limma's output?
>>> I do know that the "Amean" can be extracted (fit2$Amean),
>> but this is
>>> the mean across all arrays/groups, and i am also interested in the
>>> means of the experimental groups.
>> Have you read the relevant help page (hint ?MArrayLM-class)?
>> I get
>> 'MArrayLM' objects do not contain any slots (apart from '.Data')
>> but they should contain the following list components:
>> 'coefficients': 'matrix' containing fitted coefficients or
>> 'stdev.unscaled': 'matrix' containing unscaled standard
>> of the coefficients or contrasts
>> Which appears to be what you want.
>>> Therefore, is it somehow possible to extact the mean (+ SD) of the
>>> groups that are defined by the contrast matrix? Thus in my
>>> case the mean + SD of the WT.Con, WT.WY. KO.Con and KO.WY groups.
>>> targets <- readTargets("targets.txt")
>>> data <- ReadAffy(filenames=targets$FileName)
>>> x.norm <- rma(data)
>>> TS <- paste(targets$Strain, targets$Treatment, sep=".") TS <-
>>> factor(TS, levels=c("WT.Con","WT.WY","KO.Con","KO.WY"))
>>> design <- model.matrix(~0+TS)
>>> colnames(design) <- levels(TS)
>>> fit <- lmFit(eset, design)
>>> cont.matrix <- makeContrasts(WTwyvWTc=WT.WY-WT.Con,
>>> KOwyvKOc=KO.WY-KO.Con, levels=design)
>>> fit2 <- contrasts.fit(fit, cont.matrix)
>>> fit2 <- eBayes(fit2)
>>> Guido Hooiveld, PhD
>>> Nutrition, Metabolism & Genomics Group Division of Human Nutrition
>>> Wageningen University Biotechnion, Bomenweg 2
>>> NL-6703 HD Wageningen
>>> the Netherlands
>>> tel: (+)31 317 485788
>>> fax: (+)31 317 483342
>>> internet: http://nutrigene.4t.com <http://nutrigene.4t.com/>
>>> email: guido.hooiveld at wur.nl
>>> [[alternative HTML version deleted]]
>>> Bioconductor mailing list
>>> Bioconductor at stat.math.ethz.ch
>>> Search the archives:
>> James W. MacDonald, M.S.
>> Douglas Lab
>> University of Michigan
>> Department of Human Genetics
>> 5912 Buhl
>> 1241 E. Catherine St.
>> Ann Arbor MI 48109-5618
James W. MacDonald, M.S.
University of Michigan
Department of Human Genetics
1241 E. Catherine St.
Ann Arbor MI 48109-5618
More information about the Bioconductor