peakDetectionCWT       package:MassSpecWavelet       R Documentation

_T_h_e _m_a_i_n _f_u_n_c_t_i_o_n _o_f _p_e_a_k _d_e_t_e_c_t_i_o_n _b_y _C_W_T _b_a_s_e_d _p_a_t_t_e_r_n _m_a_t_c_h_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     This function is a wrapper of 'cwt', 'getLocalMaximumCWT',
     'getRidge', 'identifyMajorPeaks'

_U_s_a_g_e:

     peakDetectionCWT(ms, scales = c(1, seq(2, 30, 2), seq(32, 64, 4)), SNR.Th = 3, nearbyPeak = TRUE, peakScaleRange = 5, amp.Th = 0.01, minNoiseLevel = amp.Th/SNR.Th, ridgeLength = 24, peakThr=NULL, tuneIn = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

      ms: the mass spectrometry spectrum 

  scales: scales of CWT 

  SNR.Th: SNR (Signal to Noise Ratio) threshold

nearbyPeak: Determine whether to include the nearby small peaks of
          major peaks. TRUE by default

peakScaleRange: the scale range of the peak. larger than 5 by default. 

  amp.Th: the minimum required relative amplitude of the peak (ratio to
          the maximum of CWT coefficients) 

minNoiseLevel: the minimum noise level used in computing the SNR 

ridgeLength: the minimum highest scale of the peak in 2-D CWT
          coefficient matrix 

 peakThr: Minimal absolute intensity (above the baseline) of peaks to
          be picked. If this value is provided, then the smoothing
          function 'sav.gol' will be called to estimate the local
          intensity.(added based on the suggestion and code of Steffen
          Neumann)

  tuneIn: determine whether to tune in the parameter estimation of the
          detected peaks 

     ...: other parameters used by 'identifyMajorPeaks' and smoothing
          function 'sav.gol' 

_V_a_l_u_e:

majorPeakInfo: return of 'identifyMajorPeaks'

ridgeList: return of 'getRidge'

localMax: return of 'getLocalMaximumCWT' 

  wCoefs: 2-D CWT coefficient matrix, see 'cwt' for details.

_A_u_t_h_o_r(_s):

     Pan Du, Simon Lin

_R_e_f_e_r_e_n_c_e_s:

     Du, P., Kibbe, W.A. and Lin, S.M. (2006) Improved peak detection
     in mass spectrum by incorporating continuous wavelet
     transform-based pattern matching, Bioinformatics, 22, 2059-2065.

_S_e_e _A_l_s_o:

     'cwt', 'getLocalMaximumCWT', 'getRidge', 'identifyMajorPeaks'

_E_x_a_m_p_l_e_s:

             data(exampleMS)
             SNR.Th <- 3
             peakInfo <- peakDetectionCWT(exampleMS, SNR.Th=SNR.Th)
             majorPeakInfo = peakInfo$majorPeakInfo
             peakIndex <- majorPeakInfo$peakIndex
             plotPeak(exampleMS, peakIndex, main=paste('Identified peaks with SNR >', SNR.Th)) 
             
             ## In some cases, users may want to add peak filtering based on the absolute peak amplitude
             peakInfo <- peakDetectionCWT(exampleMS, SNR.Th=SNR.Th, peakThr=500)
             majorPeakInfo = peakInfo$majorPeakInfo
             peakIndex <- majorPeakInfo$peakIndex
             plotPeak(exampleMS, peakIndex, main=paste('Identified peaks with SNR >', SNR.Th))       

