Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like bwa-mem pairing can only ever pick one 'best' paired placement, and discards the rest, even if they are ties according to the scoring. Also, tie-breaking is essentially handled by the sort and the hash of align-id and read-id. This can lead to funky results between assemblies.
For example, on grch38, chr2:36341197 and chr3:53400868 are in regions that are 100% identical to each other, so read pairs that align to one actually align to both, equally well. This region also happens to be 100% identical in grch37. But I was getting results where on grch37 a test pair was placed on chr3, and on grch38 it was placed on chr2, with no difference in alignment quality to justify the difference. The sort-by-hash behavior was causing the change in results, but the only-return-one behavior was the real problem. The fix here is to simply return all placements that are tied with the top placement. It does mean more dup hits, but its better than inexplicable differences in what should be identical result.