Fix bedtools intersect module

This commit is contained in:
drpatelh 2021-02-07 21:32:01 +00:00
parent a37b116186
commit 38964ecfc0
4 changed files with 20 additions and 16 deletions

View file

@ -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,7 +22,7 @@ process BEDTOOLS_INTERSECT {
tuple val(meta), path(bed1), path(bed2)
output:
tuple val(meta), path('*.intersect.bed'), emit: bed
tuple val(meta), path('*.bed'), emit: bed
path '*.version.txt' , emit: version
script:
@ -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
"""

View file

@ -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,8 +51,8 @@ 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
@ -57,3 +60,4 @@ output:
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

View file

@ -4,5 +4,5 @@
- bedtools
- bedtools_intersect
files:
- path: output/bedtools/test.intersect.bed
- path: output/bedtools/test.bed
md5sum: cc1bb317886e7df0a942b56f8a320d9c