splitseq               package:seqinr               R Documentation

_s_p_l_i_t _a _s_e_q_u_e_n_c_e _i_n_t_o _s_u_b-_s_e_q_u_e_n_c_e_s

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

     Split a sequence into sub-sequences of 3 (the default size) with
     no overlap between the sub-sequences.

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

     splitseq(seq, frame = 0, word = 3)

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

     seq: a vector of chars 

   frame: an integer (0, 1, 2) giving the starting position to split
          the sequence 

    word: an integer giving the size of the sub-sequences 

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

     This function returns a vector which contains the sub-sequences.

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

     J.R. Lobry

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

     'citation("seqinr")' 

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

     'split'

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

     cds <- s2c("aacgttgcaggtcgctcgctacgtagctactgttt")
     ## To obtain the codon sequence in frame 0:
     splitseq(cds)
     ## Show the effect of frame and word with a ten char sequence:
     (tenchar <- s2c("1234567890"))
     splitseq(tenchar, frame = 0)
     splitseq(tenchar, frame = 1)
     splitseq(tenchar, frame = 2)
     splitseq(tenchar, frame = 0, word = 2)
     splitseq(tenchar, frame = 0, word = 1)

