From: gmungoc Date: Fri, 19 May 2017 10:48:11 +0000 (+0100) Subject: JAL-2544 only include features in selected columns for sort X-Git-Tag: Release_2_10_3b1~258 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9769c798c95dff2006438438706a3e715755cd57;p=jalview.git JAL-2544 only include features in selected columns for sort --- diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index 681d3b7..f228350 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -771,6 +771,18 @@ 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; + } + String featureGroup = sf.getFeatureGroup(); if (groups != null && featureGroup != null && !groups.contains(featureGroup))