sortDNAString           package:Biostrings           R Documentation

_f_u_n_c_t_i_o_n _t_o _s_o_r_t _D_N_A _s_t_r_i_n_g_s

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

     This function sorts a given object of class "BioString"
     representing a vector of DNA strings in increasing order. The
     sorting can be done based only on a given number of letters at the
     begining of each string.

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

     sortDNAString(x, prefixLength = max(nchar(x)))

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

       x: an objecct of class "BioString" representing one or more DNA
          strings. 

prefixLength: the number of letters at the begining of each string that
          are used in the sorting. 

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

     An object of class "BioString", with the strings from the argument
     sorted in increasing order. For the purpose of sorting, each
     string is assumed to be padded at the end with a letter lower in
     order than any letter in the alphabet of the string.

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

     Saikat DebRoy

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

     'DNASuffixArray'

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

     data('yeastSEQCHR1')
     yeast1 <- DNAString(yeastSEQCHR1)
     x <- substring(yeast1, seq(1, by=10, length=30),
                         seq(10, by=10, length=30))
     x
     sortDNAString(x)
     x <- substr(yeast1, 1, 30)
     x
     sortDNAString(substring(x, 1:30, 30)) # suffix array for x

