diff --git a/software/bedtools/merge/main.nf b/software/bedtools/merge/main.nf index 30f7d235..d0b1b712 100644 --- a/software/bedtools/merge/main.nf +++ b/software/bedtools/merge/main.nf @@ -1,17 +1,32 @@ +def MODULE = "bedtools_merge" +params.publish_dir = MODULE +params.publish_results = "default" + process BEDTOOLS_MERGE { tag { input_file } + 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" container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' + conda "${moduleDir}/environment.yml" + input: path (input_file) val (bedtools_merge_args) output: - stdout() + path "${input_file}.bed", emit: merge + path "*.version.txt", emit: version script: """ - bedtools merge -i ${input_file} ${bedtools_merge_args} + bedtools merge -i ${input_file} ${bedtools_merge_args} > ${input_file}.bed + bedtools --version | sed -n "s/.*\\(v.*\$\\)/\\1/p" > bedtools.version.txt """ } diff --git a/software/bedtools/merge/test/input_data/A.bed b/software/bedtools/merge/test/input_data/A.bed deleted file mode 100644 index dc9a4f0c..00000000 --- a/software/bedtools/merge/test/input_data/A.bed +++ /dev/null @@ -1,5 +0,0 @@ -chr1 951 1061 -chr1 1300 1420 -chr1 1400 1500 - - diff --git a/software/bedtools/merge/test/input_data/A.bed b/software/bedtools/merge/test/input_data/A.bed new file mode 120000 index 00000000..4698611f --- /dev/null +++ b/software/bedtools/merge/test/input_data/A.bed @@ -0,0 +1 @@ +../../../../../tests/data/bed/A.bed \ No newline at end of file diff --git a/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam b/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam deleted file mode 100644 index bf18ab69..00000000 Binary files a/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam and /dev/null differ diff --git a/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam b/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam new file mode 120000 index 00000000..50ca10b6 --- /dev/null +++ b/software/bedtools/merge/test/input_data/JK2067_downsampled_s0.1.bam @@ -0,0 +1 @@ +../../../../../tests/data/bam/JK2067_downsampled_s0.1.bam \ No newline at end of file diff --git a/software/bedtools/merge/test/main.nf b/software/bedtools/merge/test/main.nf index 46b8ed8a..a4ef92a5 100644 --- a/software/bedtools/merge/test/main.nf +++ b/software/bedtools/merge/test/main.nf @@ -2,9 +2,11 @@ nextflow.preview.dsl = 2 +params.out_dir = "test_output" +params.fastqc_args = '' +params.publish_dir_mode = "copy" params.bedtools_merge_args = '' //''-s -c 6 -o distinct' -include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params) include BEDTOOLS_MERGE from '../main.nf' params(params) // Define input channels @@ -14,5 +16,4 @@ ch_input = Channel.fromPath('./input_data/A.bed') // Run the workflow workflow { BEDTOOLS_MERGE(ch_input, params.bedtools_merge_args) - // .check_output() }