// $Id: AminoAcidInfo.java,v 1.1 2006/05/20 17:02:03 Sasha Buzko Exp $ // // Copyright (c) 2000-2002 San Diego Supercomputer Center (SDSC), // a facility operated jointly by the University of California, // San Diego (UCSD) and General Atomics, San Diego, California, USA. // // Users and possessors of this source code are hereby granted a // nonexclusive, royalty-free copyright and design patent license to // use this code in individual software. License is not granted for // commercial resale, in whole or in part, without prior written // permission from SDSC. This source is provided "AS IS" without express // or implied warranty of any kind. // // For further information, please see: http://mbt.sdsc.edu // // History: // $Log: AminoAcidInfo.java,v $ // Revision 1.1 2006/05/20 17:02:03 Sasha Buzko // Updated version // // Revision 1.1 2006/04/30 20:14:00 Sasha Buzko // New version of the app // // Revision 1.1 2006/04/15 19:42:26 Sasha Buzko // Initial commit // // Revision 1.1 2005/11/13 04:35:05 Administrator // *** empty log message *** // // Revision 1.4 2003/05/20 22:19:05 moreland // Corrected spelling of "Tyrosine" VS "Tryosine". // // Revision 1.3 2003/04/23 22:50:56 moreland // Added static hydrophobicity lookup support. // // Revision 1.2 2003/04/03 22:42:14 moreland // Added a comment to suggest that the class should eventually be divided // into separate "AminoAcid" and "AminoAcids" classes. // // Revision 1.1.1.1 2002/07/16 18:00:21 moreland // Imported sources // // Revision 1.0 2002/06/10 23:38:39 moreland // package edu.sdsc.mbt.util; import java.util.*; /** * Provides static information about Amino Acids such as character codes, * 3-letter codes, and full names. *

* @see edu.sdsc.mbt.Residue *

* @author John L. Moreland */ public class AminoAcidInfo { /** * A 2D storage array for amino acid character codes, 3-letter codes, * and full names. The 3-letter codes ending in "X" are undetermined * or nonstandard amino acids. *

* NOTE: This class should really be divided into * an "AminoAcid" class and an "AminoAcids" container class. * For a nice table of AA properties see: * http://www.imb-jena.de/IMAGE_AA.html * Properties include: * String character_code * String three_letter_code * String name * float mass * int surface * float volume * float pKa * float pI * float solubility * float density * float hydrophobicity *

* names[][0] is the amino acid character code. * names[][1] is the amino acid 3-letter code. * names[][2] is the amino acid name. */ private static final String names[][] = { { "A", "ALA", "Alanine" }, { "B", "ASX", "Asparagine" }, { "C", "CYS", "Cysteine" }, { "D", "ASP", "Aspartic Acid" }, { "E", "GLU", "Glutamic Acid" }, { "F", "PHE", "Phenylalanine" }, { "G", "GLY", "Glycine" }, { "H", "HIS", "Histidine" }, { "I", "ILE", "Isoleucine" }, { "J", "UNK", "UNKNOWN" }, { "K", "LYS", "Lysine" }, { "L", "LEU", "Leucine" }, { "M", "MET", "Methionine" }, { "N", "ASN", "Asparagine" }, { "O", "UNK", "UNKNOWN" }, { "P", "PRO", "Proline" }, { "Q", "GLN", "Glutamine" }, { "R", "ARG", "Arginine" }, { "S", "SER", "Serine" }, { "T", "THR", "Threonine" }, { "U", "UNK", "UNKNOWN" }, { "V", "VAL", "Valine" }, { "W", "TRP", "Tryptophane" }, { "X", "UNK", "UNKNOWN" }, { "Y", "TYR", "Tyrosine" }, { "Z", "GLX", "Glutamic Acid" }, { ".", "end", "End Chain" } }; private static Hashtable hydrophobicity = new Hashtable( ); static { hydrophobicity.put( "ALA", new Float( 0.616f ) ); hydrophobicity.put( "CYS", new Float( 0.680f ) ); hydrophobicity.put( "ASP", new Float( 0.028f ) ); hydrophobicity.put( "GLU", new Float( 0.043f ) ); hydrophobicity.put( "PHE", new Float( 1.000f ) ); hydrophobicity.put( "GLY", new Float( 0.501f ) ); hydrophobicity.put( "HIS", new Float( 0.165f ) ); hydrophobicity.put( "ILE", new Float( 0.943f ) ); hydrophobicity.put( "LYS", new Float( 0.283f ) ); hydrophobicity.put( "LEU", new Float( 0.943f ) ); hydrophobicity.put( "MET", new Float( 0.738f ) ); hydrophobicity.put( "ASN", new Float( 0.236f ) ); hydrophobicity.put( "PRO", new Float( 0.711f ) ); hydrophobicity.put( "GLN", new Float( 0.251f ) ); hydrophobicity.put( "ARG", new Float( 0.000f ) ); hydrophobicity.put( "SER", new Float( 0.359f ) ); hydrophobicity.put( "THR", new Float( 0.450f ) ); hydrophobicity.put( "VAL", new Float( 0.825f ) ); hydrophobicity.put( "TRP", new Float( 0.878f ) ); hydrophobicity.put( "TYR", new Float( 0.880f ) ); } /** * Returns the number of amino acid name tuples in the database. *

*/ public static int getNameCount( ) { // The "UNK" names are pad entries to enable direct indexing // by character/byte value into the array. // Don't include the "UNK" pad entries in the count. int count = 0; for ( int i=0; i */ public static String getCodeFromLetter( String letter ) { for ( int i=0; i */ public static String getCodeFromLetter( byte letter ) { // The "UNK" names are pad entries to enable direct indexing // by character/byte value into the array. int offset = letter - 'A'; if ((offset > ('Z' - 'A'))||(offset < 0)){ return null; } return names[offset][1]; } /** * Returns the full name equivalent for the given letter. *

*/ public static String getNameFromLetter( byte letter ) { // The "UNK" names are pad entries to enable direct indexing // by character/byte value into the array. int offset = letter - 'A'; return names[offset][2]; } /** * Returns the character code equivalent for the given 3-letter code. *

*/ public static String getLetterFromCode( String code ) { for ( int i=0; i */ public static String getNameFromCode( String code ) { for ( int i=0; i */ public static String getNameFromLetter( String letter ) { for ( int i=0; i * Hydrophobicity of an amino acid may be obtained experimentally * or may be computed using one of 37 different algorithms. There * are many sources of hydrophobicity methods/scales: * http://psyche.uthct.edu/shaun/SBlack/aagrease.html * http://bioinformatics.weizmann.ac.il/hydroph/data_used.html * http://prowl.rockefeller.edu/aainfo/hydro.htm * http://blanco.biomol.uci.edu/hydrophobicity_scales.html * etc... *

*/ public static float getHydrophobicityFromCode( String code ) { Float hyd = (Float) hydrophobicity.get( code ); if ( hyd == null ) return 0.5f; else return hyd.floatValue( ); } }