[BioC] Limma - using both array and spot weights in lmFit

De-Jian,ZHAO zhaodj at ioz.ac.cn
Thu May 3 15:25:36 CEST 2007


> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 2 May 2007 15:04:26 +0200
> From: "Jakob Hedegaard" <Jakob.Hedegaard at agrsci.dk>
> Subject: [BioC] Limma - using both array and spot weights in lmFit
> To: <bioconductor at stat.math.ethz.ch>
> Message-ID:
> 	<EA09C4B2B0F16E44B8F3311629493C0D0346E77C at DJFPOST01.djf.agrsci.dk>
> Content-Type: text/plain;	charset="iso-8859-1"
>
> Hi List
>
> I use spot weights (binary) to A) ignore spots "Not found" in GenePix
> during normalization:
>
> RG <- read.maimages(fnames, source="genepix", path=datadir,
> columns=columns, other.columns=other.columns,
> wt.fun=wtflags(weight=0,cutoff=0))
> MA <- normalizeWithinArrays(RG, method="loess", weights=RG$weights,
> bc.method="none")
>
> ... and B) include "cDNA" spots only in lmFit (ignoring various control
> spots):
>
> MA$weights[MA$genes$Status!="cDNA",] <- 0
> fit <- lmFit(MA, design, ndups=2, weights=MA$weights, method="robust",
> correlation=cor$cor)
>
>
> Does the use of array weights in lmFit...
>
> arrayw <- arrayWeights(MA, design, weights=MA$weights)
> fit2 <- lmFit(MA, design, ndups=2, weights=arrayw, method="robust",
> correlation=cor$cor)
>
> ... exclude the individual spot weights?
>
> Are all spots from an "array weighted" array given the same weight in
> lmFit - thereby ignoring the "original" spot weights (in MA$weights)?
>
> How can the various control spots then be ignored in lmFit?

The following codes do this job.
i<-MA$genes$Status=="cDNA"	#Filter for all cDNA spots.
corMAi<-duplicateCorrelation(MA[i,],design,ndups=2)
fitMAi<-lmFit(MA[i,], design, ndups=2,
correlation=corMAi$consensus.correlation)
contrast.matrix<-makeContrasts(......) #Fabricate your own contrasts.
fit2MAi<-contrasts.fit(fitMAi,contrast.matrix)
fit2MAi<-eBayes(fit2MAi)

>
>
>
>> arrayw
>         1         2         3         4         5         6         7
>    8
> 0.9003237 0.5224861 0.8302243 0.7377452 0.6727376 1.1749278 1.0347314
> 0.4233758
>         9        10        11        12        13        14        15
>   16
> 0.5922037 0.5770843 1.1066639 0.5070331 1.1136625 0.8131061 0.9608490
> 0.3578452
> ............
>        81        82        83        84        85        86        87
>   88
> 1.1762249 0.8947206 1.0537712 1.2835124 1.4650973 1.8305352 1.4610934
> 1.4539068
>        89        90        91        92        93        94        95
>   96
> 1.3118581 1.1803798 1.5399506 1.2547482 1.3258992 1.0470026 1.0130834
> 1.1672451
>
>
>> sessionInfo()
> R version 2.4.1 (2006-12-18)
> x86_64-redhat-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"
> [7] "base"
>
> other attached packages:
>     MASS  statmod      GDD    limma
> "7.2-30"  "1.3.0"  "0.1-8" "2.9.16"
>
>
>
> Looking forward hearing from you
>
> Jakob Hedegaard
> Project scientist
>
> UNIVERSITY OF AARHUS
> Faculty of Agricultural Sciences
> Dept. of Genetics and Biotechnology
> Blichers All? 20, P.O. BOX 50
> DK-8830 Tjele



More information about the Bioconductor mailing list