diff --git a/samtools.wdl b/samtools.wdl
index 587a53fb048a65f66f7adb482d91c87f3ba563cb..8503777ce7451d6a398f0485b45c178cc96162b6 100644
--- a/samtools.wdl
+++ b/samtools.wdl
@@ -571,6 +571,7 @@ task View {
         Int? excludeFilter
         Int? excludeSpecificFilter
         Int? MAPQthreshold
+        File? targetFile
 
         Int threads = 1
         String memory = "1GiB"
@@ -593,6 +594,7 @@ task View {
         ~{"-G " + excludeSpecificFilter} \
         ~{"-q " + MAPQthreshold} \
         ~{"--threads " + (threads - 1)} \
+        ~{"--target-file " + targetFile} \
         ~{inFile}
         samtools index ~{outputFileName} ~{outputIndexPath}
     }