hammerlab/guacamole — pull request #273 by arahuja (2014-12-19 19:13:33+00:00)
Title: Move sorting of reads in partition to ExternalSorter

This PR removes the need to load all of the reads of a partition into memory at once to sort them. Rather the reads are sorted by their key before they are processed so we can process them in order.

Instead of just being keyed by the task number now the reads are keyed by the `TaskPosition` class which defines an ordering by contig and start locus.

This removes the `regionsByTask` accumulator, however, as we don't know the count of reads on a partition before we start processing. We could increment the counter after each read is pulled, but I'm not sure what the cost will be to update the counter on each read rather than in batch.

This does add a loci accumulator to count the loci covered in each partition.

Closes #230