Merge remote-tracking branch 'origin/features/JAL-2620alternativeCodeTables' into...
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 5 Mar 2019 16:44:20 +0000 (16:44 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 5 Mar 2019 16:44:20 +0000 (16:44 +0000)
1  2 
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/gui/AlignFrame.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/schemes/ResidueProperties.java

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1148,28 -896,28 +896,29 @@@ public class ResiduePropertie
  
    public static String codonTranslate(String lccodon)
    {
-     String cdn = codonHash2.get(lccodon.toUpperCase());
-     if ("*".equals(cdn))
+     String peptide = GeneticCodes.getInstance().getStandardCodeTable()
+             .translate(lccodon);
+     if ("*".equals(peptide))
      {
-       return STOP;
+       return "STOP";
      }
-     return cdn;
+     return peptide;
    }
  
 -  public static Hashtable<String, String> toDssp3State;
 +  /*
 +   * lookup of (A-Z) alternative secondary structure symbols'
 +   * equivalents in DSSP3 notation
 +   */
 +  private static char[] toDssp3State;
    static
    {
 -    toDssp3State = new Hashtable<>();
 -    toDssp3State.put("H", "H");
 -    toDssp3State.put("E", "E");
 -    toDssp3State.put("C", " ");
 -    toDssp3State.put(" ", " ");
 -    toDssp3State.put("T", " ");
 -    toDssp3State.put("B", "E");
 -    toDssp3State.put("G", "H");
 -    toDssp3State.put("I", "H");
 -    toDssp3State.put("X", " ");
 +    toDssp3State = new char[9]; // for 'A'-'I'; extend if needed
 +    Arrays.fill(toDssp3State, ' ');
 +    toDssp3State['B' - 'A'] = 'E';
 +    toDssp3State['E' - 'A'] = 'E';
 +    toDssp3State['G' - 'A'] = 'H';
 +    toDssp3State['H' - 'A'] = 'H';
 +    toDssp3State['I' - 'A'] = 'H';
    }
  
    /**