2015-05-26 58 views
-2

子集,其产生相同的NaN误差的数据:麻烦正火数据:

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 
1 10901 1147 964 84 116 91 35 1234 7831 61 440 10 
2 492 6062 342 9 1886 48 3822 396 1039 30 1 173 
3 289 136 14 23 3833 50 2758 3559 227 3967 187 190 
4 981 4 2 18 19 45 74 3754 548 407 2869 44 
5 -1 773 67 48 272 1573 53 30 316 209 30 332 
6 54 154 8920 78 89 422 4719 8 1082 779 683 1736 
7 34 2753 91 15575 468 3856 3 10056 72 133 325 272 
8 60 8 120 4589 45280 253 14 6 6 569 2324 16915 
9 287 8 5 2441 14 4542 1 239 952 1074 121 37 
10 12 1 1463 61 43 420 834 11 2057 12 95 -2 

我有一个数据矩阵和欲正常化阵列内,我已经使用这个代码:

library (affy) 
loess.matrix<-normalize.loess(data.matrix,subset=1:nrow(data.matrix)) 

,我得到这个错误:

Warning message: In normalize.loess(sample, subset = 1:nrow(sample)) : NaNs produced

我也得到了较大的datase以下错误吨,但我认为问题的根源在于生产NaN值:

Error in simpleLoess(y, x, w, span, degree, parametric, drop.square, normalize, : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: In normalize.loess(data.matrix, subset = 1:nrow(data.matrix)) : NaNs produced

有没有人遇到过这个?

+6

我不知道我们将如何能够帮助不重复的例子 – Dason

+1

参见[如何创建一个可重复的例子(http://stackoverflow.com/questions/5963269/how-to -ma-r-reproducible-example) – MrFlick

+0

我尽可能地更新了原文。我很确定这是由于NaN价值产生于@Dason – minoo

回答

0

问题是我的数据包含负值,并且当执行低信号标准化时,正在产生NaN值。

我通过应用下面的逻辑处理负值,这 允许我成功地规范我的数据集。

data.matrix[data.matrix <= 0]=1e-15