BWA-MEM alt-aware mode #262
Replies: 3 comments 1 reply
-
Thanks for reporting this @rhughwhite . It looks like the |
Beta Was this translation helpful? Give feedback.
-
As per request from @graceooh, I will post the process of how I found that my samples were not run in I have head and neck cancer samples that have been run with Since we realigned with original as well as top-up FASTQs, read count could only theoretically increase. Yet in the original BAMs aligned with @rhughwhite then proceeded to eliminate every possible variable but we could not reproduce the previous results. We reasoned that the difference could only be due to the reference genome and the index, since the reference files have been reorganized. @maotian06 pointed us in the right direction by linking this article: https://gatk.broadinstitute.org/hc/en-us/articles/360037498992--How-to-Map-reads-to-a-reference-with-alternate-contigs-like-GRCH38. It made us realize that the original alignment was in We suspect that the issue was especially prominent for my samples because they are of East Asian ancestry. For those who had no trouble performining downstream analyses, the results are unlikely to differ significantly in |
Beta Was this translation helpful? Give feedback.
-
@rhughwhite @lydiayliu Thank you guys for providing the information. We've looked into this and there are pros and cons to enable the alt-aware feature but given that we're processing samples with a diverse genetic background, I think in most cases, enabling alt-aware mode would be beneficial. We don't want to miss somatic variant calls due to false low mapping quality(MQ) regions, as many somatic variant calling algorithms use MQ filtering. However, a potential drawback is that BWA-MEM2 alt-aware mode might not work as expected compared to the BWA-MEM alt-aware mode as shown here https://gatk.broadinstitute.org/hc/en-us/articles/360037498992--How-to-Map-reads-to-a-reference-with-alternate-contigs-like-GRCH38#1. To support the alt-aware mode on the cluster, we can go ahead and create a new directory here - @rhughwhite @lydiayliu @graceooh @maotian06 Feel free to share your benchmarking results in this thread if any. Let me know if you guys have any thoughts or concerns. |
Beta Was this translation helpful? Give feedback.
-
Alt-aware alignment
In addition to the primary contigs/chromosmes, reference genomes contain ALT contigs which represent common regions of complex variation.
BWA-MEM has an 'alt-aware' mode which causes it to prioritize aligning reads to primary contigs, with ALT contig alignments being restricted to reads that cannot be mapped to primary contigs. Additionally in alt-aware mode, quality scores are calculated across primary and matching contigs. Alt-aware mode is likely preferable in most cases since many downstream tools simply ignore alt-mapping reads.
The alt-aware mode is active by default and can be turned off with the
-J
parameter. However alt-aware mode is only used if a .alt index file is included in the same directory with the same prefix as the reference fasta. Unlike other bwa index files the .alt file isn't user-generated but is instead downloaded as part of a bwa-kit package.Problem
Previously in the lab we had a .alt file included with the BWA-MEM index files and alignments were being performed in alt-aware mode. During the switch from BWA-MEM to BWA-MEM2 it seems like the .alt file was lost and so subsequent alignments have not been alt-aware. The main effect is that these alignments will have increased alt contig mapping reads, though the extent may vary based on sample ancestry.
Solution
It would be good to add the .alt file to
/hot/ref/tool-specific-input/BWA-MEM2-2.1.0/GRCh38-BI-20160721/
and include the-J
parameter as an option (possibly with a warning if it is used). An additional option would be to provide an index set with alt contig masking which would fully inhibit mapping to alt contigs (this might be lower priority) - https://support-docs.illumina.com/SW/DRAGEN_v310/Content/SW/DRAGEN/RefGenHashALT.htmSee this GATK resource for more:
https://gatk.broadinstitute.org/hc/en-us/articles/360037498992--How-to-Map-reads-to-a-reference-with-alternate-contigs-like-GRCH38
Beta Was this translation helpful? Give feedback.
All reactions