Equivalent tool for MergeBamAlignment's Primary_Alignment_Strategy=Most Distant?
Hi there,
I have an allopolyploid genome that is mostly phased. I've mapped 150bp PE reads to this genome, and there's of course -- a ton of multimappings. I used BWA-MEM for this with the -M flag, and my understanding is that BWA-MEM decides a primary alignment then puts all the other secondary alignments in the XA tag. I want to keep the best (equiv. to primary in this case) alignment for variant calling but I realized there may be an issue. When a read (R1) maps equally well to, say, chromosome 1A and 1A', but its mate (R2) maps uniquely to only 1A, what happens when the primary alignment for that R1 is randomly assigned to be 1A'? Now I have non-linear alignments / a chimeric read, right?
I found MergeBamAlignment and loved the idea of setting the Primary_Alignment_Strategy = Most Distant, since it would fix the above issue. But I just have a regular .bam file, with paired reads mapped to the genome. I'm not sure where the unmapped .bam comes from in this example: https://gatk.broadinstitute.org/hc/en-us/articles/360039568932--How-to-Map-and-clean-up-short-read-sequence-data-efficiently#step3B
So my question is... is there another tool that does the equivalent of Primary_Alignment_Strategy = Most Distant that is compatible with just a regular old mapped .bam? I found a different discussion where a user wanted to use this tool with PE mapped reads -- and someone suggested they modify the pipeline with SetNMMDAndUQTags instead. I am unsure if that is really an equivalent... seems like a nope. Is my only hope to take my raw fastq files and convert them into .ubam files..?
If there's any advice someone could offer or some schooling to tell me that I'm very confused, both would be much appreciated!
Thanks for your time,
Charity
-
Thank you for writing to the GATK forum! I hope that we can help you sort this out.
I brought your inquiry to our tool expert and received some feedback to share with you.
In short, there is no equivalent tool that we know of that can perform what you mentioned.
We suggest you trust BWA's primary alignment decisions instead of trying to adjust them yourself. MergeBamAlignments will only mark reads as primary when no reads for that read name have been marked as primary. It won't take reads that BWA has already decided what it wants to be primary and then change that.Our developers don't think that you will encounter this problem with BWA. But, if it does, we, unfortunately, don't know of a tool that would be able to provide a standalone fix.
I hope this helps! Please let me know if you find success. Also, if you have any other questions, please do not hesitate to reach out.
Best,
Anthony -
We haven't heard from you in a while so we're going to close out this ticket. If you still require assistance, simply respond to this email and we'll be happy to pick up where we left off!
Kind regards,
Anthony
Please sign in to leave a comment.
2 comments