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

deepTools: add plot_profile module

parent b25a6418
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ profiles {
}
psmn {
process{
withName: bam_to_bigwig {
withName: compute_matrix {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "deepTools/3.0.2"
executor = "sge"
......
......@@ -19,7 +19,6 @@ Channel
process compute_matrix {
tag "$file_id"
cpus 4
echo true
publishDir "results/mapping/region_matrix/", mode: 'copy'
input:
......
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withName: plot_profile {
container = "deeptools:3.0.2"
}
}
}
psmn {
process{
withName: plot_profile {
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.matrix = "$baseDir/data/region_matrix/*.mat.gz"
params.title = "plot title"
log.info "matrix files : ${params.matrix}"
log.info "plot title : ${params.title}"
Channel
.fromPath( params.matrix )
.ifEmpty { error "Cannot find any matrix files matching: ${params.matrix}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { matrix_files }
process plot_profile {
tag "$file_id"
cpus 4
publishDir "results/mapping/region_matrix/", mode: 'copy'
input:
set file_id, file(matrix) from matrix_files
output:
set file_id, "*.pdf" into region_matrix
script:
/*
see more option at
https://deeptools.readthedocs.io/en/develop/content/tools/plotProfile.html
*/
"""
plotProfile -m ${matrix} \
--plotFileFormat=pdf \
-out ${file_id}.pdf \
--plotType=fill \
--perGroup \
--plotTitle "${params.title}"
"""
}
......@@ -4,3 +4,4 @@
./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"
./nextflow src/nf_modules/deepTools/plot_profile.nf -c src/nf_modules/deepTools/plot_profile.config -profile docker --matrix "results/mapping/region_matrix/*.mat.gz" --title "plot title"
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