Entering edit mode
Gildas Le Corguillé
▴
10
@gildas-le-corguille-4366
Last seen 11.3 years ago
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
