[BioC] dealing with NAs in limma
Francois Pepin
fpepin at cs.mcgill.ca
Wed Jun 13 21:58:21 CEST 2007
Hi,
I've got some 0-weight features on my arrays that are leading to NAs in
limma where the log ratio cannot be estimated.
Strangely to me, this also happens when I do differential expressions
between arrays that do not have any NAs:
mat<-matrix(c(rnorm(24),NA),5,5)
#careful with line break here
design<-matrix(c(-1,1,0,0,0,0,0,-1,1,0,0,0,0,0,1),5,3,dimnames=list
(row=1:5,col=letters[1:3]))
fit<-eBayes(lmFit(mat,design=design))
fit2<-eBayes(contrasts.fit(fit,makeContrasts(a-b,levels=design)))
#as expected, we have one NA in fit for the c sample
> fit$coefficients
a b c
[1,] 0.5935915 1.3025382 -0.1752245
[2,] 0.6852898 0.3691623 0.8395249
[3,] 0.4190820 1.3200322 0.6059554
[4,] -0.5389328 1.5717505 0.4173681
[5,] -0.1753151 0.7628686 NA
#but also when we do a-b
> fit2$coefficients
Contrasts
a - b
[1,] -0.7089467
[2,] 0.3161274
[3,] -0.9009502
[4,] -2.1106833
[5,] NA
Is this the expected behavior? Would there be any way to go around it?
This means that any feature that has an NA in both samples of a dye swap
will be uninformative for any other contrasts.
> sessionInfo()
R version 2.5.0 (2007-04-23)
x86_64-unknown-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"
[6] "methods" "base"
other attached packages:
limma
"2.10.4"
Francois
More information about the Bioconductor
mailing list