Skip to main content
Topic: Common features (Read 4489 times) previous topic - next topic

Common features

Importing files in metaXCMS and filtering is no problem, but when I try to find the common features (with m/z tolerance 0.01 and retention time tolerance 60s), no Venn diagram is shown and the following message appears in R:
Error in function (x)  : object 'CommonFeaturesTab.continue' not found
What can I do about this?

Re: Common features

Reply #1
There is no such function in metaXCMS.  Did you modify the source code ?

If you report bugs, please include as many details as possible:
    the R, metaXCMS and XCMS version you are using, i.e. the output of
   
Code: [Select]
sessionInfo()
    the steps to reproduce the problem
    if an R function errors out, the exact place of the error can be shown by typing
 
Code: [Select]
   traceback()

Re: Common features

Reply #2
Here you can find the detailed information:

> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: i386-w64-mingw32/i386 (32-bit)

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

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

other attached packages:
 [1] RANN_2.2.1          gstat_1.0-16        sp_1.0-8            xcms_1.34.0        mzR_1.4.7          Rcpp_0.10.3        Biobase_2.18.0      BiocGenerics_0.4.0
 [9] RGtk2_2.20.25      cairoDevice_2.19    BiocInstaller_1.8.3

loaded via a namespace (and not attached):
[1] codetools_0.2-8  grid_2.15.3      intervals_0.14.0 lattice_0.20-13  metaXCMS_0.1.20  spacetime_1.0-4  tools_2.15.3    xts_0.9-3        zoo_1.7-9   

> traceback()
1: function (x)
  {
      mztol <- as.numeric(gtkEntryGetText(CommonFeaturesTab.mz.entry))
      if (is.na(mztol)) {
          dialog <- gtkMessageDialogNew(mainWindow, c("modal",
              "destroy-with-parent"), "error", "ok", "Please enter valid m/z tolerance !n")
          dialog$run()
          dialog$destroy()
          gtkEntrySetText(CommonFeaturesTab.mz.entry, DEFAULT_MZ_DEV)
          return()
      }
      rttol <- as.numeric(gtkEntryGetText(CommonFeaturesTab.rt.entry))
      if (is.na(rttol)) {
          dialog <- gtkMessageDialogNew(mainWindow, c("modal",
              "destroy-with-parent"), "error", "ok", "Please enter valid retention time tolerance !n")
          dialog$run()
          dialog$destroy()
          gtkEntrySetText(CommonFeaturesTab.rt.entry, DEFAULT_RT_DEV)
          return()
      }
      nfiltered <- sapply(xcmsFiles, function(x) nrow(x$filtered))
      if (any(nfiltered == 0)) {
          dialog <- gtkMessageDialogNew(mainWindow, c("modal",
              "destroy-with-parent"), "error", "ok", paste("The filtered dataset #",
              which(nfiltered == 0), " contains no features using the current filtering parameters.n",
              "Please adjust filtering parameters !n", sep = ""))
          dialog$run()
          dialog$destroy()
          return()
      }
      n <- length(xcmsFiles)
      xs <- createXcmsSet()
      pwindow <- gtkWindowNew("toplevel", FALSE)
      pwindow$title <- "Calculating alignment ..."
      pwindow$setBorderWidth(8)
      pwindow$setSizeRequest(400, PROGRESS_BAR_WIDTH)
      pwindow$setPosition("center")
      bp = gtkProgressBarNew()
      pwindow$add(bp)
      bp$setFraction(0.1)
      pwindow$show()
      gtkWait()
      progressCallback <- function(progress) {
          bp$setFraction(progress$group.nearest)
          gtkWait()
      }
      xs@progressCallback <- progressCallback
      xsa <<- group.nearest.meta(xs, mzCheck = mztol, rtCheck = rttol,
          kNN = 20)
      cat("n")
      pwindow$destroy()
      CommonFeaturesTab.continue$setSensitive(TRUE)
      CommonFeaturesTab.save.png$setSensitive(TRUE)
      CommonFeaturesTab.save.pdf$setSensitive(TRUE)
      CommonFeaturesTab.export.commonFeatures.table$setSensitive(TRUE)
      CommonFeaturesTab.export.allFeatures.table$setSensitive(TRUE)
      CommonFeaturesTab.export.commonFeatures.table.detailed$setSensitive(TRUE)
      CommonFeaturesTab.export.allFeatures.table.detailed$setSensitive(TRUE)
      gv <- groupval(xsa, method = "medret", value = "index")
      tmp <- checkSubtract(gv)
      gv <- tmp$gv
      gvbin <<- as.data.frame(!is.na(gv))
      if (ncol(gvbin) > 1 && ncol(gvbin) < 6) {
          dev.set(CommonFeaturesTab.plot.dev)
          plot(1, type = "n", axes = FALSE, xlab = "", ylab = "")
          venn(gvbin)
      }
      else cat("Result has ", ncol(gvbin), " column(s), not showing Venn diagram. n")
      cat("t -->", nrow(gvbin), "common features. n")
  }(<pointer: 0x093e1990>)

Re: Common features

Reply #3
Looks all OK to me. I need more information to reproduce the problem. can you send me the .tsv files and the parameters that you used ?

Re: Common features

Reply #4
The problem is solved by installing earlier versions of R (2.14.2) and metaXCMS (0.1.19).

Re: Common features

Reply #5
I do not recommend downgrading metaXCMS to 0.1.19. You might get strange results unless you use it in combination with XCMS versions >= 1.35.7.
The only difference between metaXCMS 01.1.19 and 0.1.20 is a hardwired group.nearest() function from an older version of XCMS, a version that was known to work well with metaXCMS.

It turned out that there was a serious bug in XCMS' group.nearest (in XCMS versions  1.33.4 - 1.35.6) which completely ignored the peaks from the first sample.
This bug was fixed in XCMS 1.35.7.

Anyway, without the actual data I'm unable to reproduce this problem. I just tried using the combination of  R 3.0.0 and metaXCMS 0.1.20 and the data from the Nature Protocol and everything works as expected.

Re: Common features

Reply #6
Although this is almost two years old, I ran into the same issue recently, but solved it by uninstalling and re-installing GTK. The issue seems to have something to do with the fourth tab in metaXCMS, because before uninstalling and reinstalling it was never displayed, and there was no "Continue" button at the bottom of the third page (which is presumably why it would give an error about the continue button).