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)

