rietho / IPO

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

optimizeRetGroup ignoring retcorMethod="loess" #36

Closed sneumann closed 8 years ago

sneumann commented 8 years ago

Hi, it seems that optimizeRetGroup() is somehow still using method="obiwarp" even if the retcorGroupParameters were created with getDefaultRetGroupStartingParams(retcorMethod="loess")

retcorGroupParameters <- getDefaultRetGroupStartingParams(retcorMethod="loess")
retcorGroupParameters$profStep <- 1

resultRetcorGroup <- optimizeRetGroup(xset=optimizedXcmsSetObject, params=retcorGroupParameters, 
                                      nSlaves=1, subdir="rsmDirectory")

results in:

> resultRetcorGroup$best_settings$retcorMethod
[1] "obiwarp"

Yours, Steffen

rietho commented 8 years ago

That's really interesting. On a first quick glance, I could not find the problem. I'll have a look tomorrow and fix it asap.

sneumann commented 8 years ago

Indeed, my fault. When trying to create a minimal standalone example, I could not reproduce the issue. Case closed :-)

library(IPO)
library(faahKO)
library(RUnit)

xsg <- group(faahko)

retcorGroupParameters <- getDefaultRetGroupStartingParams(retcorMethod="loess")

retcorGroupParameters$profStep <- 1
retcorGroupParameters$missing <- 0
retcorGroupParameters$extra <- 0
retcorGroupParameters$minfrac <- 0.75
retcorGroupParameters$max <- 50

resultRetcorGroup <- optimizeRetGroup(xset=xsg, params=retcorGroupParameters, nSlaves=1, subdir="rsmDirectory")

checkEquals(resultRetcorGroup$best_settings$retcorMethod, "loess")
rietho commented 8 years ago

So the issue is still persisting?

sneumann commented 8 years ago

In a subsequent step writeRScript(paramsPP, resultRetcorGroup$best_settings, 1) I had left out the $best_settings , and that mislead me to thinking that something was wrong with "loess". Sorry for the confusion.

rietho commented 8 years ago

No worries. It's good to hear, that optimizeRetGroup correctly recognizes the method for retention time correction.