2020-07-15 16:16:01 +00:00
|
|
|
def MODULE = "bedtools_merge"
|
|
|
|
params.publish_dir = MODULE
|
|
|
|
params.publish_results = "default"
|
|
|
|
|
2020-07-14 14:46:49 +00:00
|
|
|
process BEDTOOLS_MERGE {
|
|
|
|
tag { input_file }
|
|
|
|
|
2020-07-15 16:16:01 +00:00
|
|
|
publishDir "${params.out_dir}/${params.publish_dir}",
|
|
|
|
mode: params.publish_dir_mode,
|
|
|
|
saveAs: { filename ->
|
|
|
|
if (params.publish_results == "none") null
|
|
|
|
else filename }
|
|
|
|
|
|
|
|
//container "docker.pkg.github.com/nf-core/$MODULE"
|
2020-07-14 14:46:49 +00:00
|
|
|
container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0'
|
|
|
|
|
2020-07-15 16:16:01 +00:00
|
|
|
conda "${moduleDir}/environment.yml"
|
|
|
|
|
2020-07-14 14:46:49 +00:00
|
|
|
input:
|
|
|
|
path (input_file)
|
|
|
|
val (bedtools_merge_args)
|
|
|
|
|
|
|
|
output:
|
2020-07-15 16:16:01 +00:00
|
|
|
path "${input_file}.bed", emit: merge
|
|
|
|
path "*.version.txt", emit: version
|
2020-07-14 14:46:49 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
"""
|
2020-07-15 16:16:01 +00:00
|
|
|
bedtools merge -i ${input_file} ${bedtools_merge_args} > ${input_file}.bed
|
|
|
|
bedtools --version | sed -n "s/.*\\(v.*\$\\)/\\1/p" > bedtools.version.txt
|
2020-07-14 14:46:49 +00:00
|
|
|
"""
|
|
|
|
}
|