git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c689b58
)
JAL-2544 only include features in selected columns for sort
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 19 May 2017 10:48:11 +0000
(11:48 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 19 May 2017 10:48:11 +0000
(11:48 +0100)
src/jalview/analysis/AlignmentSorter.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/AlignmentSorter.java
b/src/jalview/analysis/AlignmentSorter.java
index
681d3b7
..
f228350
100755
(executable)
--- 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))