Skip to main content
Topic: Error with group.density (Read 4967 times) previous topic - next topic

Error with group.density

I have experienced a strange error that I have not seen before in my years as an xcms user. The error comes from a C call in group.density so I have a hard time digging more into it my self.

When running a specific set of samples (38 LC-qTOF samples) I get the following error when i run group:

Code: [Select]
Error in rectUnique(groupmat[, c("mzmin", "mzmax", "rtmin", "rtmax"),  : 
  NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf

> traceback()
9: .C("RectUnique", m, as.integer(order - 1), nr, nc, as.double(xdiff),
      as.double(ydiff), logical(nrow(m)), DUP = FALSE, PACKAGE = "xcms")
8: rectUnique(groupmat[, c("mzmin", "mzmax", "rtmin", "rtmax"),
      drop = FALSE], uorder)
7: .local(object, ...)
6: group.density(object, ...)
5: group.density(object, ...)
4: do.call(method, alist(object, ...))
3: .local(object, ...)
2: xcms::group(xset, mzwid = 0.1, bw = 10, minfrac = 0, minsamp = 0)
1: xcms::group(xset, mzwid = 0.1, bw = 10, minfrac = 0, minsamp = 0)

The parameters that provokes this is the combination of minsamp=0 and minfrac=0 - either alone works fine...

What happens is that a single row in the return from the C call contains inf and -inf instead of numbers.

Can anyone with insight into the C functions elaborate on what can cause a group to consist of inf?

best wishes
Thomas

Code: [Select]
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          LC_TIME=English_United States.1252   

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

other attached packages:
[1] pepmaps_1.7-0  xlsx_0.5.0    xlsxjars_0.4.0 rJava_0.9-3    Rcpp_0.9.14 

loaded via a namespace (and not attached):
 [1] Biobase_2.18.0    BiocGenerics_0.4.0 Biostrings_2.26.0  caret_5.15-044    codetools_0.2-8    colorspace_1.1-1  dichromat_1.2-4    digest_0.5.2      ggdendro_0.1-07    ggplot2_0.9.2.1 
[11] grid_2.15.1        gridExtra_0.9.1    gtable_0.1.1      IRanges_1.16.2    labeling_0.1      lattice_0.20-10    MASS_7.3-21        memoise_0.1        munsell_0.4        mzR_1.4.0       
[21] OutlierD_1.22.0    parallel_2.15.1    pcaMethods_1.48.0  pcaPP_1.9-48      plyr_1.7.1        proto_0.3-9.2      RColorBrewer_1.0-5 reshape2_1.2.1    scales_0.2.2      stats4_2.15.1   
[31] stringr_0.6.1      tools_2.15.1      xcms_1.34.0