JAL-2754 Sequence.findFeatures(fromCol, toCol)
[jalview.git] / src / jalview / analysis / AlignmentSorter.java
index bddf6e3..9943a22 100755 (executable)
@@ -755,13 +755,10 @@ public class AlignmentSorter
        * get sequence residues overlapping column region
        * and features for residue positions and specified types
        */
-      // TODO new method findPositions(startCol, endCol)? JAL-2544
-      int startResidue = seqs[i].findPosition(startCol);
-      int endResidue = seqs[i].findPosition(endCol);
       String[] types = featureTypes == null ? null : featureTypes
               .toArray(new String[featureTypes.size()]);
-      List<SequenceFeature> sfs = seqs[i].findFeatures(startResidue,
-              endResidue, types);
+      List<SequenceFeature> sfs = seqs[i].findFeatures(startCol + 1,
+              endCol + 1, types);
 
       seqScores[i] = 0;
       scores[i] = 0.0;
@@ -772,18 +769,6 @@ public class AlignmentSorter
         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
          */