Agree. I'm not sure that dropping unmapped reads into each partition makes sense either.

Just thinking out loud. What about dedicating a single partition to unmapped reads?

If we assume 98% of reads are mapped and we have a file with 750M reads. Using the current method of dropped the unmapped reads at position zero, we find

| numPartitions | Reads in each "mapped" partition | Reads in the "unmapped/mapped" partition (w/position zero) |
|---|---|---|
| 10               |           73.5M                 |                 88.5M |
| 64               |        11.5M                    |                  26M   |

If we dedicate one partition to unmapped reads, we find...

| numPartitions     |  Reads in each "mapped" partitions    | Reads in the "unmapped" partition  |
|---|---|---|
| 10          |            82M                       |                       15M    |
| 64          |         11.6M                       |                       15M    |

The dedicated unmapped partition looks better with less skew.

Of course, not to over-think this, but maybe we should add a new constructor parameter, *assumedUnmapped: Double = 0.02*. This parameter will let us know whether to split the unmapped partition into more than a single partition taking into account that 100 / *numPartitions* gives us the percentage of reads in each bucket.