JAL-2526 better names for fields
[jalview.git] / src / jalview / analysis / AlignmentSorter.java
index 681d3b7..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].getFeatures().findFeatures(
-              startResidue, endResidue, types);
+      List<SequenceFeature> sfs = seqs[i].findFeatures(startCol + 1,
+              endCol + 1, types);
 
       seqScores[i] = 0;
       scores[i] = 0.0;
@@ -771,8 +768,13 @@ public class AlignmentSorter
       {
         SequenceFeature sf = it.next();
 
+        /*
+         * 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();