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?

  • 4
    $\begingroup$ MQ is a metric that characterises the alignment quality of an individual read. VCF contains variant calls for a base/region that is the product of all intersecting reads that contribute to the call being either REF or ALT. Therefore it makes no sense to report MQ in VCF. MQ is something that should be filtered for during variant calling, so the variant caller should have an option to only include alignments > MQ. $\endgroup$
    – user3051
    Apr 20, 2020 at 14:47
  • $\begingroup$ 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 gatk.broadinstitute.org/hc/en-us/articles/… $\endgroup$
    – StupidWolf
    Apr 20, 2020 at 15:58

1 Answer 1


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 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 ...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.