anySameLetter           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 _c_o_n_t_a_i_n _a _p_a_r_t_i_c_u_l_a_r _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
     contains at least one occurance of a particular letter. 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 contain at least one instance of "N" and not others.
     See the examples for an illustration.

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

     anySameLetter(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' contains
     '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
     anyN <- anySameLetter(matches, 'N')
     anyN
     matches[!anyN]

