function amino_name = ch_to_amino_name ( c ) %% CH_TO_AMINO_NAME converts a character to an amino acid name. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 02 May 2004 % % Author: % % John Burkardt % % Reference: % % Carl Branden, John Tooze, % Introduction to Protein Structure, % Garland Publishing, 1991. % % Parameters: % % Input, character C, the one letter code for an amino acid. % Lower and upper case letters are treated the same. % % Output, string AMINO_NAME, the full name of the % corresponding amino acid. The longest name is 27 characters. % If the input code is not recognized, then AMINO_NAME will be set to '???'. % n = 23; amino_table = [ 'Alanine ', ... 'Aspartic acid or Asparagine', ... 'Cysteine ', ... 'Aspartic acid ', ... 'Glutamic acid ', ... 'Phenylalanine ', ... 'Glycine ', ... 'Histidine ', ... 'Isoleucine ', ... 'Lysine ', ... 'Leucine ', ... 'Methionine ', ... 'Asparagine ', ... 'Proline ', ... 'Glutamine ', ... 'Arginine ', ... 'Serine ', ... 'Threonine ', ... 'Valine ', ... 'Tryptophan ', ... 'Undetermined amino acid ', ... 'Tyrosine ', ... 'Glutamic acid or Glutamine ' ]; ch_table = [... 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', ... 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', ... 'X', 'Y', 'Z' ]; for i = 1 : n if ( ch_eqi ( c, ch_table(i) ) ) amino_name = amino_table(i); return end end amino_name = '???'; return end