Merge pull request #151 from drpatelh/bedtools

Follow up fixes for bedtools modules added in #79
This commit is contained in:
Harshil Patel 2021-02-09 01:54:31 +00:00 committed by GitHub
commit 46e5df2cf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 158 additions and 161 deletions

View file

@ -25,7 +25,7 @@ jobs:
matrix:
nxf_version: ['20.11.0-edge']
tags: ['${{ fromJson(needs.changes.outputs.modules) }}']
profile: ['docker', 'singularity'] ## 'conda'
profile: ['docker', 'singularity', 'conda']
env:
NXF_ANSI_LOG: false
steps:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -11,7 +11,7 @@ process BEDTOOLS_COMPLEMENT {
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 {
@ -19,10 +19,11 @@ process BEDTOOLS_COMPLEMENT {
}
input:
tuple val(meta), path(beds), path(sizes)
tuple val(meta), path(bed)
path sizes
output:
tuple val(meta), path('*.complement.bed'), emit: bed
tuple val(meta), path('*.bed'), emit: bed
path '*.version.txt' , emit: version
script:
@ -31,10 +32,10 @@ process BEDTOOLS_COMPLEMENT {
"""
bedtools \\
complement \\
-i $beds \\
-i $bed \\
-g $sizes \\
$options.args \\
> ${prefix}.complement.bed
> ${prefix}.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""

View file

@ -24,22 +24,25 @@ 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
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- beds:
- bed:
type: file
description: List of bed files
description: Input BED file
pattern: "*.{bed}"
- sizes:
type: file
description: File which defines the chromosome lengths for a given genome
pattern: "*.{sizes}"
output:
- meta:
type: map
@ -49,7 +52,7 @@ output:
- bed:
type: file
description: Bed file with all genomic intervals that are not covered by at least one record from the input file.
pattern: "*.{complement.bed}"
pattern: "*.{bed}"
- version:
type: file
description: File containing software version
@ -57,3 +60,4 @@ output:
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

View file

@ -11,7 +11,7 @@ process BEDTOOLS_GENOMECOV {
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 {
@ -19,10 +19,10 @@ process BEDTOOLS_GENOMECOV {
}
input:
tuple val(meta), path(bams)
tuple val(meta), path(bam)
output:
tuple val(meta), path("*.bed"), emit: coverage
tuple val(meta), path("*.bed"), emit: bed
path "*.version.txt" , emit: version
script:
@ -31,7 +31,7 @@ process BEDTOOLS_GENOMECOV {
"""
bedtools \\
genomecov \\
-ibam $bams \\
-ibam $bam \\
$options.args \\
> ${prefix}.bed

View file

@ -9,7 +9,6 @@ tools:
description: |
A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types.
documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html
params:
- outdir:
type: string
@ -26,7 +25,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
@ -35,7 +38,7 @@ input:
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: List of bam files
description: Input BAM file
pattern: "*.{bam}"
output:
- meta:
@ -47,12 +50,11 @@ output:
type: file
description: Computed genomecov bed file
pattern: "*.{bed}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

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

@ -9,9 +9,9 @@ process BEDTOOLS_MERGE {
label 'process_medium'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_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) {
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
} else {
@ -19,10 +19,10 @@ process BEDTOOLS_MERGE {
}
input:
tuple val(meta), path(beds)
tuple val(meta), path(bed)
output:
tuple val(meta), path('*.merged.bed'), emit: bed
tuple val(meta), path('*.bed'), emit: bed
path '*.version.txt' , emit: version
script:
@ -31,9 +31,9 @@ process BEDTOOLS_MERGE {
"""
bedtools \\
merge \\
-i $beds \\
-i $bed \\
$options.args \\
> ${prefix}.merged.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,9 +37,8 @@ input:
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Presorted interval bed file
description: Input BED file
pattern: "*.{bed}"
output:
- meta:
type: map
@ -45,7 +48,7 @@ output:
- bed:
type: file
description: Overlapped bed file with combined features
pattern: "*.{merged.bed}"
pattern: "*.{bed}"
- version:
type: file
description: File containing software version
@ -53,3 +56,4 @@ output:
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

View file

@ -11,19 +11,19 @@ process BEDTOOLS_SLOP {
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 {
container "quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0"
}
input:
tuple val(meta), path(beds), path (sizes)
tuple val(meta), path(bed)
path sizes
output:
tuple val(meta), path("*.slop.bed"), emit: bed
tuple val(meta), path("*.bed"), emit: bed
path "*.version.txt" , emit: version
script:
@ -32,10 +32,10 @@ process BEDTOOLS_SLOP {
"""
bedtools \\
slop \\
-i $beds \\
-i $bed \\
-g $sizes \\
$options.args \\
> ${prefix}.slop.bed
> ${prefix}.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""

View file

@ -8,27 +8,7 @@ tools:
description: |
A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types.
documentation: https://bedtools.readthedocs.io/en/latest/content/tools/slop.html
params:
- l:
type: integer
description: The number of base pairs to subtract from the start coordinate
- r:
type: integer
description: The number of base pairs to add to the end coordinate
- b:
type: integer
description: Increases the entry by the same number base pairs in each direction
- pct:
type: boolean
description: |
Define -l and -r as a fraction of the features length. E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstream”. By default this is set to false.
- header:
type: boolean
description: |
Print the header from the input file prior to results.
- outdir:
type: string
description: |
@ -44,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
@ -53,7 +37,7 @@ input:
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: List of bed files
description: Input BED file
pattern: "*.{bed}"
output:
- meta:
@ -63,13 +47,13 @@ output:
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Edited bed file
pattern: "*.{slop.bed}"
description: Slopped BED file
pattern: "*.{bed}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors: -"@Emiller88"
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

View file

@ -11,7 +11,7 @@ process BEDTOOLS_SORT {
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 {
@ -19,10 +19,10 @@ process BEDTOOLS_SORT {
}
input:
tuple val(meta), path(beds)
tuple val(meta), path(bed)
output:
tuple val(meta), path('*.sort.bed'), emit: bed
tuple val(meta), path('*.bed'), emit: bed
path '*.version.txt' , emit: version
script:
@ -31,9 +31,9 @@ process BEDTOOLS_SORT {
"""
bedtools \\
sort \\
-i $beds \\
-i $bed \\
$options.args \\
> ${prefix}.sort.bed
> ${prefix}.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""

View file

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

View file

@ -7,8 +7,7 @@ include { BEDTOOLS_COMPLEMENT } from '../../../../software/bedtools/complement/m
workflow test_bedtools_complement {
def input = []
input = [ [ id:'test'],
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true),
file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) ]
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]
BEDTOOLS_COMPLEMENT( input )
BEDTOOLS_COMPLEMENT ( input, file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) )
}

View file

@ -4,5 +4,5 @@
- bedtools
- bedtools_complement
files:
- path: output/bedtools/test.complement.bed
- path: output/bedtools/test.bed
md5sum: 55a43973abb1a08ac57290ff44f6c502

View file

@ -4,7 +4,6 @@ nextflow.enable.dsl = 2
include { BEDTOOLS_GENOMECOV } from '../../../../software/bedtools/genomecov/main.nf' addParams( options: [:] )
workflow test_bedtools_genomecov {
def input = []
input = [ [ id:'test'],

View file

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

View file

@ -4,5 +4,5 @@
- bedtools
- bedtools_merge
files:
- path: output/bedtools/test.merged.bed
- path: output/bedtools/test.bed
md5sum: 13e5a3b254fac35fe0da0c92cbaf1761

View file

@ -7,9 +7,8 @@ include { BEDTOOLS_SLOP } from '../../../../software/bedtools/slop/main.nf' addP
workflow test_bedtools_slop {
def input = []
input = [ [ id:'test'],
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true),
file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) ]
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]
BEDTOOLS_SLOP( input )
BEDTOOLS_SLOP ( input, file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) )
}

View file

@ -4,5 +4,5 @@
- bedtools
- bedtools_slop
files:
- path: output/bedtools/test.slop.bed
- path: output/bedtools/test.bed
md5sum: 5f6ecc3e3cc6cee9537a1d088b02abec

View file

@ -10,5 +10,4 @@ workflow test_bedtools_sort {
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]
BEDTOOLS_SORT ( input )
}

View file

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