+ // simplest approach is to select all group containing column
+ if (matrix.hasGroups())
+ {
+ SequenceI rseq = aa[graphStretch].sequenceRef;
+ BitSet grp = matrix.getGroupsFor(currentX);
+ for (int c=fr;c<=to; c++)
+ {
+ BitSet additionalGrp = matrix.getGroupsFor(c);
+ grp.or(additionalGrp);
+ }
+ HiddenColumns hc = av.getAlignment().getHiddenColumns();
+ for (int p = grp.nextSetBit(0); p >= 0; p = grp
+ .nextSetBit(p + 1))
+ {
+ int offp = (rseq != null)
+ ? rseq.findIndex(rseq.getStart() - 1 + p)
+ : p;
+
+ if (!av.hasHiddenColumns() || hc.isVisible(offp))
+ {
+ av.getColumnSelection().addElement(offp);
+ }
+ }
+ }
+ // possible alternative for interactive selection - threshold
+ // gives 'ceiling' for forming a cluster
+ // when a row+column is selected, farthest common ancestor less
+ // than thr is used to compute cluster
+