reverseComplement         package:Biostrings         R Documentation

_S_e_q_u_e_n_c_e _r_e_v_e_r_s_i_n_g _a_n_d _c_o_m_p_l_e_m_e_n_t_i_n_g

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

     These functions can reverse a BString, DNAString or RNAString
     object and complement each base of a DNAString object.

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

       reverse(x)
       complement(x)
       reverseComplement(x)

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

       x: A 'BString' (or derived) object or a 'BStringViews' object
          for 'reverse'. A 'DNAString' object or a 'BStringViews'
          object with a 'DNAString' subject for 'complement' and
          'reverseComplement'. 

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

     Given an object 'x' of class BString, DNAString or RNAString,
     'reverse(x)' returns an object of the same class where letters in
     'x' are reordered in the reverse ordered. If 'x' is a DNAString
     object, 'complement(x)' returns an object where each base in 'x'
     is "complemented" i.e. A, C, G, T are replaced by T, G, C, A
     respectively. Letters belonging to the "IUPAC extended genetic
     alphabet" are also replaced by their complement (M <-> K, R <-> Y,
     S <-> S, V <-> B, W <-> W, H <-> D, N <-> N) and the gap symbol
     (-) is unchanged. 'reverseComplement(x)' is equivalent to
     'reverse(complement(x))' but is faster and more memory efficient.

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

     An object of the same class and length as the original object.

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

     H. Pages

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

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

       reverseComplement(DNAString("ACGT-YN-"))

