X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FFinder.java;h=c385ac8f8e254cf4042f80887a5c8b67d34060b9;hb=0452450533728e478ef8c893ea2cb3483c740fb3;hp=e24a6c059c69119154e8e53bf1948954cc702f82;hpb=dbcfef03ad3d2853eda62c727978a160fc347f58;p=jalview.git diff --git a/src/jalview/analysis/Finder.java b/src/jalview/analysis/Finder.java index e24a6c0..c385ac8 100644 --- a/src/jalview/analysis/Finder.java +++ b/src/jalview/analysis/Finder.java @@ -22,7 +22,7 @@ public class Finder { this.alignment=alignment; this.selection = selection; } - + public Finder(AlignmentI alignment, SequenceGroup selectionGroup, int seqIndex, int resIndex) { this(alignment, selectionGroup); this.seqIndex=seqIndex; @@ -45,7 +45,7 @@ public class Finder { { int res = Integer.parseInt(searchString); found = true; - if (selection == null || selection.getSize(false) < 1) + if (selection == null || selection.getSize() < 1) { seq = (Sequence) alignment.getSequenceAt(0); } @@ -65,10 +65,10 @@ public class Finder { int end = alignment.getHeight(); - + if (selection != null) { - if ((selection.getSize(false) < 1) || + if ((selection.getSize() < 1) || ((selection.getEndRes() - selection.getStartRes()) < 2)) { selection = null; @@ -79,7 +79,7 @@ public class Finder { { seq = (Sequence) alignment.getSequenceAt(seqIndex); - if ((selection != null) && !selection.getSequences(false).contains(seq)) + if ((selection != null) && !selection.getSequences(null).contains(seq)) { seqIndex++; resIndex = 0; @@ -97,7 +97,7 @@ public class Finder { { item = item.substring(0, selection.getEndRes() + 1); } - + ///Shall we ignore gaps???? - JBPNote: Add Flag for forcing this or not StringBuffer noGapsSB = new StringBuffer(); int insertCount = 0;