-
Notifications
You must be signed in to change notification settings - Fork 145
/
plot_homer_annotatepeaks.nf
37 lines (31 loc) · 1.58 KB
/
plot_homer_annotatepeaks.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
process PLOT_HOMER_ANNOTATEPEAKS {
label 'process_medium'
conda (params.enable_conda ? "conda-forge::r-base=4.0.3 conda-forge::r-reshape2=1.4.4 conda-forge::r-optparse=1.6.6 conda-forge::r-ggplot2=3.3.3 conda-forge::r-scales=1.1.1 conda-forge::r-viridis=0.5.1 conda-forge::r-tidyverse=1.3.0 bioconda::bioconductor-biostrings=2.58.0 bioconda::bioconductor-complexheatmap=2.6.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-ad9dd5f398966bf899ae05f8e7c54d0fb10cdfa7:05678da05b8e5a7a5130e90a9f9a6c585b965afa-0':
'quay.io/biocontainers/mulled-v2-ad9dd5f398966bf899ae05f8e7c54d0fb10cdfa7:05678da05b8e5a7a5130e90a9f9a6c585b965afa-0' }"
input:
path annos
path mqc_header
val suffix
output:
path '*.txt' , emit: txt
path '*.pdf' , emit: pdf
path '*.tsv' , emit: tsv
path "versions.yml", emit: versions
script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "annotatepeaks"
"""
plot_homer_annotatepeaks.r \\
-i ${annos.join(',')} \\
-s ${annos.join(',').replaceAll("${suffix}","")} \\
-p $prefix \\
$args
find ./ -type f -name "*summary.txt" -exec cat {} \\; | cat $mqc_header - > ${prefix}.summary_mqc.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
END_VERSIONS
"""
}