This is related to issue 72. Essentially, minimap2-rs is treating secondary alignments as supplementary, whereas they are quite different.
Unfortunately, the code where the supplementary alignment flag is set in minimap2 isn't super-elegant, I believe the most relevant part is here. I've made this change in this PR and it seems to work in my use case. Note that I'm not handling the > 1 segment case here, so I believe we'll need further work to handle reads with > 1 segment (e.g. paired-end short reads).
This is related to issue 72. Essentially, minimap2-rs is treating secondary alignments as supplementary, whereas they are quite different.
Unfortunately, the code where the supplementary alignment flag is set in minimap2 isn't super-elegant, I believe the most relevant part is here. I've made this change in this PR and it seems to work in my use case. Note that I'm not handling the > 1 segment case here, so I believe we'll need further work to handle reads with > 1 segment (e.g. paired-end short reads).