{
SequenceFeature sf = it.next();
+ /*
+ * double-check feature overlaps columns (JAL-2544)
+ * (could avoid this with a findPositions(fromCol, toCol) method)
+ * findIndex returns base 1 column values, startCol/endCol are base 0
+ */
+ if (seqs[i].findIndex(sf.getBegin()) > endCol + 1
+ || seqs[i].findIndex(sf.getEnd()) < startCol + 1)
+ {
+ it.remove();
+ continue;
+ }
+
+ /*
+ * accept all features with null or empty group, otherwise
+ * check group is one of the currently visible groups
+ */
String featureGroup = sf.getFeatureGroup();
if (groups != null && featureGroup != null
+ && !"".equals(featureGroup)
&& !groups.contains(featureGroup))
{
it.remove();