update author list in license for (JAL-826)
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 1acc0ca..a88aa4a 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -1067,7 +1067,8 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         }
         if (row.hasIcons)
         {
-          char ss = row.annotations[column].secondaryStructure;
+          char ss = validRes ? row.annotations[column].secondaryStructure
+                  : ' ';
           if (ss == 'S')
           {
             // distinguish between forward/backward base-pairing
@@ -1120,11 +1121,9 @@ public class AnnotationPanel extends JPanel implements MouseListener,
             }
           }
         }
-
         column++;
         x++;
       }
-
       if (column >= row.annotations.length)
       {
         column = row.annotations.length - 1;
@@ -1558,26 +1557,18 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         if (profl != null)
         {
 
-          /*
-           * if (profl != null) {
-           * 
-           * for (int i = 0; i < profl.length; i++) { System.out.print(profl[i]
-           * + ","); }
-           * 
-           * }
-           */
           int ht = y1, htn = y2 - y1;// aa.graphHeight;
           float wdth;
           double ht2 = 0;
           char[] dc;
 
           /**
-           * profl.length == 11 indicates that the profile of a secondary
+           * profl.length == 51 indicates that the profile of a secondary
            * structure conservation row was accesed.
            * Therefore dc gets length 2, to have space for a basepair instead of
            * just a single nucleotide
            */
-          if (profl.length == 22)
+          if (profl.length == 51)
           {
             dc = new char[2];
           }
@@ -1593,7 +1584,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
 
             if (aa.label.startsWith("StrucConsensus"))
             {
-              dc[1] = 'A';
+              dc[1] = (char) profl[c++];
             }
             
             wdth = av.charWidth;
@@ -1678,7 +1669,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
           //TODO check what happens for group selections
           return StructureFrequency.extractProfile(
                   aa.groupRef.consensusData[column], aa.groupRef
-                          .getIgnoreGapsConsensus(),column);
+                          .getIgnoreGapsConsensus());
         }
         // TODO extend annotation row to enable dynamic and static profile data
         // to
@@ -1687,10 +1678,9 @@ public class AnnotationPanel extends JPanel implements MouseListener,
                 && av.isShowSequenceLogo())
         {
           return StructureFrequency.extractProfile(av.hStrucConsensus[column],
-                  av.getIgnoreGapsConsensus(),column);
+                  av.getIgnoreGapsConsensus());
         }
       }
-
     }
     return null;
   }