rietho / IPO

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

error upon peak picking optimisation #3

Closed sneumann closed 9 years ago

sneumann commented 9 years ago

Hi,

I am getting an "object 'x1' not found" in a traceback(), see below. For debugging, I have restricted the parameters to be optimised to only ppm. This happens regardless whether or not I set nSlaves. What do I have to check to debug this further ?

Yours, Steffen

peakpickingParameters <- getDefaultXcmsSetStartingParams('centWave')

if (DEBUG) {
   ## reduce what gets optimised
   peakpickingParameters$min_peakwidth <- 20
   peakpickingParameters$max_peakwidth <- 20
   peakpickingParameters$mzdiff <- 0
   peakpickingParameters$ppm <- c(30,60)
}

iporesult <- optimizeXcmsSet(files=msfile,
                             params=peakpickingParameters,
                             subdir="/tmp")
Error in lapply(X = X, FUN = FUN, ...) : object 'x1' not found
> 
> traceback()
16: lapply(X = X, FUN = FUN, ...)
15: sapply(list(...), I)
14: FO(x1)
13: eval(expr, envir, enclos)
12: eval(predvars, data, env)
11: model.frame.default(formula = resp ~ FO(x1) + +PQ(x1), data = design, 
        drop.unused.levels = TRUE)
10: stats::model.frame(formula = resp ~ FO(x1) + +PQ(x1), data = design, 
        drop.unused.levels = TRUE)
9: eval(expr, envir, enclos)
8: eval(mf, parent.frame())
7: lm(formula = resp ~ FO(x1) + +PQ(x1), data = design)
6: eval(expr, envir, enclos)
5: eval(CALL, parent.frame())
4: rsm(formula, data = design)
3: createModel(xcms_result$design, params$to_optimize, resp)
2: xcmsSetStatistic(xcms_result, subdir, iterator)
1: optimizeXcmsSet(files = msfile, params = peakpickingParameters, 
       subdir = paste(outdir, basename(msfile), sep = "/"))
sneumann commented 9 years ago

Gunnar suggested that the optimisation requires at least to parameters to be optimised. So to fail gracefulle, we need to check " length(which(sapply(peakpickingParameters, length)>1))>1" at the beginning of optimizeXcmsSet() (and likely also grouping etc)

glibiseller commented 9 years ago

I'll soon add a new version which simply tests different levels and uses the best level as center for the next DoE.

glibiseller commented 9 years ago

The branch supportSingleParameterOptimization contains support for single parameter optimization. Since only one parameter is optimized within each DoE nine different levels are tested (instead of three levels CCD tests).

e.g: level <- c(10,20) seq(min(level), max(level), diff(level)/8)

This simple approach leads to redundant level testing in consecutive DoEs which should be avoided in a final version.

glibiseller commented 9 years ago

merged into master branch