All pairs search and sequence clustering