From 98c8f44130623e0e53c5a5f3a6435e9544576882 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 15 Jul 2020 18:15:49 +0200 Subject: [PATCH] Bedtools intersect adapted to the current module standard --- software/bedtools/intersect/main.nf | 13 +++++++++++++ software/bedtools/intersect/test/input_data/A.bed | 6 +----- software/bedtools/intersect/test/input_data/B.bed | 2 +- software/bedtools/intersect/test/main.nf | 4 +++- software/bedtools/intersect/test/nextflow.config | 2 -- 5 files changed, 18 insertions(+), 9 deletions(-) mode change 100644 => 120000 software/bedtools/intersect/test/input_data/A.bed mode change 100644 => 120000 software/bedtools/intersect/test/input_data/B.bed delete mode 100644 software/bedtools/intersect/test/nextflow.config diff --git a/software/bedtools/intersect/main.nf b/software/bedtools/intersect/main.nf index a5d3a944..8a5ba53b 100644 --- a/software/bedtools/intersect/main.nf +++ b/software/bedtools/intersect/main.nf @@ -1,8 +1,21 @@ +def MODULE = "bedtools_intersect" +params.publish_dir = MODULE +params.publish_results = "default" + process INTERSECT_BED { tag "$input_file_1-$input_file_2" + 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_1) path (input_file_2) diff --git a/software/bedtools/intersect/test/input_data/A.bed b/software/bedtools/intersect/test/input_data/A.bed deleted file mode 100644 index dc9a4f0c..00000000 --- a/software/bedtools/intersect/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/intersect/test/input_data/A.bed b/software/bedtools/intersect/test/input_data/A.bed new file mode 120000 index 00000000..4698611f --- /dev/null +++ b/software/bedtools/intersect/test/input_data/A.bed @@ -0,0 +1 @@ +../../../../../tests/data/bed/A.bed \ No newline at end of file diff --git a/software/bedtools/intersect/test/input_data/B.bed b/software/bedtools/intersect/test/input_data/B.bed deleted file mode 100644 index 74e0ef4e..00000000 --- a/software/bedtools/intersect/test/input_data/B.bed +++ /dev/null @@ -1 +0,0 @@ -chr1 999 1010 diff --git a/software/bedtools/intersect/test/input_data/B.bed b/software/bedtools/intersect/test/input_data/B.bed new file mode 120000 index 00000000..d0ad47f4 --- /dev/null +++ b/software/bedtools/intersect/test/input_data/B.bed @@ -0,0 +1 @@ +../../../../../tests/data/bed/B.bed \ No newline at end of file diff --git a/software/bedtools/intersect/test/main.nf b/software/bedtools/intersect/test/main.nf index e966ea7a..cb8e7c3d 100644 --- a/software/bedtools/intersect/test/main.nf +++ b/software/bedtools/intersect/test/main.nf @@ -2,6 +2,9 @@ nextflow.preview.dsl = 2 +params.out_dir = "test_output" +params.fastqc_args = '' +params.publish_dir_mode = "copy" params.intersect_args = '' //'-bed -c -f 0.20' include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params) @@ -14,5 +17,4 @@ ch_input_2 = Channel.fromPath('./input_data/B.bed') // Run the workflow workflow { INTERSECT_BED(ch_input_1, ch_input_2, params.intersect_args) - // .check_output() } diff --git a/software/bedtools/intersect/test/nextflow.config b/software/bedtools/intersect/test/nextflow.config deleted file mode 100644 index c137a138..00000000 --- a/software/bedtools/intersect/test/nextflow.config +++ /dev/null @@ -1,2 +0,0 @@ -docker.enabled = true -params.outdir = './results'