allSameLetter           package:Biostrings           R Documentation

_G_e_n_e_r_i_c _t_o _f_i_n_d _t_h_e _s_t_r_i_n_g_s _w_h_i_c_h _a_r_e _r_e_p_e_a_t_s _o_f _a _s_i_n_g_l_e _l_e_t_t_e_r

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

     This method finds all strings in a "BioString" object which
     consist of a particular letter repeating again and again. Note
     that this does not do a pattern matching. So, if the letter is "N"
     for a BioString object with DNA patterns, then it would only match
     strings which are repeats of "N" and not others. See the examples
     for an illustration.

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

     allSameLetter(x, letter)

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

       x: An object of class "BioString" or a character vector. In the
          later case it is converted to a BioString object.

  letter: A single letter. It should be part of the alphabet of 'x'. 

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

     A logical vector of same length as 'x' with elements 'TRUE' or
     'FALSE' accordingly as the corresponding element of 'x' is a
     repeat of 'letter' or not.

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

     Saikat DebRoy

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

     'BioString-class'

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

     PpiI <- "GAACNNNNNCTC"
     D1 <-
       DNAString("tgctgatgcatagctagctgGAACtagctCTCtcgtagctggatgctgatNNNNNNNNNNNN")
     matches <- matchDNAPattern(PpiI, D1)
     matches
     allN <- allSameLetter(matches, 'N')
     allN
     matches[!allN]

