rietho / IPO

A Tool for automated Optimization of XCMS Parameters
http://bioconductor.org/packages/IPO/
Other
34 stars 20 forks source link

Error using IPO with mzR 2.3.1 #11

Closed ekemmler closed 9 years ago

ekemmler commented 9 years ago

Hi,

by using optimizeRetGroup() with mzR 2.3.1 (devel version) I get an Error:

starting new DoE with: $gapInit [1] 0.00 0.48

$gapExtend [1] 2.04 2.76

$profStep [1] 0.71 1.00

$bw [1] 20.4 39.6

$minfrac [1] 0.26 0.74

$mzwid [1] 0.013 0.037

$distFunc [1] "cor_opt"

$plottype [1] "none"

$response [1] 1

$factorDiag [1] 2

$factorGap [1] 1

$localAlignment [1] 0

$retcorMethod [1] "obiwarp"

$minsamp [1] 1

$max [1] 50

$center [1] 1 Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘peaks’ for signature ‘"xcmsSet"’ Calls: retcor ... retcor.obiwarp -> retcor.obiwarp -> .local -> peaks ->

Traceback:

traceback() 15: structure(x, class = unique(c("AsIs", oldClass(x)))) 14: FUN(X[[5L]], ...) 13: lapply(X = X, FUN = FUN, ...) 12: sapply(list(...), I) 11: FO(x1, x2, x3, x4, x5, x6) 10: eval(expr, envir, enclos) 9: eval(predvars, data, env) 8: model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) 7: model.frame(Terms, newdata, na.action = na.action, xlev = object$xlevels) 6: predict.lm(model, testdata) 5: predict(model, testdata) 4: getMaxSettings(testdata, model) 3: getMaximumLevels(retcor_result$model) 2: retGroupExperimentStatistic(retcor_result, subdir, iterator, xset) 1: optimizeRetGroup(xset = xSetRG, params = retcor_parameter, nSlaves = nSlaves, subdir = outdir)

kind regards, Emanuel

glibiseller commented 9 years ago

Hi Emanuel,

does mzR-version 2.2.1 still work?

best regards, Gunnar

ekemmler commented 9 years ago

Hi Gunnar,

unfortunately, with 2.2.1 there is the same Error. With mzR 2.0.0 it is still working.

kind regards

glibiseller commented 9 years ago

Thanks for telling me!

I'm going to update my R-packages and see if I can reproduce and fix the bug.

thanks, Gunnar

sneumann commented 9 years ago

Unfortunately https://github.com/sneumann/mzR/blob/master/NEWS is a bit sketchy about the changes between 2.0.0 and 2.2.1 Emmanuel is currently writing a unit test based on mtbls2

sneumann commented 9 years ago

This could be the beginning of a unitTest:

library(xcms)
library(IPO)

data("mtbls2")

# Workaround: should actually happen in mtbls2/R/zzz.R
attr(mtbls2Set, "filepaths") <- file.path(find.package("mtbls2"), gsub("/", .Platform$file.sep, attr(mtbls2Set, "filepaths")))

nSlaves <- 4
outdir <- tempdir()

retcor_parameter <- getDefaultRetGroupStartingParams()
resultRG <- optimizeRetGroup(xset=mtbls2Set, 
                                                        params = retcor_parameter,
                                                        nSlaves = nSlaves, 
                                                        subdir = outdir)  
sneumann commented 9 years ago

It is a namespace issue:

Attaching package: ‘igraph’

The following object is masked from ‘package:rsm’:

    star

The following object is masked from ‘package:xcms’:

    groups

A first workaround is to load "igraph" FIRST in every script:

library(igraph)
library(xcms)
library(IPO)   

Proper fix will come later, and needs to go to xcms.