[BioC] Limma - avereps - problems with NA
Gordon K Smyth
smyth at wehi.EDU.AU
Wed Dec 1 04:12:38 CET 2010
Dear Gildas,
Yes, I agree, thanks for pointing out the problem. I have committed a fix
to the package.
The older code in limma 2.18.2 was slower but correct. The later code was
fast but didn't treat NAs correctly. The code should now be both fast and
correct.
Note, the same issue affected avearrays() as avereps(), and both have been
fixed.
Best wishes
Gordon
> Date: Fri, 26 Nov 2010 17:12:55 +0100
> From: Gildas Le Corguill? <lecorguille at sb-roscoff.fr>
> To: bioconductor at stat.math.ethz.ch
> Subject: [BioC] Limma - avereps - problems with NA
>
> Hi,
>
>
> I have a question about the function avereps in the limma package.
> When I compare the relative outputs of this function in limma.2.18.2 and
> in the last version limma.3.6.6, I find different results.
>
> If we take for example a gene with two probes :
> - probe1$M = 2
> - probe2$M = NA
>
> The results will be :
> - for limma.2.18.2 : 2
> - for limma.3.6.6 : 1
>
> The codes are :
> - for limma.2.18.2 :
> for (i in 1:length(u)) y[i,] <-
> colMeans(x[ID==u[i],,drop=FALSE],na.rm=TRUE)
> - for limma.3.6.6 :
> rowsum(x,ID,reorder=FALSE,na.rm=TRUE)/as.vector(table(ID))
>
> So :
> - for limma.2.18.2 :
> colMeans(as.matrix(c(2,NA)),na.rm=TRUE)
> [1] 2
> - for limma.3.6.6 : (2 + 0) / 2 = 1
> rowsum(as.matrix(c(2,NA)),c(1,1),na.rm=TRUE)/as.vector(table(c(1,1)))
> [,1]
> 1 1
>
> For me, NA don't mean 0, so do you agree with me ?
>
> Cheers
>
> Gildas
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list