Merge branch 'documentation/JAL-3407_2.11.1_release' into releases/Release_2_11_1_Branch
[jalview.git] / src / jalview / analysis / GeneticCodeI.java
1 package jalview.analysis;
2
3 public interface GeneticCodeI
4 {
5   /**
6    * Answers the single letter amino acid code (e.g. "D") for the given codon
7    * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The
8    * codon is not case-sensitive, the return value is upper case.
9    * <p>
10    * If the codon includes any of the standard ambiguity codes
11    * <ul>
12    * <li>if all possible translations are the same, returns that value</li>
13    * <li>else returns null</li>
14    * </ul>
15    * 
16    * @param codon
17    * @return
18    */
19   String translate(String codon);
20
21   /**
22    * Answers the single letter amino acid code (e.g. "D") for the given codon
23    * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The
24    * codon is not case-sensitive, the return value is upper case. If the codon
25    * includes any of the standard ambiguity codes, this method returns null.
26    * 
27    * @param codon
28    * @return
29    */
30   String translateCanonical(String codon);
31
32   /**
33    * Answers a unique identifier for the genetic code (using the numbering
34    * system as on NCBI)
35    * 
36    * @return
37    */
38   String getId();
39
40   /**
41    * Answers a display name suitable for use in menus, reports etc
42    * 
43    * @return
44    */
45   String getName();
46 }