rietho / IPO

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

writeRScript executes code within function? #25

Closed tobigithub closed 7 years ago

tobigithub commented 8 years ago

Hi, the writeRScript function "prints" the optimized parameters for xcms, but at the same time actually executes them when called within a function, not sure if this is intended behavour after an IPO experiment.

Basically the function called from the lipidomics IPO set writeRScript(ppResult$best_settings$parameters, rgResult$best_settings, nSlaves=1)

would write and execute to the console:

library(xcms)

library(Rmpi)

xset <- xcmsSet(method="centWave", peakwidth=c(24.16, 123.5), ppm=10.4, noise=0, snthresh=10, mzdiff=-0.0197, prefilter=c(3, 100), mzCenterFun="wMean", integrate=1, fitgauss=FALSE, verbose.columns=FALSE, nSlaves=1)
xset <- retcor(xset, method="obiwarp", plottype="none", distFunc="cor_opt", profStep=0.66, center=2, response=1, gapInit=0.6976, gapExtend=2.9904, factorDiag=2, factorGap=1, localAlignment=0)
xset <- group(xset, method="density", bw=0.25, mzwid=0.00538, minfrac=0.963, minsamp=1, max=50)

xset <- fillPeaks(xset, nSlaves=1)

Cheers Tobias

glibiseller commented 8 years ago

Hi,

the execution of the code is not intended. In the latest version writeRScript uses message() instead of print() to show the script to the user. I tried to reproduce the error using message("library(xcms)") but it does not actually run library(xcms) on my machine. Also message(paste(1, "+", 2)) does display 1 + 2 but not 3.

Unfortunately I don't have an idea what causes this behaviour. Anyone?

Cheers, Gunnar

rietho commented 7 years ago

@tobigithub is this still an issue, as IPO uses message now?

tobigithub commented 7 years ago

Hi, no, its time to move on.