Fixed intersect, complement indentation issues

This commit is contained in:
sruthipsuresh 2021-01-27 08:09:49 -06:00
parent 3da39dfc88
commit 19b55fc67c
4 changed files with 36 additions and 28 deletions

View file

@ -26,10 +26,16 @@ process BEDTOOLS_COMPLEMENT {
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bedtools complement -i $beds -g $sizes ${options.args} > ${prefix}.complement.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bedtools \\
complement \\
-i $beds \\
-g $sizes \\
$options.args \\
> ${prefix}.complement.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""
}

View file

@ -8,7 +8,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/complement.html
params:
- outdir:
type: string

View file

@ -20,22 +20,22 @@ process BEDTOOLS_INTERSECT {
input:
tuple val(meta), path(bed1), path(bed2)
output:
tuple val(meta), path("*.intersect.bed"), emit: bed
path "*.version.txt", emit: version
script: // TODO change script to account for multiple possible intersections
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bedtools \\
intersect \\
-a ${bed1} \\
-b ${bed2} \\
$options.args \\
> ${prefix}.intersect.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""
output:
tuple val(meta), path("*.intersect.bed"), emit: bed
path "*.version.txt", emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
bedtools \\
intersect \\
-a ${bed1} \\
-b ${bed2} \\
$options.args \\
> ${prefix}.intersect.bed
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
"""
}

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/intersect.html
params:
- outdir:
type: string
@ -33,10 +32,15 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
- bed1:
type: file
description: List of bed files
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.
pattern: "*.{bed}"
output:
- meta:
type: map
@ -52,7 +56,6 @@ output:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors:
-"@Emiller88"
-"@sruthipsuresh"