@Override
public boolean involvesSequence(SequenceI sequence)
{
+ final int start = sequence.getStart();
+ final int end = sequence.getEnd();
+
SequenceI ds = sequence.getDatasetSequence();
- for (SearchResultMatchI _m : matches)
+ for (SearchResultMatchI m : matches)
{
- SequenceI matched = _m.getSequence();
- if (matched != null && (matched == sequence || matched == ds))
+ SequenceI matched = m.getSequence();
+ if (matched != null && (matched == sequence || matched == ds)
+ && (m.getEnd() >= start) && (m.getStart() <= end))
{
return true;
}
{
int count = 0;
BitSet mask = new BitSet();
+ int startRes = sqcol.getStartRes();
+ int endRes = sqcol.getEndRes();
+
for (SequenceI s : sqcol.getSequences())
{
- int[] cols = getResults(s, sqcol.getStartRes(), sqcol.getEndRes());
+ int[] cols = getResults(s, startRes, endRes);
if (cols != null)
{
for (int pair = 0; pair < cols.length; pair += 2)
}
/**
- * Two SearchResults are considered equal if they contain the same matches in
- * the same order.
+ * Two SearchResults are considered equal if they contain the same matches
+ * (Sequence, start position, end position) in the same order
+ *
+ * @see Match#equals(Object)
*/
@Override
public boolean equals(Object obj)