Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimap 2.20+ does not fully align inversions with flanking repeats, but 2.18 does #806

Closed
mikolmogorov opened this issue Sep 1, 2021 · 3 comments
Labels

Comments

@mikolmogorov
Copy link
Contributor

Hi,

Looks like with the recent changes in the chaining algorithm (?) minimap2 does not align some of the difficult-to-detect inversions, which are large (several kb) and have flanking inverted repeats. The 2.18 version produces 3 alignments for each read (with a middle part inverted) as expected, although the alignments overlap by the repetitive part which could be an issue for the downstream analysis. On the other hand, starting the version 2.20 (2.22 is also affected), minimap2 would only produce two alignments for such inversion without the middle part.

"Regular" inversions with no flanking repeats are unaffected.

I attach a couple examples of IGV visualizations. Those are HG002 ONT reads, aligned to a HG002 assembly. Top panel is 2.18 and the bottom one is 2.20; "link supplementary alignments" mode enabled. As you can see, all inversions are heterozygous (making the pattern somewhat hard to see), but I suspect homozugous inversions will be no different. I was not able to detect inversion patterns from a bam file with 2.20 alignment, but the pattern was clear in 2.18.

What do you think? I will be happy to provide a few examples of actual bams if you need any.

Thanks,
Mikhail

example_1
example_3

@mikolmogorov
Copy link
Contributor Author

Here are the phased views (of two different inversions) for better visualization.

phased_1
phased_2

@mikolmogorov
Copy link
Contributor Author

Here is the archive with 4 examples. It contains bams + reference + approximate coordinates. Hope this helps, let me know if you need anything else.

https://drive.google.com/file/d/18KX7502d1n3NcHDhXmVYbdWqrJ_y6VZ0/view?usp=sharing

lh3 added a commit that referenced this issue Oct 4, 2021
@mikolmogorov
Copy link
Contributor Author

Confirming that all 4 cases are now solved with the latest updates. Thanks!

Luke20000429 pushed a commit to Minimap2onGPU/mm2-gb that referenced this issue Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants