diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f6382d97..2f5ef09f 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -20,7 +20,6 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' - def args2 = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { @@ -30,9 +29,8 @@ process BAMTOOLS_SPLIT { """ bamtools merge \\ ${input_list} \\ - $args \\ - bamtools split \\ - $args2 + | bamtools split \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 6c534281..0fd5d5ca 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -28,7 +28,7 @@ input: - bam_list: type: file description: | - Input file containing bam files to merge before splitting, + Optional input file containing bam files to merge before splitting, one line per file output: diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index eb0bed01..9f30c4f9 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -10,5 +10,5 @@ workflow test_bamtools_split { [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT ( input, [] ) }