<p>As @ATpoint explains in his comment, the mapping quality (<code>MQ</code>) applies to read mappings and, hence, is contained in BAM files, but not VCFs. The <code>MQ</code> values carry important information that ideally the variant caller should use when determining the variant quality (<code>QUAL</code> in the VCF) of individual variant loci.</p>
<p>In the <a href="https://csb5.github.io/lofreq/faq/" rel="nofollow noreferrer">LoFreq documentation</a> it says that</p>
<blockquote>
<h1>Choice of mapper: Bowtie and BWA-SW</h1>
<p>BWA-SW assigns very low mapping qualities to mapped reads. <strong>LoFreq incorporates mapping quality by default into its variant calling model</strong>, which doesn’t help in this scenario and will reduce its sensitivity. Consider disabling the use of mapping quality for <code>lofreq call</code> with <code>-N</code>.</p>
</blockquote>
<p>So LoFreq is already aware of the <code>MQ</code> values and takes them into consideration during variant calling.</p>
<p>Since you are using BWA-MEM (and not BWA-SW) you should probably not be concerned about the issue they mention and trust their quality filtering.</p>
<p>If you are sceptic about the quality of mappings, though, you could still filter them out directly after mapping, e.g. using <code>samtools view -q 20 ...</code></p>

CC BY-SA 4.0
2020-04-20T15:23:14.877Z
2020-04-20T15:34:01.420Z
2020-06-18T08:30:41.743Z
mrhd
<p>To call minority variants in my Mtb sequences I'm using a pipeline of </p>

<pre><code>fastq -&gt; 
    BWA MEM for mapping -&gt; 
    picard MarkDuplicates -&gt; 
    GATK3 for indel realignment and base recalibration -&gt;  
    lofreq for variant calling (https://csb5.github.io/lofreq/)   
</code></pre>

<p>However the resulting VCF files don't have an MQ tag for me to filter on. Where in this process would mapping quality information be generated or lost so that it doesn't end up in the VCF file?</p>

CC BY-SA 4.0
2020-04-20T15:58:15.450Z
In GATK output for vcf, i think there are metrics that make use of MQ, for example MappingQuality, MappingQualityZero, MappingQualityRankSumTest. you can check it here https://gatk.broadinstitute.org/hc/en-us/articles/360037425531--Tool-Documentation-Index#VariantAnnotations
StupidWolf
<ngs><variant-calling><bwa><gatk><bowtie2>
No MQ tags in VCF files
# No MQ tags in VCF files

(Asked by: username_0 on 2020-04-20)

To call minority variants in my Mtb sequences I'm using a pipeline of 
fastq -> 
    BWA MEM for mapping -> 
    picard MarkDuplicates -> 
    GATK3 for indel realignment and base recalibration ->  
    lofreq for variant calling (https://csb5.github.io/lofreq/)   

However the resulting VCF files don't have an MQ tag for me to filter on. Where in this process would mapping quality information be generated or lost so that it doesn't end up in the VCF file?

**Tags:** ngs, variant-calling, bwa, gatk, bowtie2
> **Comments:**
> **username_1**: In GATK output for vcf, i think there are metrics that make use of MQ, for example MappingQuality, MappingQualityZero, MappingQualityRankSumTest. you can check it here https://gatk.broadinstitute.org/hc/en-us/articles/360037425531--Tool-Documentation-Index#VariantAnnotations  

---

## 1 answers

### Answer by username_2 on 2020-04-20. Score: 2 | Accepted answer

As @ATpoint explains in his comment, the mapping quality (`MQ`) applies to read mappings and, hence, is contained in BAM files, but not VCFs. The `MQ` values carry important information that ideally the variant caller should use when determining the variant quality (`QUAL` in the VCF) of individual variant loci.

In the [LoFreq documentation](https://csb5.github.io/lofreq/faq/) it says that

> # Choice of mapper: Bowtie and BWA-SW
>
> BWA-SW assigns very low mapping qualities to mapped reads. **LoFreq incorporates mapping quality by default into its variant calling model**, which doesn’t help in this scenario and will reduce its sensitivity. Consider disabling the use of mapping quality for `lofreq call` with `-N`.

So LoFreq is already aware of the `MQ` values and takes them into consideration during variant calling.

Since you are using BWA-MEM (and not BWA-SW) you should probably not be concerned about the issue they mention and trust their quality filtering.

If you are sceptic about the quality of mappings, though, you could still filter them out directly after mapping, e.g. using `samtools view -q 20 ...`


---

