package jalview.analysis;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SearchResultMatchI;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
selection = null;
}
}
+ SearchResultMatchI lastm = null;
while (!found && (seqIndex < end))
{
}
String noGaps = noGapsSB.toString();
-
for (int r = resIndex; r < noGaps.length(); r++)
{
- 1
+ Integer.parseInt(spaces
.elementAt(regex.matchedTo() - 1).toString()));
-
- searchResults.addResult(seq, sres, eres);
+ // only add result if not contained in previous result
+ if (lastm == null
+ || (lastm.getSequence() != seq || (!(lastm.getStart() <= sres && lastm
+ .getEnd() >= eres))))
+ {
+ lastm = searchResults.addResult(seq, sres, eres);
+ }
hasResults = true;
if (!findAll)
{