rietho / IPO

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

How to optimize the centWave parameter prefilter two values #52

Closed ljsjwly closed 7 years ago

ljsjwly commented 7 years ago

Hello @sneumann @rietho @glibiseller , I'm trying to optimize the parameters of XCMS, but I found the code of "matchedfilter" in the instruction and it's easy to use. However, I know little about "centWave", I refer to the code from Titan in the issue"optimization of time"

I also read the instruction: "Currently the xcms peak picking methods centWave and matchedFilter are supported. The parameter peakwidth of the peak picking method centWave needs two values defining a minimum and maximum peakwidth. These two values need separate optimization and are therefore split into min_peakwidth and max_peakwidth in getDefaultXcmsSetStartingParams. Also for the centWave parameter prefilter two values have to be set. To optimize these use set prefilter to optimize the first value and prefilter_value to optimize the second value respectively."

I just wonder how to optimize the centWave parameter prefilter two values. or Would you tell me what's the usual code if I want to optimize the min_peakwidth,max_peakwidth,ppm,prefilter? Thank you very much! I'm a green hand and I'm appreciated that if you can give some suggestion.

peakpickingParameters <- getDefaultXcmsSetStartingParams('centWave') peakpickingParameters$min_peakwidth <- c(10,20) peakpickingParameters$max_peakwidth <- c(26,42) peakpickingParameters$ppm <- 3 peakpickingParameters$nSlaves <- 1 resultPeakpicking <- optimizeXcmsSet(files= datafiles[1:2],params=peakpickingParameters, nSlaves=1, subdir='rsmDirectory')

ljsjwly commented 7 years ago

Problem solved. Thank you

rietho commented 7 years ago

Hi! Sorry for the late response. But good to hear that you were able to solve the issue. Just to add a short answer also for other users: On looking at the xcms help page ?xcms::findPeaks.centWave or ?xcms::do_findChromPeaks_centWave one can see that prefilter needs two values. IPO lets you optimize both values separately by using prefilter and value_of_prefilter in the parameters.