From 9b4f85c2f68863e6872900d4f76bb9924591718a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 19 May 2017 08:38:35 +0100 Subject: [PATCH] JAL-2490 only count sequences where feature overlap is confirmed --- src/jalview/controller/AlignViewController.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; -- 1.7.10.2