/*
* if the start or end column is gapped, startPos or endPos may be to the
* left or right, and we may have included adjacent or enclosing features;
- * remove any that are not enclosing, non-contact features
+ * remove any that are not enclosing features
*/
if (endPos > this.end || Comparison.isGap(sequence[fromColumn - 1])
|| Comparison.isGap(sequence[toColumn - 1]))
SequenceFeature sf = it.next();
int featureStartColumn = findIndex(sf.getBegin());
int featureEndColumn = findIndex(sf.getEnd());
- boolean noOverlap = featureStartColumn > toColumn
- || featureEndColumn < fromColumn;
-
- /*
- * reject an 'enclosing' feature if it is actually a contact feature
- */
- if (sf.isContactFeature() && featureStartColumn < fromColumn
- && featureEndColumn > toColumn)
- {
- noOverlap = true;
- }
- if (noOverlap)
+ if (featureStartColumn > toColumn
+ || featureEndColumn < fromColumn)
{
it.remove();
}