Fix bedtools slip module

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

View file

@ -11,20 +11,20 @@ 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
path "*.version.txt", emit: version
tuple val(meta), path("*.bed"), emit: bed
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
@ -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

@ -1,75 +1,59 @@
name: bedtools_slop
description: Adds a specified number of bases in each direction (unique values may be specified for either -l or -r)
keywords:
- bed
- slopBed
- bed
- slopBed
tools:
- bedtools:
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
- bedtools:
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: |
The pipeline's output directory. By default, the module will
output files into `$params.outdir/<SOFTWARE>`
- publish_dir_mode:
type: string
description: |
Value for the Nextflow `publishDir` mode parameter.
Available: symlink, rellink, link, copy, copyNoFollow, move.
- enable_conda:
type: boolean
description: |
Run the module with Conda using the software specified
via the `conda` directive
- outdir:
type: string
description: |
The pipeline's output directory. By default, the module will
output files into `$params.outdir/<SOFTWARE>`
- publish_dir_mode:
type: string
description: |
Value for the Nextflow `publishDir` mode parameter.
Available: symlink, rellink, link, copy, copyNoFollow, move.
- enable_conda:
type: boolean
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 ]
- bed:
type: file
description: List of bed files
pattern: "*.{bed}"
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Input BED file
pattern: "*.{bed}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Edited bed file
pattern: "*.{slop.bed}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors: -"@Emiller88"
-"@sruthipsuresh"
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Slopped BED file
pattern: "*.{bed}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors:
- "@Emiller88"
- "@sruthipsuresh"
- "@drpatelh"

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