public void pickPrimaryAlignment(final HitsForInsert hits) {
if (hits.numHits() == 0) throw new IllegalArgumentException("No alignments to pick from");
hits.coordinateByHitIndex();
// See if primary alignment is not already unambiguously determined.
final NumPrimaryAlignmentState firstEndAlignmentState = hits.tallyPrimaryAlignments(true);
final NumPrimaryAlignmentState secondEndAlignmentState = hits.tallyPrimaryAlignments(false);
if ((firstEndAlignmentState == NumPrimaryAlignmentState.NONE && secondEndAlignmentState == NumPrimaryAlignmentState.NONE) ||
firstEndAlignmentState == NumPrimaryAlignmentState.MORE_THAN_ONE ||
secondEndAlignmentState == NumPrimaryAlignmentState.MORE_THAN_ONE) {
// Need to use selected strategy for picking primary.