X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FGeneticCodeI.java;fp=src%2Fjalview%2Fanalysis%2FGeneticCodeI.java;h=daed0ac8cb3cb978131cfa3ccca5f043b1392db3;hb=74393b51f368cb9f58589472d432a433d9c4386d;hp=0000000000000000000000000000000000000000;hpb=7a0d503181fe41452120a8a02ca63476392aa08c;p=jalview.git diff --git a/src/jalview/analysis/GeneticCodeI.java b/src/jalview/analysis/GeneticCodeI.java new file mode 100644 index 0000000..daed0ac --- /dev/null +++ b/src/jalview/analysis/GeneticCodeI.java @@ -0,0 +1,46 @@ +package jalview.analysis; + +public interface GeneticCodeI +{ + /** + * Answers the single letter amino acid code (e.g. "D") for the given codon + * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The + * codon is not case-sensitive, the return value is upper case. + *

+ * If the codon includes any of the standard ambiguity codes + *

+ * + * @param codon + * @return + */ + String translate(String codon); + + /** + * Answers the single letter amino acid code (e.g. "D") for the given codon + * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The + * codon is not case-sensitive, the return value is upper case. If the codon + * includes any of the standard ambiguity codes, this method returns null. + * + * @param codon + * @return + */ + String translateCanonical(String codon); + + /** + * Answers a unique identifier for the genetic code (using the numbering + * system as on NCBI) + * + * @return + */ + String getId(); + + /** + * Answers a display name suitable for use in menus, reports etc + * + * @return + */ + String getName(); +}