aa123                 package:bio3d                 R Documentation

_C_o_n_v_e_r_t _B_e_t_w_e_e_n _1-_l_e_t_t_e_r _a_n_d _3-_l_e_t_t_e_r _A_m_i_n_o_a_c_i_d _C_o_d_e_s

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

     Convert between one-letter IUPAC aminoacid codes and three-letter
     PDB style aminoacid codes.

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

     aa123(aa)
     aa321(aa)

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

      aa: a character vector of individual aminoacid codes. 

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

     Standard conversions will map 'A' to 'ALA', 'G' to 'GLY', etc.
     Non-standard codes in 'aa' will generate a warning and return
     'UNK' or 'X'.

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

     A character vector of aminoacid codes.

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

     Barry Grant

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

     Grant, B.J. et al. (2006) _Bioinformatics_ *22*, 2695-2696.

     For a description of IUPAC one-letter codes see:
      <URL: http://www.chem.qmul.ac.uk/iupac/AminoAcid/>

     For a description of PDB residue codes see Appendix 4:
      <URL: http://msdlocal.ebi.ac.uk/docs/pdb_format/appendix.html>

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

     'read.pdb', 'read.fasta'

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

     # Simple conversion
     aa123(c("D","L","A","G","S","H"))
     aa321(c("ASP", "LEU", "ALA", "GLY", "SER", "HIS"))

     ## Not run: 
     # Extract sequence from PDB file's ATOM and SEQRES cards
     pdb <- read.pdb(system.file("examples/1bg2.pdb", package="bio3d"))
     s <- aa321(pdb$seqres)                   # SEQRES
     a <- aa321(pdb$atom[pdb$calpha,"resid"]) # ATOM

     # Write both sequences to fasta file
     write.fasta(id=c("seqres","atom"), seqs=seqbind(s,a), file="eg2.fa")
     ## End(Not run)

