GATK4's BaseRecalibrator uses a list of known variants to adjust the base quality scores in a BAM file. I would like to visualize the pre and post recalibration scores with MultiQC. My workflow is as follows:

  1. Call BaseRecalibrator on the pre-calibration BAM and save base quality scores to pre_recal_data.table. This records pre-recalibration base scores.
  2. Call ApplyBQSR on pre-calibration BAM using info from pre_recal_data.table. This creates recalibrated.bam.
  3. Call BaseRecalibrator on recalibrated.bam and write adjusted scores to post_recal_data.table.

In the .table files, there is an argument field recalibration_report that can specify the name of a pre-recalibration report (i.e. pre_recal_data.table). If the field is null, this means the report is for pre-recalibration data.

MultiQC uses this field to classify the quality scores as pre or post recalibration. This field doesn't seem to be populated when I run BaseRecalibrator, and I can't find a command line argument to make sure its set to pre_recal_data.table. Here's my code:

gatk BaseRecalibrator -I {input.bam} -R {input.ref} -O pre_recal_data.table \
gatk ApplyBQSR -I {input.bam} -R {input.ref} -O recalibrated.bam
            -bqsr pre_recal_data.table \
            --static-quantized-quals 10 --static-quantized-quals 20 \
            --static-quantized-quals 30 --add-output-sam-program-record \
            --create-output-bam-md5 --use-original-qualities
gatk BaseRecalibrator -I recalibrated.bam -R {input.ref} -O post_recal_data.table \

Does anyone know how to force BaseRecalibrator to set the recalibration_report field?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.