diff --git a/bwa.wdl b/bwa.wdl
new file mode 100644
index 0000000000000000000000000000000000000000..e5bac65e166553679cf3d9618fda227a9fd7fc80
--- /dev/null
+++ b/bwa.wdl
@@ -0,0 +1,18 @@
+task BwaMem {
+    File inputR1
+    File? inputR2
+    String referenceFasta
+    String outputPath
+    String? readgroup
+
+    command {
+        set -e -o pipefail
+        mkdir -p $(dirname ${outputPath})
+        bwa mem ${"-R '" + readgroup + "'"} \
+        ${referenceFasta} ${inputR1} ${inputR2} | samtools sort --output-fmt BAM - > ${outputPath}
+    }
+
+    output {
+        File bamFile = outputPath
+    }
+}
diff --git a/fastqc.wdl b/fastqc.wdl
index 657c7929e2f4afb68cf32def2a158fab1ed98d5d..d5cd520ef62810573d748c2759bf9b3389400013 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -48,15 +48,7 @@ task fastqc {
         File rawReport = reportDir + "/fastqc_data.txt"
         File htmlReport = reportDir + "/fastqc_report.html"
         File summary = reportDir + "/summary.txt"
-        File adapterContent = reportDir + "/Images/adapter_content.png"
-        File duplicationLevels = reportDir + "/Images/duplication_levels.png"
-        File perBaseNContent = reportDir + "/Images/per_base_n_content.png"
-        File perBaseQuality = reportDir + "/Images/per_base_quality.png"
-        File perBaseSequenceContent = reportDir + "/Images/per_base_sequence_content.png"
-        File perSequenceGCContent = reportDir + "/Images/per_sequence_gc_content.png"
-        File perSequenceQuality = reportDir + "/Images/per_sequence_quality.png"
-        File perTileQuality = reportDir + "/Images/per_tile_quality.png"
-        File sequenceLengthDistribution = reportDir + "/Images/sequence_length_distribution.png"
+        Array[File] images = glob(outdirPath + "/*/Images/*.png")
     }
 
     runtime {
diff --git a/samtools.wdl b/samtools.wdl
new file mode 100644
index 0000000000000000000000000000000000000000..6fee4d0b378258bcf441b5ba4b0554fa91d4f8f8
--- /dev/null
+++ b/samtools.wdl
@@ -0,0 +1,24 @@
+task SamtoolsIndex {
+    String bamFilePath
+
+    command {
+        samtools index ${bamFilePath}
+    }
+
+    output {
+        File indexFile = bamFilePath + ".bai"
+    }
+}
+
+task SamtoolsMerge {
+    Array[File] bamFiles
+    String outputBamPath
+
+    command {
+        samtools merge ${outputBamPath} ${bamFiles}
+    }
+
+    output {
+        File bamFile = outputBamPath
+    }
+}
\ No newline at end of file