a                   package:seqinr                   R Documentation

_C_o_n_v_e_r_t_s _a_m_i_n_o-_a_c_i_d _t_h_r_e_e-_l_e_t_t_e_r _c_o_d_e _i_n_t_o _t_h_e _o_n_e-_l_e_t_t_e_r _o_n_e

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

     This is a vectorized function to convert three-letters amino-acid
     code into the one-letter one, for instance "Ala" into "A".

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

     a(aa)

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

      aa: A vector of string. All strings are 3 chars long. 

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

     Allowed character values for 'aa' are: Stp, Ala, Cys, Asp, Glu,
     Phe, Gly, His, Ile, Lys, Leu, Met, Asn, Pro, Gln, Arg, Ser, Thr,
     Val, Trp, Tyr. All other values will generate a warning and return
     NA.

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

     A vector of single characters. Character values are
     *ACDEFGHIKLMNPQRSTVWY.

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

     D. Charif

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

     The IUPAC one-letter code for aminoacids is described at:  <URL:
     http://www.chem.qmul.ac.uk/iupac/AminoAcid/>  'citation("seqinr")'

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

     'translate', 'aaa'

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

       # show all allowed values
       allowed <- c("Stp", "Ala", "Cys", "Asp", "Glu", "Phe", "Gly", "His", "Ile",
                "Lys", "Leu", "Met", "Asn", "Pro", "Gln", "Arg", "Ser", "Thr",
                "Val", "Trp", "Tyr")
       a(allowed)
       # show what's happen with non-allowed values
       a("SOS") # should be NA and a warning is generated

