mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-02 20:52:07 -05:00
Fix bedtools slip module
This commit is contained in:
parent
38964ecfc0
commit
f3b5af4ed5
4 changed files with 62 additions and 79 deletions
|
@ -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
|
||||
"""
|
||||
|
|
|
@ -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 feature’s 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"
|
||||
-"@sruthipsuresh"
|
||||
authors:
|
||||
- "@Emiller88"
|
||||
- "@sruthipsuresh"
|
||||
- "@drpatelh"
|
||||
|
|
|
@ -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) )
|
||||
}
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
- bedtools
|
||||
- bedtools_slop
|
||||
files:
|
||||
- path: output/bedtools/test.slop.bed
|
||||
- path: output/bedtools/test.bed
|
||||
md5sum: 5f6ecc3e3cc6cee9537a1d088b02abec
|
||||
|
|
Loading…
Reference in a new issue