diff --git a/minimap2.wdl b/minimap2.wdl
index b4e4d4ee63438570e0512c514565b41f647754fc..7177afd2d77f77662b7e9dac03b185c16779ea06 100644
--- a/minimap2.wdl
+++ b/minimap2.wdl
@@ -86,6 +86,7 @@ task Mapping {
         Int? mismatchPenalty
         String? howToFindGTAG
         Boolean? secondaryAlignment
+        Boolean? addMDtagToSAM
 
         Int cores = 4
         Int memory = 7
@@ -106,6 +107,7 @@ task Mapping {
         ~{"-B " + mismatchPenalty} \
         ~{"-u " + howToFindGTAG} \
         --secondary=~{true="yes" false="no" secondaryAlignment} \
+        ~{true="--MD" false="" addMDtagToSAM} \
         ~{"-o " + outputPrefix} \
         ~{"-t " + cores} \
         ~{referenceFile} \
@@ -136,6 +138,7 @@ task Mapping {
         mismatchPenalty: "Mismatch penalty."
         howToFindGTAG: "How to find GT-AG. f:transcript strand, b:both strands, n:don't match GT-AG."
         secondaryAlignment: "Whether to output secondary alignments."
+        addMDtagToSAM: "Adds a MD tag to the SAM output file."
 
         outputAlignmentFile: "Mapping and alignment between collections of DNA sequences file."
     }