{
return groups;
}
-
/** Takes out columns consisting entirely of gaps (-,.," ")
*/
- public void removeGaps()
- {
+ public void removeGaps() {
+ removeGaps((ShiftList)null);
+ }
+ /**
+ * remove gaps in alignment - recording any frame shifts in shiftrecord
+ * intended to be passed to ColumnSelection.compensateForEdits(shiftrecord)
+ * @param shiftrecord
+ */
+ public void removeGaps(ShiftList shiftrecord) {
SequenceI[] seqs = getVisibleAndRepresentedSeqs();
int j, jSize = seqs.length;
if (!delete && startCol > -1)
{
deleteColumns(seqs, startCol, endCol);
+ if (shiftrecord!=null) {
+ shiftrecord.addShift(startCol, 1+endCol-startCol);
+ }
width -= (endCol - startCol);
i -= (endCol - startCol);
startCol = -1;
if (delete && startCol > -1)
{
deleteColumns(seqs, startCol, endCol);
+ if (shiftrecord!=null) {
+ shiftrecord.addShift(startCol, 1+endCol-startCol);
+ }
}
}