count                 package:seqinr                 R Documentation

_C_o_m_p_o_s_i_t_i_o_n _o_f _d_i_m_e_r/_t_r_i_m_e_r/_e_t_c _n_u_c_l_e_o_t_i_d_e_s

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

     Counts the number of times dimer/trimer/etc nucleotides occurs in
     a sequence. Note that the oligomers are overlapping.

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

     count(seq,word,frame=0,freq=FALSE)

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

     seq: a vector of chars 

    word: an integer giving the size of word (n-mer) to count 

   frame: an integer (0,1,2,...) giving the frame (starting position) 

    freq: if TRUE, word frequencies are computed instead of counts

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

     'count' counts the occurence of all words by moving a window of
     length 'word'. The window step is always an unit. 'frame' controls
     the starting position in the sequence for the count.

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

     This function returns a factor whose levels are all the possible
     oligonucleotides. All oligomers are returned, even if absent from
     the sequence.

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

     D. Charif

_R_e_f_e_r_e_n_c_e_s:

     'citation("seqinr")'

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

     'table'

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

     a=s2c("acgggtacggtcccatcgaa")
     ##To count dinucleotide occurrences in sequence a:
     count(a,2)
     ##To count trinucleotide occurrences in sequence a, in frame 2:
     count(a,3,2)
     ##To count dinucleotide frequencies in sequence a:
     count(a,2,freq=TRUE)

