diff --git a/src/nf_modules/deepTools/bam_to_bigwig.config b/src/nf_modules/deepTools/bam_to_bigwig.config
index 90eada5d007b43584fedb80f9ba650befde65739..c1b71cb03cf2962ada6ab81428371f9dc8fc8b8d 100644
--- a/src/nf_modules/deepTools/bam_to_bigwig.config
+++ b/src/nf_modules/deepTools/bam_to_bigwig.config
@@ -28,9 +28,10 @@ profiles {
         module = "deepTools/3.0.2"
         executor = "sge"
         clusterOptions = "-m e -cwd -V"
-        memory = "20GB"
-        time = "12h"
-        queue = 'monointeldeb128'
+        memory = "30GB"
+        time = "24h"
+        queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
+        penv = 'openmp16'
       }
     }
   }
diff --git a/src/nf_modules/deepTools/bam_to_bigwig.nf b/src/nf_modules/deepTools/bam_to_bigwig.nf
index 012de76a849e5e0e189c012207244525ce574533..3507337d800b1797cbb5bcbe7c8c4e195a4df187 100644
--- a/src/nf_modules/deepTools/bam_to_bigwig.nf
+++ b/src/nf_modules/deepTools/bam_to_bigwig.nf
@@ -1,5 +1,4 @@
 params.bam = "$baseDir/data/bam/*.bam"
-params.bamidx = "$baseDir/data/bam/*.idx"
 
 log.info "bams files : ${params.bam}"
 
diff --git a/src/nf_modules/deepTools/compute_matrix.config b/src/nf_modules/deepTools/compute_matrix.config
new file mode 100644
index 0000000000000000000000000000000000000000..cb32bf559be596469ad60f4a5681288e07332ba8
--- /dev/null
+++ b/src/nf_modules/deepTools/compute_matrix.config
@@ -0,0 +1,25 @@
+profiles {
+  docker {
+    docker.temp = 'auto'
+    docker.enabled = true
+    process {
+      withName: compute_matrix {
+        container = "deeptools:3.0.2"
+      }
+    }
+  }
+  psmn {
+    process{
+      withName: bam_to_bigwig {
+        beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
+        module = "deepTools/3.0.2"
+        executor = "sge"
+        clusterOptions = "-m e -cwd -V"
+        memory = "30GB"
+        time = "24h"
+        queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
+        penv = 'openmp16'
+      }
+    }
+  }
+}
diff --git a/src/nf_modules/deepTools/compute_matrix.nf b/src/nf_modules/deepTools/compute_matrix.nf
new file mode 100644
index 0000000000000000000000000000000000000000..53b4b1958ed22bb37eee7122e0c912215046268a
--- /dev/null
+++ b/src/nf_modules/deepTools/compute_matrix.nf
@@ -0,0 +1,41 @@
+params.bam = "$baseDir/data/bigwig/*.bw"
+params.bed = "$baseDir/data/annot/*.bed"
+
+log.info "bigwig files : ${params.bw}"
+log.info "bed files : ${params.bed}"
+
+Channel
+  .fromPath( params.bw )
+  .ifEmpty { error "Cannot find any bigwig files matching: ${params.bw}" }
+  .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
+  .set { bw_files }
+
+Channel
+  .fromPath( params.bed )
+  .ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
+  .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
+  .set { bed_files }
+
+process compute_matrix {
+  tag "$file_id"
+  cpus 4
+  echo true
+  publishDir "results/mapping/region_matrix/", mode: 'copy'
+
+  input:
+    set bw_file_id, file(bw) from bw_files.collect()
+    set bed_file_id, file(bed) from bed_files.collect()
+
+  output:
+    set bed_file_id, "*.mat.gz" into region_matrix
+
+  script:
+"""
+computeMatrix scale-regions -S ${bw} \
+  -p ${task.cpus} \
+  -R ${bed} \
+  --beforeRegionStartLength 100 \
+  --afterRegionStartLength 100 \
+  -o ${bed_file_id}.mat.gz
+"""
+}
diff --git a/src/nf_modules/deepTools/tests.sh b/src/nf_modules/deepTools/tests.sh
index 4681615160d2b7fd31c67c8ec07ee3838968308d..63b8434ed901c719e1a0c138192d942546105524 100755
--- a/src/nf_modules/deepTools/tests.sh
+++ b/src/nf_modules/deepTools/tests.sh
@@ -2,5 +2,5 @@
 
 ./nextflow src/nf_modules/deepTools/bam_to_bigwig.nf -c src/nf_modules/deepTools/bam_to_bigwig.config -profile docker --bam "data/tiny_dataset/map/tiny_v2.sort.bam"
 
-./nextflow src/nf_modules/deepTools/compute_matrix.nf -c src/nf_modules/deepTools/compute_matrix.config -profile docker --bam "results/mapping/bigwig/*.bw"
+./nextflow src/nf_modules/deepTools/compute_matrix.nf -c src/nf_modules/deepTools/compute_matrix.config -profile docker --bw "results/mapping/bigwig/*.bw" --bed "data/tiny_dataset/annot/tiny.bed"