forked from nf-core/chipseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
28 lines (23 loc) · 957 Bytes
/
main.nf
File metadata and controls
28 lines (23 loc) · 957 Bytes
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
process ANNOTATE_BOOLEAN_PEAKS {
tag "$meta.id"
label 'process_low'
conda "conda-forge::sed=4.7"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'docker.io/library/ubuntu:20.04' }"
input:
tuple val(meta), path(boolean_txt), path(homer_peaks)
output:
path '*.boolean.annotatePeaks.txt', emit: annotate_peaks_txt
path "versions.yml" , emit: versions
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cut -f2- ${homer_peaks} | awk 'NR==1; NR > 1 {print \$0 | "sort -T '.' -k1,1 -k2,2n"}' | cut -f6- > tmp.txt
paste $boolean_txt tmp.txt > ${prefix}.boolean.annotatePeaks.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//')
END_VERSIONS
"""
}