Skip to content
Snippets Groups Projects
Unverified Commit b25a6418 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

deepTools: add compute_matrix module

parent 0a98c166
No related branches found
No related tags found
No related merge requests found
......@@ -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'
}
}
}
......
params.bam = "$baseDir/data/bam/*.bam"
params.bamidx = "$baseDir/data/bam/*.idx"
log.info "bams files : ${params.bam}"
......
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'
}
}
}
}
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
"""
}
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment