getRidge           package:MassSpecWavelet           R Documentation

_I_d_e_n_t_i_f_y _r_i_d_g_e_s _b_a_s_e_d _o_n _t_h_e _l_o_c_a_l _m_a_x_i_m_u_m _m_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     Identify ridges by connecting the local maximum of 2-D CWT
     coefficients from the coarse scale to detail scale. The local
     maximum matrix is returned  from 'getLocalMaximumCWT'

_U_s_a_g_e:

     getRidge(localMax, iInit = ncol(localMax), step = -1, iFinal = 1, minWinSize= 5, gapTh = 3, skip = NULL)

_A_r_g_u_m_e_n_t_s:

localMax: The local maximum matrix is returned  from
          'getLocalMaximumCWT' with 1 represents maximum, others are 0. 

   iInit: The start column to search ridge. By default, it starts from
          the coarsest scale level.

    step: Search step. -1 by default, which means searching from coarse
          scale to detail scale column by column. 

  iFinal: The final column index of search ridge. 

minWinSize: The minimum slide window size used. 

   gapTh: The gap allowed during searching for ridge. 3 by default. 

    skip: The column to be skipped during search. 

_V_a_l_u_e:

     Return a list of ridge. As some ridges may end at the scale larger
     than 1, in order to keep the uniqueness of the ridge names, we
     combined the smallest scale of the ridge and m/z index of the peak
     at that scale together to name the ridges. For example the ridge
     name "1_653" means the peak ridge ends at the CWT scale 1 with m/z
     index 653 at scale 1.

_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:

     'getLocalMaximumCWT', 'identifyMajorPeaks'

_E_x_a_m_p_l_e_s:

             data(exampleMS)
             scales <- seq(1, 64, 3)
             wCoefs <- cwt(exampleMS[5000:11000], scales=scales, wavelet='mexh')
             
             localMax <- getLocalMaximumCWT(wCoefs)
             ridgeList <- getRidge(localMax)
             plotRidgeList(ridgeList)

