diff --git a/src/nf_modules/BWA/indexing.config b/src/nf_modules/BWA/indexing.config
index 2936204f3dc8475073f98ae24c4dcdb70a6dfda9..367e0dfdc90a4b3a32241fed08459b1cfc3a9fa4 100644
--- a/src/nf_modules/BWA/indexing.config
+++ b/src/nf_modules/BWA/indexing.config
@@ -5,6 +5,16 @@ profiles {
     process {
       withName: index_fasta {
         container = "bwa:0.7.17"
+        cpus = 4
+      }
+    }
+  }
+  singularity {
+    singularity.enabled = true
+    process {
+      withName: index_fasta {
+        container = "file://bin/bwa:0.7.17.sif"
+        cpus = 4
       }
     }
   }
@@ -15,9 +25,11 @@ profiles {
         module = "BWA/0.7.17"
         executor = "sge"
         clusterOptions = "-m e -cwd -V"
+        cpus = 16
         memory = "30GB"
-        time = "12h"
-        queue = 'monointeldeb128'
+        time = "24h"
+        queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
+        penv = 'openmp16'
       }
     }
   }
diff --git a/src/nf_modules/BWA/indexing.nf b/src/nf_modules/BWA/indexing.nf
index 67ea3287bf374808ab4b01007fe05c381d711151..09096eeaa0b7e9b77d7078c4edd68734a7d68dbf 100644
--- a/src/nf_modules/BWA/indexing.nf
+++ b/src/nf_modules/BWA/indexing.nf
@@ -10,7 +10,6 @@ Channel
 
 process index_fasta {
   tag "$fasta_id"
-  cpus 4
   publishDir "results/mapping/index/", mode: 'copy'
 
   input:
diff --git a/src/nf_modules/BWA/mapping_paired.config b/src/nf_modules/BWA/mapping_paired.config
index ce8f7f4582171b245b9a1162779007916f999122..5535fd104b1b62d933c6dcfed34e2d6364fd5503 100644
--- a/src/nf_modules/BWA/mapping_paired.config
+++ b/src/nf_modules/BWA/mapping_paired.config
@@ -5,6 +5,16 @@ profiles {
     process {
       withName: mapping_fastq {
         container = "bwa:0.7.17"
+        cpus = 4
+      }
+    }
+  }
+  singularity {
+    singularity.enabled = true
+    process {
+      withName: mapping_fastq {
+        container = "file://bin/bwa:0.7.17.sif"
+        cpus = 4
       }
     }
   }
@@ -15,6 +25,7 @@ profiles {
         module = "BWA/0.7.17"
         executor = "sge"
         clusterOptions = "-m e -cwd -V"
+        cpus = 16
         memory = "30GB"
         time = "24h"
         queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
diff --git a/src/nf_modules/BWA/mapping_paired.nf b/src/nf_modules/BWA/mapping_paired.nf
index 5ac50ef555dc42b2415f76e72c1a36e932637894..7309c6052fb2e670d29ef51b7b547c59ce092c4a 100644
--- a/src/nf_modules/BWA/mapping_paired.nf
+++ b/src/nf_modules/BWA/mapping_paired.nf
@@ -17,7 +17,6 @@ Channel
 
 process mapping_fastq {
   tag "$reads"
-  cpus 4
   publishDir "results/mapping/sam/", mode: 'copy'
 
   input:
diff --git a/src/nf_modules/BWA/tests.sh b/src/nf_modules/BWA/tests.sh
index 1f3150cf8debc2d6be9ccf19167d25418af42223..8f3c52daf10f6c4c95da2d24e502b2118b17cd8b 100755
--- a/src/nf_modules/BWA/tests.sh
+++ b/src/nf_modules/BWA/tests.sh
@@ -1,7 +1,8 @@
 ./nextflow src/nf_modules/BWA/indexing.nf \
   -c src/nf_modules/BWA/indexing.config \
   -profile docker \
-  --fasta "data/tiny_dataset/fasta/tiny_v2.fasta"
+  --fasta "data/tiny_dataset/fasta/tiny_v2.fasta" \
+  -resume
 
 # ./nextflow src/nf_modules/BWA/mapping_single.nf \
 #   -c src/nf_modules/BWA/mapping_single.config \
@@ -13,5 +14,29 @@
   -c src/nf_modules/BWA/mapping_paired.config \
   -profile docker \
   --index "results/mapping/index/tiny_v2*" \
-  --fastq "data/tiny_dataset/fastq/tiny*_R{1,2}.fastq"
+  --fastq "data/tiny_dataset/fastq/tiny*_R{1,2}.fastq" \
+  -resume
 
+
+if [ -x "$(command -v singularity)" ]; then
+./nextflow src/nf_modules/BWA/indexing.nf \
+  -c src/nf_modules/BWA/indexing.config \
+  -profile singularity \
+  --fasta "data/tiny_dataset/fasta/tiny_v2.fasta" \
+  -resume
+
+
+# ./nextflow src/nf_modules/BWA/mapping_single.nf \
+#   -c src/nf_modules/BWA/mapping_single.config \
+#   -profile singularity \
+#   --index "results/mapping/index/tiny_v2.index" \
+#   --fastq "data/tiny_dataset/fastq/tiny*_S.fastq"
+
+./nextflow src/nf_modules/BWA/mapping_paired.nf \
+  -c src/nf_modules/BWA/mapping_paired.config \
+  -profile singularity \
+  --index "results/mapping/index/tiny_v2*" \
+  --fastq "data/tiny_dataset/fastq/tiny*_R{1,2}.fastq" \
+  -resume
+
+fi
diff --git a/src/singularity_modules/BWA/0.7.17/build.sh b/src/singularity_modules/BWA/0.7.17/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..340a8c219741a03182c5832ec78f92f0da3b652a
--- /dev/null
+++ b/src/singularity_modules/BWA/0.7.17/build.sh
@@ -0,0 +1,2 @@
+#/bin/sh
+sudo singularity build --force bin/bwa:0.7.17.sif src/singularity_modules/BWA/0.7.17/BWA.def