JAL-2526 Sequence.findPositions to get residue positions for column
[jalview.git] / src / jalview / datamodel / HiddenSequences.java
index d3aa01a..1daaf43 100755 (executable)
@@ -294,7 +294,7 @@ public class HiddenSequences
    *          the row to start from
    * @return the position of the row in the visible alignment
    */
-  public int findIndexNAboveRow(int visibleDistance, int startRow)
+  public int subtractVisibleRows(int visibleDistance, int startRow)
   {
     // walk upwards through the alignment
     // count all the non-null sequences until we have visibleDistance counted
@@ -403,4 +403,20 @@ public class HiddenSequences
 
     return false;
   }
+
+  /**
+   * Answers if a sequence is hidden
+   * 
+   * @param seq
+   *          (absolute) index to test
+   * @return true if sequence at index seq is hidden
+   */
+  public boolean isHidden(int seq)
+  {
+    if (hiddenSequences != null)
+    {
+      return (hiddenSequences[seq] != null);
+    }
+    return false;
+  }
 }