Fix bedtools sort module

This commit is contained in:
drpatelh 2021-02-07 21:32:43 +00:00
parent f3b5af4ed5
commit 5779b180da
4 changed files with 20 additions and 19 deletions

View file

@ -11,7 +11,7 @@ process BEDTOOLS_SORT {
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } 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) { if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0" container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
} else { } else {
@ -19,10 +19,10 @@ process BEDTOOLS_SORT {
} }
input: input:
tuple val(meta), path(beds) tuple val(meta), path(bed)
output: output:
tuple val(meta), path('*.sort.bed'), emit: bed tuple val(meta), path('*.bed'), emit: bed
path '*.version.txt' , emit: version path '*.version.txt' , emit: version
script: script:
@ -31,9 +31,9 @@ process BEDTOOLS_SORT {
""" """
bedtools \\ bedtools \\
sort \\ sort \\
-i $beds \\ -i $bed \\
$options.args \\ $options.args \\
> ${prefix}.sort.bed > ${prefix}.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
""" """

View file

@ -24,18 +24,21 @@ params:
description: | description: |
Run the module with Conda using the software specified Run the module with Conda using the software specified
via the `conda` directive 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: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- beds: - bed:
type: file type: file
description: List of bed files description: Input BED file
pattern: "*.{bed}" pattern: "*.{bed}"
output: output:
- meta: - meta:
type: map type: map
@ -44,14 +47,13 @@ output:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bed: - bed:
type: file type: file
description: Sorted bed file description: Sorted BED file
pattern: "*.{sort.bed}" pattern: "*.{bed}"
- version: - version:
type: file type: file
description: File containing software version description: File containing software version
pattern: "*.{version.txt}" pattern: "*.{version.txt}"
authors: authors:
-"@Emiller88" - "@Emiller88"
-"@sruthipsuresh" - "@sruthipsuresh"
- "@drpatelh"

View file

@ -9,6 +9,5 @@ workflow test_bedtools_sort {
input = [ [ id:'test'], input = [ [ id:'test'],
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ] file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]
BEDTOOLS_SORT( input ) BEDTOOLS_SORT ( input )
} }

View file

@ -4,5 +4,5 @@
- bedtools - bedtools
- bedtools_sort - bedtools_sort
files: files:
- path: output/bedtools/test.sort.bed - path: output/bedtools/test.bed
md5sum: 4279202e33fcce3d19f420f1b27fddee md5sum: 4279202e33fcce3d19f420f1b27fddee