JAL-2446 merged to spike branch
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index bbd3ce4..56bfd74 100755 (executable)
@@ -96,14 +96,13 @@ public class AlignmentAnnotation
    * Updates the _rnasecstr field Determines the positions that base pair and
    * the positions of helices based on secondary structure from a Stockholm file
    * 
-   * @param RNAannot
+   * @param rnaAnnotation
    */
-  private void _updateRnaSecStr(CharSequence RNAannot)
+  private void _updateRnaSecStr(CharSequence rnaAnnotation)
   {
     try
     {
-      bps = Rna.getModeleBP(RNAannot);
-      _rnasecstr = Rna.getBasePairs(bps);
+      _rnasecstr = Rna.getHelixMap(rnaAnnotation);
       invalidrnastruc = -1;
     } catch (WUSSParseException px)
     {
@@ -114,8 +113,6 @@ public class AlignmentAnnotation
     {
       return;
     }
-    Rna.HelixMap(_rnasecstr);
-    // setRNAStruc(RNAannot);
 
     if (_rnasecstr != null && _rnasecstr.length > 0)
     {
@@ -273,12 +270,6 @@ public class AlignmentAnnotation
     }
   }
 
-  // JBPNote: what does this do ?
-  public void ConcenStru(CharSequence RNAannot) throws WUSSParseException
-  {
-    bps = Rna.getModeleBP(RNAannot);
-  }
-
   /**
    * Creates a new AlignmentAnnotation object.
    * 
@@ -867,6 +858,10 @@ public class AlignmentAnnotation
   @Override
   public String toString()
   {
+    if (annotations == null)
+    {
+      return "";
+    }
     StringBuilder buffer = new StringBuilder(256);
 
     for (int i = 0; i < annotations.length; i++)
@@ -1146,14 +1141,14 @@ public class AlignmentAnnotation
    * @param colSel
    */
   public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation,
-          ColumnSelection colSel)
+          HiddenColumns hidden)
   {
     this(alignmentAnnotation);
     if (annotations == null)
     {
       return;
     }
-    colSel.makeVisibleAnnotation(this);
+    hidden.makeVisibleAnnotation(this);
   }
 
   public void setPadGaps(boolean padgaps, char gapchar)
@@ -1490,4 +1485,13 @@ public class AlignmentAnnotation
   {
     return counter++;
   }
+
+  /**
+   * 
+   * @return true for rows that have a range of values in their annotation set
+   */
+  public boolean isQuantitative()
+  {
+    return graphMin < graphMax;
+  }
 }