Fix smith-waterman sorting to follow correct Compare semantics

This commit is contained in:
Tim Wojtulewicz 2023-04-30 11:28:12 -07:00
parent 3a172bde38
commit 81b94423a0
2 changed files with 3 additions and 6 deletions

View file

@ -172,10 +172,7 @@ bool SubstringCmp::operator()(const Substring* bst1, const Substring* bst2) cons
return false;
}
if ( bst1->GetAlignments()[_index].index <= bst2->GetAlignments()[_index].index )
return true;
return false;
return (bst1->GetAlignments()[_index].index < bst2->GetAlignments()[_index].index);
}
// A node in Smith-Waterman's dynamic programming matrix. Each node

View file

@ -29,5 +29,5 @@ tok 0: Accept (27/0, T)
tok 1: e^M^JAccept (22/15, T)
tok 2: Accept (27/29, T)
xxAAxxAAxx - yyyyyAAyyyyy:
tok 0: AA (2/5, T)
tok 1: AA (6/5, T)
tok 0: AA (6/5, T)
tok 1: AA (2/5, T)