View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2010 utgenome.org
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *--------------------------------------------------------------------------*/
16  //--------------------------------------
17  // utgb-core Project
18  //
19  // AminoAcid.java
20  // Since: 2010/10/07
21  //
22  //--------------------------------------
23  package org.utgenome.gwt.utgb.client.bio;
24  
25  /**
26   * AminoAcid table
27   * 
28   * @author leo
29   * 
30   */
31  public enum AminoAcid {
32  
33  	Ala("A", "Alanine"), Arg("R", "Arginine"), Asn("N", "Asparagine"), Asp("D", "Aspartic acid"), Cys("C", "Cysteine"), Glu("E", "Glutamic acid"), Gln("Q",
34  			"Glutamine"), Gly("G", "Glycine"), His("H", "Histidine"), Ile("I", "Isoleucine"), Leu("L", "Leucine"), Lys("K", "Lysine"), Phe("F",
35  			"Phenylanlanine"), Pro("P", "Proline"), Ser("S", "Serine"), Thr("T", "Theronine"), Trp("W", "Tryptophan"), Tyr("Y", "Tyrosine"), Val("V", "Valine"),
36  
37  	// start codon
38  	Met("M", "Methionine"),
39  
40  	// 21st and 22nd amino acids
41  	Sec("U", "Selenocysteine"), Pyl("O", "Pyrrolysine"),
42  
43  	// ambiguous amino acids
44  	Asx("B", "Asparagine or aspartic acid"), Glx("Z", "Glutamine or glutamic acid"), Xle("J", "Leucine or Isoleucine"), Xaa("X",
45  			"Unspecified or unknown amino acid"),
46  
47  	// stop codons
48  	Ochre("-", "Stop codon: Ochre"), Opal("-", "Stop codon: Opal"), Amber("-", "Stop codon: Amber"),
49  
50  	// for non-coding region
51  	NA("N/A", "not available");
52  
53  	public final String symbol;
54  	public final String fullName;
55  
56  	private AminoAcid(String symbol, String fullName) {
57  		this.symbol = symbol;
58  		this.fullName = fullName;
59  	}
60  
61  	public boolean isStopCodon() {
62  		return this == Ochre || this == Opal || this == Amber;
63  	}
64  }