Merge branch 'develop' into features/JAL-4219_extended_fasta_rna_ss
[jalview.git] / src / jalview / schemes / ResidueProperties.java
index 42d03ec..2fcb95f 100755 (executable)
@@ -41,6 +41,8 @@ public class ResidueProperties
   public static final int[] nucleotideIndex;
 
   public static final int[] purinepyrimidineIndex;
+  
+  public static final int[] secondaryStructureIndex;
 
   public static final Map<String, Integer> aa3Hash = new HashMap<>();
 
@@ -195,6 +197,19 @@ public class ResidueProperties
     purinepyrimidineIndex['N'] = 2;
     purinepyrimidineIndex['n'] = 2;
   }
+  
+  static
+  {
+    secondaryStructureIndex = new int[255];
+    for (int i = 0; i < 255; i++)
+    {
+      secondaryStructureIndex[i] = 3; 
+    }
+
+    secondaryStructureIndex['H'] = 0;
+    secondaryStructureIndex['E'] = 1;
+    secondaryStructureIndex['C'] = 2;
+  }
 
   private static final Integer ONE = Integer.valueOf(1);
 
@@ -383,6 +398,12 @@ public class ResidueProperties
       Color.white, // all other nucleotides
       Color.white // Gap
   };
+  
+  //Secondary structure
+   public static final Color[] secondarystructure = { Color.red, // H
+       Color.green, // E
+       Color.gray  // C
+   };
 
   // Zappo
   public static final Color[] zappo = { Color.pink, // A
@@ -2414,7 +2435,7 @@ public class ResidueProperties
   public static void main(String[] args)
   {
     Hashtable<String, Vector<String>> aaProps = new Hashtable<>();
-    System.out.println("my %aa = {");
+    jalview.bin.Console.outPrintln("my %aa = {");
     // invert property hashes
     for (String pname : propHash.keySet())
     {
@@ -2446,12 +2467,13 @@ public class ResidueProperties
         System.out.print("'" + props.nextElement() + "'");
         if (props.hasMoreElements())
         {
-          System.out.println(", ");
+          jalview.bin.Console.outPrintln(", ");
         }
       }
-      System.out.println("]" + (res.hasMoreElements() ? "," : ""));
+      jalview.bin.Console
+              .outPrintln("]" + (res.hasMoreElements() ? "," : ""));
     }
-    System.out.println("};");
+    jalview.bin.Console.outPrintln("};");
   }
 
   // to here