alphabetFrequency         package:Biostrings         R Documentation

_f_u_n_c_t_i_o_n _t_o _c_a_l_c_u_l_a_t_e _t_h_e _f_r_e_q_u_e_n_c_y _o_f _l_e_t_t_e_r_s _i_n _a _b_i_o_l_o_g_i_c_a_l _s_e_q_u_e_n_c_e

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

     Given an object of class "BioString" representing a biological
     sequence, this function calculates the frequency of each letter in
     the (base) alphabet for the "BioString" object.

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

     alphabetFrequency(x, baseOnly = TRUE)

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

       x: An object of class "BioString". 

baseOnly: A logical value. If 'TRUE', the frequency table only contains
          the letters in the base alphabet for 'x'. 

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

     An integer vector with names same as the letters in the alphabet.
     If the base alphabet is used for the frequency counts, there is an
     extra element with name 'Others' and it is the number of letters
     in the string which are not in the base alphabet. Usually, a
     non-zero entry here means that the string contains some letters
     from a pattern alphabet.

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

     Saikat DebRoy

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

     'BioString-class', 'BioAlphabet-class', 'BioPatternAlphabet-class'

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

     data(yeastSEQCHR1)
     yeast1 <- DNAString(yeastSEQCHR1)
     alphabetFrequency(yeast1)
     alphabetFrequency(yeast1, baseOnly=FALSE)

