2020-11-11 22:45:44 +00:00
|
|
|
#!/usr/bin/env nextflow
|
2020-11-12 00:57:51 +00:00
|
|
|
nextflow.enable.dsl = 2
|
2020-11-11 22:45:44 +00:00
|
|
|
|
2020-11-12 00:57:51 +00:00
|
|
|
include { BEDTOOLS_SLOP as BEDTOOLS_SLOP_S } from '../main.nf' addParams( options: [ publish_dir:'test_asymmetrical' ] )
|
|
|
|
include { BEDTOOLS_SLOP as BEDTOOLS_SLOP_AS } from '../main.nf' addParams( options: [ publish_dir:'test_symmetrical' ] )
|
|
|
|
|
|
|
|
// To run with header and pct enabled, type --pct true and --header true with nextflow run command.
|
2020-11-11 22:45:44 +00:00
|
|
|
|
|
|
|
// Run the workflow
|
2020-11-12 00:57:51 +00:00
|
|
|
/*
|
|
|
|
Test with l/r method
|
|
|
|
*/
|
|
|
|
workflow test_asymmetrical {
|
2020-11-11 22:45:44 +00:00
|
|
|
def input = []
|
2020-11-12 00:57:51 +00:00
|
|
|
input = [ [ id:'test', symmetry: false ],
|
2020-11-11 22:45:44 +00:00
|
|
|
[ file("${baseDir}/input/A.bed", checkIfExists: true),] ]
|
|
|
|
|
2020-11-12 00:57:51 +00:00
|
|
|
BEDTOOLS_SLOP_AS(
|
2020-11-11 22:45:44 +00:00
|
|
|
input,
|
|
|
|
file("${baseDir}/input/genome.sizes", checkIfExists: true)
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
2020-11-12 00:57:51 +00:00
|
|
|
/*
|
|
|
|
Test with b method
|
|
|
|
*/
|
|
|
|
workflow test_symmetrical {
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', symmetry: true],
|
|
|
|
[ file("${baseDir}/input/A.bed", checkIfExists: true),] ]
|
|
|
|
|
|
|
|
BEDTOOLS_SLOP_S(
|
|
|
|
input,
|
|
|
|
file("${baseDir}/input/genome.sizes", checkIfExists: true)
|
|
|
|
)
|
2020-11-11 22:45:44 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-11-12 00:57:51 +00:00
|
|
|
workflow {
|
|
|
|
test_asymmetrical()
|
|
|
|
test_symmetrical()
|
|
|
|
}
|
2020-11-11 22:45:44 +00:00
|
|
|
|
2020-11-12 00:57:51 +00:00
|
|
|
// output has - b 10 and -l 1 -r 10 as test values. pct and header are both false.
|