2013-10-16 125 views
0

我试图从lumi包使用normalize.loess()lumiN()simpleLoess中的错误:NA/NaN/Inf在外部函数调用

在第38次迭代,在loess()功能失败与

Error in simpleLoess(y, x, w, span, degree, parametric, drop.square, normalize, : 
NA/NaN/Inf in foreign function call (arg 1) 

我已搜查,并可能与事实的参数丢失有关。

我使用debug(loess)进行了检查,并且定义了所有参数。

,因为他们是非常大的(13237x566)我不能发布数据,也因为他们是保密的,但..我发现这一点:

  • 一个小例子工程(随机矩阵20×)
  • 正常化之间失败塔1和38
  • 仅使用那些列
  • 相同正规化成功完成
  • 它不是一个存储问题
  • 矩阵没有NA值

我错过了什么?

感谢

代码

raw_matrix <- lumiR('example.txt') 
norm_matrix <- lumiN(raw_matrix, method='loess') 
Perform loess normalization ... 
Done with 1 vs 2 in iteration 1 
Done with 1 vs 3 in iteration 1 
Done with 1 vs 4 in iteration 1 
Done with 1 vs 5 in iteration 1 
Done with 1 vs 6 in iteration 1 
Done with 1 vs 7 in iteration 1 
Done with 1 vs 8 in iteration 1 
Done with 1 vs 9 in iteration 1 
Done with 1 vs 10 in iteration 1 
Done with 1 vs 11 in iteration 1 
Done with 1 vs 12 in iteration 1 
Done with 1 vs 13 in iteration 1 
Done with 1 vs 14 in iteration 1 
Done with 1 vs 15 in iteration 1 
Done with 1 vs 16 in iteration 1 
Done with 1 vs 17 in iteration 1 
Done with 1 vs 18 in iteration 1 
Done with 1 vs 19 in iteration 1 
Done with 1 vs 20 in iteration 1 
Done with 1 vs 21 in iteration 1 
Done with 1 vs 22 in iteration 1 
Done with 1 vs 23 in iteration 1 
Done with 1 vs 24 in iteration 1 
Done with 1 vs 25 in iteration 1 
Done with 1 vs 26 in iteration 1 
Done with 1 vs 27 in iteration 1 
Done with 1 vs 28 in iteration 1 
Done with 1 vs 29 in iteration 1 
Done with 1 vs 30 in iteration 1 
Done with 1 vs 31 in iteration 1 
Done with 1 vs 32 in iteration 1 
Done with 1 vs 33 in iteration 1 
Done with 1 vs 34 in iteration 1 
Done with 1 vs 35 in iteration 1 
Done with 1 vs 36 in iteration 1 
Done with 1 vs 37 in iteration 1 
Done with 1 vs 38 in iteration 1 
Error in simpleLoess(y, x, w, span, degree, parametric, drop.square, normalize, : 
    NA/NaN/Inf in foreign function call (arg 1) 

环境

sessionInfo()

> sessionInfo() 
R version 3.0.2 (2013-09-25) 
Platform: x86_64-pc-linux-gnu (64-bit) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C    
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8  
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=en_US.UTF-8  LC_NAME=C     
[9] LC_ADDRESS=C    LC_TELEPHONE=C    
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C  

attached base packages: 
[1] parallel stats  graphics grDevices utils  datasets methods 
[8] base  

other attached packages: 
[1] affy_1.38.1   lumi_2.12.0   Biobase_2.20.0  
[4] BiocGenerics_0.6.0 BiocInstaller_1.10.2 

loaded via a namespace (and not attached): 
[1] affyio_1.28.0   annotate_1.38.0  AnnotationDbi_1.22.6 
[4] beanplot_1.1   Biostrings_2.28.0  colorspace_1.2-4  
[7] DBI_0.2-7    GenomicRanges_1.12.5 grid_3.0.2   
[10] illuminaio_0.2.0  IRanges_1.18.1  KernSmooth_2.23-10 
[13] lattice_0.20-24  limma_3.16.8   MASS_7.3-29   
[16] Matrix_1.0-14   matrixStats_0.8.12 mclust_4.2   
[19] methylumi_2.6.1  mgcv_1.7-27   minfi_1.6.0   
[22] multtest_2.16.0  nleqslv_2.0   nlme_3.1-111   
[25] nor1mix_1.1-4   preprocessCore_1.22.0 RColorBrewer_1.0-5 
[28] reshape_0.8.4   R.methodsS3_1.5.2  RSQLite_0.11.4  
[31] siggenes_1.34.0  splines_3.0.2   stats4_3.0.2   
[34] survival_2.37-4  tcltk_3.0.2   tools_3.0.2   
[37] XML_3.98-1.1   xtable_1.7-1   zlibbioc_1.6.0 
+1

请将您的示例重现:http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – csgillespie

+0

@csgillespie尽可能更新 – gc5

回答

8

不知何故,我想通了,什么是不工作: 我试图正常化的log 2矩阵。据我所知normalize.loess默认情况下日志转换输入矩阵,所以这将被对数转换两次。

这是一个问题,因为在输入矩阵一些值均等于1,因此:

log2(log2(1)) = Inf 

清楚未归一化过程中允许作为值。

希望这可以帮助别人。