From: gmungoc Date: Fri, 19 May 2017 07:38:35 +0000 (+0100) Subject: JAL-2490 only count sequences where feature overlap is confirmed X-Git-Tag: Release_2_10_3b1~260 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9b4f85c2f68863e6872900d4f76bb9924591718a;p=jalview.git JAL-2490 only count sequences where feature overlap is confirmed --- diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java index 84036ab..d1d61d2 100644 --- a/src/jalview/controller/AlignViewController.java +++ b/src/jalview/controller/AlignViewController.java @@ -244,10 +244,7 @@ public class AlignViewController implements AlignViewControllerI int iend = sq.findPosition(sqcol.getEndRes()); // see JAL-2526 List sfs = sq.getFeatures().findFeatures(ist, iend, featureType); - if (!sfs.isEmpty()) - { - nseq++; - } + boolean overlap = false; for (SequenceFeature sf : sfs) { // future functionality - featureType == null means mark columns @@ -266,10 +263,12 @@ public class AlignViewController implements AlignViewControllerI if (sfStartCol >= startPosition && sfStartCol <= endPosition) { bs.set(sfStartCol - 1); + overlap = true; } if (sfEndCol >= startPosition && sfEndCol <= endPosition) { bs.set(sfEndCol - 1); + overlap = true; } continue; } @@ -293,9 +292,14 @@ public class AlignViewController implements AlignViewControllerI for (; sfStartCol <= sfEndCol; sfStartCol++) { bs.set(sfStartCol - 1); // convert to base 0 + overlap = true; } } } + if (overlap) + { + nseq++; + } } } return nseq;