From 38964ecfc0aa9c23f4208f11616ca4ef4e58ddf8 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Sun, 7 Feb 2021 21:32:01 +0000 Subject: [PATCH] Fix bedtools intersect module --- software/bedtools/intersect/main.nf | 12 ++++++------ software/bedtools/intersect/meta.yml | 20 ++++++++++++-------- tests/software/bedtools/intersect/main.nf | 2 +- tests/software/bedtools/intersect/test.yml | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/software/bedtools/intersect/main.nf b/software/bedtools/intersect/main.nf index c8db70d2..77283760 100644 --- a/software/bedtools/intersect/main.nf +++ b/software/bedtools/intersect/main.nf @@ -11,7 +11,7 @@ process BEDTOOLS_INTERSECT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } - conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null) + conda (params.enable_conda ? "bioconda::bedtools=2.30.0=hc088bd4_0" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0" } else { @@ -22,8 +22,8 @@ process BEDTOOLS_INTERSECT { tuple val(meta), path(bed1), path(bed2) output: - tuple val(meta), path('*.intersect.bed'), emit: bed - path '*.version.txt' , emit: version + tuple val(meta), path('*.bed'), emit: bed + path '*.version.txt' , emit: version script: def software = getSoftwareName(task.process) @@ -31,10 +31,10 @@ process BEDTOOLS_INTERSECT { """ bedtools \\ intersect \\ - -a ${bed1} \\ - -b ${bed2} \\ + -a $bed1 \\ + -b $bed2 \\ $options.args \\ - > ${prefix}.intersect.bed + > ${prefix}.bed bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt """ diff --git a/software/bedtools/intersect/meta.yml b/software/bedtools/intersect/meta.yml index 34e00e45..5a72df53 100644 --- a/software/bedtools/intersect/meta.yml +++ b/software/bedtools/intersect/meta.yml @@ -24,7 +24,11 @@ params: description: | Run the module with Conda using the software specified via the `conda` directive - + - singularity_pull_docker_container: + type: boolean + description: | + Instead of directly downloading Singularity images for use with Singularity, + force the workflow to pull and convert Docker containers instead. input: - meta: type: map @@ -33,13 +37,12 @@ input: e.g. [ id:'test', single_end:false ] - bed1: type: file - description: Bed file, each feature in 1 is compared to 2 in search of overlaps + description: BED file, each feature in 1 is compared to 2 in search of overlaps pattern: "*.{bed}" - bed2: type: file - description: Second bed file, used to compare to 1. + description: Second bed file, used to compare to first BED file pattern: "*.{bed}" - output: - meta: type: map @@ -48,12 +51,13 @@ output: e.g. [ id:'test', single_end:false ] - bed: type: file - description: Overlapped bed file - pattern: "*.{intersect.bed}" + description: BED file with intersected intervals + pattern: "*.{bed}" - version: type: file description: File containing software version pattern: "*.{version.txt}" authors: - -"@Emiller88" - -"@sruthipsuresh" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" diff --git a/tests/software/bedtools/intersect/main.nf b/tests/software/bedtools/intersect/main.nf index 83635419..5bbca7e8 100644 --- a/tests/software/bedtools/intersect/main.nf +++ b/tests/software/bedtools/intersect/main.nf @@ -10,5 +10,5 @@ workflow test_bedtools_intersect { file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true), file("${launchDir}/tests/data/bed/B.bed", checkIfExists: true) ] - BEDTOOLS_INTERSECT( input ) + BEDTOOLS_INTERSECT ( input ) } diff --git a/tests/software/bedtools/intersect/test.yml b/tests/software/bedtools/intersect/test.yml index fe60d7ca..5d5d3711 100644 --- a/tests/software/bedtools/intersect/test.yml +++ b/tests/software/bedtools/intersect/test.yml @@ -4,5 +4,5 @@ - bedtools - bedtools_intersect files: - - path: output/bedtools/test.intersect.bed + - path: output/bedtools/test.bed md5sum: cc1bb317886e7df0a942b56f8a320d9c