+ @Override
+ public int markColumns(SequenceCollectionI sqcol, BitSet bs)
+ {
+ int count = 0;
+ BitSet mask = new BitSet();
+ int startRes = sqcol.getStartRes();
+ int endRes = sqcol.getEndRes();
+
+ for (SequenceI s : sqcol.getSequences())
+ {
+ int[] cols = getResults(s, startRes, endRes);
+ if (cols != null)
+ {
+ for (int pair = 0; pair < cols.length; pair += 2)
+ {
+ mask.set(cols[pair], cols[pair + 1] + 1);
+ }
+ }
+ }
+ // compute columns that were newly selected
+ BitSet original = (BitSet) bs.clone();
+ original.and(mask);
+ count = mask.cardinality() - original.cardinality();
+ // and mark ranges not already marked
+ bs.or(mask);
+ return count;
+ }
+
+ @Override