JAL-891; Labeling of structure conservation is improved a bit.
authorjanengelhardt <engelhardt87@googlemail.com>
Mon, 15 Aug 2011 09:15:30 +0000 (11:15 +0200)
committerjanengelhardt <engelhardt87@googlemail.com>
Mon, 15 Aug 2011 09:15:30 +0000 (11:15 +0200)
Brackets instead of 'H'.

Change-Id: I220e86f21e2ff539ab5828bba4c0d07d76777422

src/jalview/analysis/StructureFrequency.java

index c253dce..7b97a8d 100644 (file)
@@ -144,11 +144,11 @@ public class StructureFrequency
             cEnd = seq[bpEnd];
             if (checkBpType(c, cEnd))
             {
-              values['H']++; // H means it's a helix (structured)
+              values['(']++; // H means it's a helix (structured)
             }
             pairs[c][cEnd]++;
 
-            maxResidue = "H";
+            maxResidue = "(";
           }
         }
         // nonGap++;
@@ -163,7 +163,7 @@ public class StructureFrequency
         residueHash.put(PAIRPROFILE, pairs);
       }
 
-      count = values['H'];
+      count = values['('];
 
       residueHash.put(MAXCOUNT, new Integer(count));
       residueHash.put(MAXRESIDUE, maxResidue);
@@ -178,7 +178,29 @@ public class StructureFrequency
         result[i] = residueHash;
       }
       if (bpEnd > 0)
-      {
+      {     
+        values[')']=values['('];
+        values['(']=0;
+        
+        residueHash = new Hashtable();
+        maxResidue = ")";
+        
+        if (profile)
+        {
+          residueHash.put(PROFILE, new int[][]
+          { values, new int[]
+          { jSize, (jSize - values['-']) } });
+
+          residueHash.put(PAIRPROFILE, pairs);
+        }
+        
+        residueHash.put(MAXCOUNT, new Integer(count));
+        residueHash.put(MAXRESIDUE, maxResidue);
+
+        percentage = ((float) count * 100) / (float) jSize;
+        residueHash.put(PID_GAPS, new Float(percentage));
+
+        
         result[bpEnd] = residueHash;
       }
     }