for (int i=0; i<sequences.size(); i++) {
alseqs[i] = new SeqCigar((SequenceI) sequences.elementAt(i));
}
- return new CigarArray(alseqs);
+ CigarArray cal = new CigarArray(alseqs);
+ cal.addOperation(CigarArray.M, getWidth());
+ return cal;
}
}
private SeqCigar[] sequences = null;
private int[] contigs = null;
private int width=0;
+ private int firstCol=0;
public AlignmentView(CigarArray seqcigararray)
{
if (!seqcigararray.isSeqCigarArray())
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)
{
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;
+ }
}