Updated module, need to fix cardinality of tuple

This commit is contained in:
Sruthi Suresh 2020-10-31 00:21:50 -05:00 committed by sruthipsuresh
parent 022b0bfe54
commit 5a997c5ac6
2 changed files with 10 additions and 10 deletions

View file

@ -1,10 +1,10 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
params.options = [upstream: 1,
downstream: 10 ]
def VERSION = '2.29'
def options = initOptions(params.options)
process BEDTOOLS_SLOPREFSEQ {
tag "$meta.id"
@ -21,7 +21,7 @@ process BEDTOOLS_SLOPREFSEQ {
}
input:
path sizes
path sizes
tuple val(meta), path(beds)
output:
@ -33,7 +33,7 @@ process BEDTOOLS_SLOPREFSEQ {
def beds_files = beds.sort()
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
slopBed -i $beds -g $sizes -l ${params.upstream} -r {params.downstream} > ${prefix}.sloprefseq.bed
echo $VERSION > ${software}.version.txt
slopBed -i ln -s ${beds[0]} -g ln -s $sizes -l ${params.upstream} -r {params.downstream} > ${prefix}.sloprefseq.bed
bedtools --version | sed -e "s/Bedtools v//g" > ${software}.version.txt
"""
}

View file

@ -2,18 +2,18 @@
nextflow.preview.dsl = 2
include BEDTOOLS_SLOPREFSEQ from '../sloprefseq/main.nf' addParams( options: [publish_dir:'test_bed_file'])
include { BEDTOOLS_SLOPREFSEQ } from '../../sloprefseq/main.nf' addParams( options: [publish_dir:'test_bed_file'])
// Define input channels
// Run the workflow
workflow test_bed_file{
def input = []
input = [ [ id:'test' ],
input = [ [ id:'test', single_end:true ],
[ file("${baseDir}/input/A.bed", checkIfExists: true),
file("${baseDir}/input/genome.sizes", checkIfExists: true)] ]
file("${baseDir}/input/genome.sizes", checkIfExists: true) ] ]
BEDTOOLS_SLOPREFSEQ ( input )
BEDTOOLS_SLOPREFSEQ ( input, [ publish_dir:'test_bed_file' ] )
}