mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Fixed slop file
This commit is contained in:
parent
957983bd99
commit
e3bbbb48fc
3 changed files with 20 additions and 50 deletions
|
@ -15,34 +15,29 @@ process BEDTOOLS_SLOP {
|
||||||
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:bedtools:2.30.0--hc088bd4_0"
|
container "https://depot.galaxyproject.org/singularity/bedtools:bedtools:2.30.0--hc088bd4_0"
|
||||||
} else {
|
} else {
|
||||||
container "quay.io/biocontainers/bedtools:bedtools:2.30.0--hc088bd4_0"
|
container "quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(beds), path (sizes)
|
tuple val(meta), path(beds), path (sizes)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.slop.bed"), emit: bed
|
tuple val(meta), path("*.slop.bed"), emit: bed
|
||||||
path "*.version.txt", emit: version
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
def header = params.header ? "-header":''
|
"""
|
||||||
def pct = params.pct ? "-pct":''
|
bedtools \\
|
||||||
|
slop \\
|
||||||
|
-i $beds \\
|
||||||
|
-g $sizes \\
|
||||||
|
$options.args \\
|
||||||
|
> ${prefix}.slop.bed
|
||||||
|
|
||||||
def symmetry = ''
|
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
|
||||||
if (meta.symmetry) {
|
"""
|
||||||
|
|
||||||
"""
|
|
||||||
slopBed -i $beds -g $sizes -b $params.b $header $pct $options.args> ${prefix}.slop.bed
|
|
||||||
bedtools --version | sed -e "s/Bedtools v//g" > ${software}.version.txt
|
|
||||||
"""
|
|
||||||
} else {
|
|
||||||
"""
|
|
||||||
slopBed -i $beds -g $sizes -l $params.l -r $params.r $header $pct $options.args> ${prefix}.slop.bed
|
|
||||||
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,7 @@ include { BEDTOOLS_COMPLEMENT } from '../../../software/bedtools/complement/main
|
||||||
include { BEDTOOLS_GENOMECOV } from '../../../software/bedtools/genomecov/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_GENOMECOV } from '../../../software/bedtools/genomecov/main.nf' addParams( options: [:] )
|
||||||
include { BEDTOOLS_INTERSECT } from '../../../software/bedtools/intersect/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_INTERSECT } from '../../../software/bedtools/intersect/main.nf' addParams( options: [:] )
|
||||||
include { BEDTOOLS_MERGE } from '../../../software/bedtools/merge/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_MERGE } from '../../../software/bedtools/merge/main.nf' addParams( options: [:] )
|
||||||
include { BEDTOOLS_SLOP as BEDTOOLS_SLOP_S} from '../../../software/bedtools/slop/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_SLOP} from '../../../software/bedtools/slop/main.nf' addParams( options: [args: '-l 15 -r 30'] )
|
||||||
include { BEDTOOLS_SLOP as BEDTOOLS_SLOP_AS} from '../../../software/bedtools/slop/main.nf' addParams( options: [:] )
|
|
||||||
include { BEDTOOLS_SORT } from '../../../software/bedtools/sort/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_SORT } from '../../../software/bedtools/sort/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,28 +46,12 @@ workflow test_bedtools_merge {
|
||||||
BEDTOOLS_MERGE(input)
|
BEDTOOLS_MERGE(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO streamline slop module
|
workflow test_bedtools_slop {
|
||||||
|
|
||||||
// To run with header and pct enabled, type --pct true and --header true with nextflow run command.
|
|
||||||
/*
|
|
||||||
Test with l/r method
|
|
||||||
*/
|
|
||||||
workflow test_bedtools_slop_asymmetrical {
|
|
||||||
def input = []
|
def input = []
|
||||||
input = [ [ id:'test', symmetry: false],
|
input = [ [ id:'test'],
|
||||||
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true),
|
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) ] //metamap
|
file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) ] //metamap
|
||||||
BEDTOOLS_SLOP_AS( input )
|
BEDTOOLS_SLOP ( input )
|
||||||
}
|
|
||||||
/*
|
|
||||||
Test with b method
|
|
||||||
*/
|
|
||||||
workflow test_bedtools_slop_symmetrical {
|
|
||||||
def input = []
|
|
||||||
input = [ [ id:'test', symmetry: true],
|
|
||||||
file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/bed/genome.sizes", checkIfExists: true) ] //metamap
|
|
||||||
BEDTOOLS_SLOP_S( input )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_bedtools_sort {
|
workflow test_bedtools_sort {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
md5sum: 13e5a3b254fac35fe0da0c92cbaf1761
|
md5sum: 13e5a3b254fac35fe0da0c92cbaf1761
|
||||||
|
|
||||||
- name: Run bedtools slop test workflow (symmetrical)
|
- name: Run bedtools slop test workflow (symmetrical)
|
||||||
command: nextflow run ./tests/software/bedtools/ -profile docker -entry test_bedtools_slop_symmetrical -c tests/config/nextflow.config
|
command: nextflow run ./tests/software/bedtools/ -profile docker -entry test_bedtools_slop -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- bedtools
|
- bedtools
|
||||||
- bedtools_slop
|
- bedtools_slop
|
||||||
|
@ -54,11 +54,3 @@
|
||||||
- path: output/bedtools/test.slop.bed
|
- path: output/bedtools/test.slop.bed
|
||||||
md5sum: 4279202e33fcce3d19f420f1b27fddee
|
md5sum: 4279202e33fcce3d19f420f1b27fddee
|
||||||
|
|
||||||
- name: Run bedtools slop test workflow (asymmetrical)
|
|
||||||
command: nextflow run ./tests/software/bedtools/ -profile docker -entry test_bedtools_slop_asymmetrical -c tests/config/nextflow.config
|
|
||||||
tags:
|
|
||||||
- bedtools
|
|
||||||
- bedtools_slop
|
|
||||||
files:
|
|
||||||
- path: output/bedtools/test.slop.bed
|
|
||||||
md5sum: 4279202e33fcce3d19f420f1b27fddee
|
|
||||||
|
|
Loading…
Reference in a new issue