LongestCommonPrefix        package:Biostrings        R Documentation

_F_i_n_d _t_h_e _l_o_n_g_e_s_t _c_o_m_m_o_n _p_r_e_f_i_x_e_s _f_o_r _a _s_u_f_f_i_x _a_r_r_a_y

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

     Given an object of class "BioString" representing a suffix array,
     this function returns an object (of class "LongestCommonPrefix")
     representing a matrix of the longest common prefixes between any
     two elements in the suffix array.

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

     LongestCommonPrefix(x)

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

       x: An object of class "BioString" representing a suffix array. 

_D_e_t_a_i_l_s:

     The suffix array argument to the 'LongestCommonPrefix' function is
     assumed to be created by the 'DNASuffixArray' function. In other
     words, the suffixes are assumed to be sorted in increasing order.

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

     An object of class "LongestCommonPrefix".

_A_u_t_h_o_r(_s):

     Saikat DebRoy

_S_e_e _A_l_s_o:

     'DNASuffixArray', 'LongestCommonPrefix-class'

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

     data('yeastSEQCHR1')
     yeast1 <- DNAString(yeastSEQCHR1)
     x <- substring(yeast1, c(1, 30))
     x
     suf <- DNASuffixArray(x)
     lcp <- LongestCommonPrefix(suf)

