Only calculate consenus from start to end
[jalview.git] / src / jalview / datamodel / AlignmentView.java
index a76e90e..e668470 100644 (file)
@@ -40,6 +40,7 @@ public class AlignmentView
     private SeqCigar[] sequences = null;
   private int[] contigs = null;
   private int width=0;
+  private int firstCol=0;
   public AlignmentView(CigarArray seqcigararray)
   {
     if (!seqcigararray.isSeqCigarArray())
@@ -49,6 +50,15 @@ public class AlignmentView
     sequences = seqcigararray.getSeqCigarArray();
     width = seqcigararray.getWidth(); // visible width
   }
+  /**
+   * Create an alignmentView where the first column corresponds with the 'firstcol' column of some reference alignment 
+   * @param sdata
+   * @param firstcol
+   */
+  public AlignmentView(CigarArray sdata, int firstcol) {
+    this(sdata);
+    firstCol=firstcol;
+  }
 
   public void setSequences(SeqCigar[] sequences)
   {
@@ -431,4 +441,12 @@ public class AlignmentView
       return new int[] { 0, width};
     }
   }
+  /**
+   * 
+   * @return position of first visible column of AlignmentView within its parent's alignment reference frame 
+   */
+  public int getAlignmentOrigin() {
+    // TODO Auto-generated method stub
+    return firstCol;
+  }
 }