This commit is contained in:
Matthias De Smet 2022-04-19 15:11:37 +02:00
parent 6723ca7f90
commit b35264e919
3 changed files with 4 additions and 6 deletions

View file

@ -20,7 +20,6 @@ process BAMTOOLS_SPLIT {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def input_list = bam.collect{"-in $it"}.join(' ') def input_list = bam.collect{"-in $it"}.join(' ')
if (bam_list) { if (bam_list) {
@ -30,9 +29,8 @@ process BAMTOOLS_SPLIT {
""" """
bamtools merge \\ bamtools merge \\
${input_list} \\ ${input_list} \\
$args \\ | bamtools split \\
bamtools split \\ $args
$args2
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -28,7 +28,7 @@ input:
- bam_list: - bam_list:
type: file type: file
description: | description: |
Input file containing bam files to merge before splitting, Optional input file containing bam files to merge before splitting,
one line per file one line per file
output: output:

View file

@ -10,5 +10,5 @@ workflow test_bamtools_split {
[ id:'test', single_end:false ], // meta map [ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ]
BAMTOOLS_SPLIT ( input ) BAMTOOLS_SPLIT ( input, [] )
} }