From 6723ca7f9068ecbdee31dcad07f3115dc5b40667 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:05:02 +0200 Subject: [PATCH 01/16] bump version, add merge before split --- modules/bamtools/split/main.nf | 22 +++++++++++++++------- modules/bamtools/split/meta.yml | 8 +++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 014e5cdb..f6382d97 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -2,13 +2,14 @@ process BAMTOOLS_SPLIT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : - 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' : + 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }" input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -19,12 +20,19 @@ 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) { + input += " -list $bam_list" + } + """ - bamtools \\ - split \\ - -in $bam \\ - $args + bamtools merge \\ + ${input_list} \\ + $args \\ + bamtools split \\ + $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0e848212..6c534281 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,8 +23,13 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A BAM file to split + description: A list of BAM files to merge and then split pattern: "*.bam" + - bam_list: + type: file + description: | + Input file containing bam files to merge before splitting, + one line per file output: - meta: @@ -43,3 +48,4 @@ output: authors: - "@sguizard" + - "@matthdsm" From b35264e9196d8f7c74c28a7bd5bc126a5e16afe8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:11:37 +0200 Subject: [PATCH 02/16] bugfixes --- modules/bamtools/split/main.nf | 6 ++---- modules/bamtools/split/meta.yml | 2 +- tests/modules/bamtools/split/main.nf | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) 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, [] ) } From 07982d6cb13649c308625bb3d215c39979e1207c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:31:39 +0200 Subject: [PATCH 03/16] fix command line, fix meta.yml --- modules/bamtools/split/main.nf | 5 ++++- tests/modules/bamtools/split/test.yml | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 2f5ef09f..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -23,7 +23,10 @@ process BAMTOOLS_SPLIT { def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { - input += " -list $bam_list" + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } """ diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 4f52e9ce..b52cc9ee 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,10 +1,11 @@ - name: bamtools split test_bamtools_split - command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config tags: - - bamtools/split - bamtools + - bamtools/split files: - - path: output/bamtools/test.paired_end.sorted.REF_chr22.bam + - path: output/bamtools/test.REF_chr22.bam md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07 - - path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam + - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb + - path: output/bamtools/versions.yml From 413980e93a9cb8ba51f430d8a794cb25c43e9305 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:33:16 +0200 Subject: [PATCH 04/16] make use of dependent on input array size --- modules/bamtools/split/main.nf | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7d69a824 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -21,18 +20,22 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" + def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" + + if (size(bam) > 1){ + def bamtools_merge_cmd = "bamtools merge ${input_list} |" + } else { + def split_input = input_list } + """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ + ${bamtools_merge_cmd} \\ + bamtools split \\ + $split_input \\ + $stub_cmd \\ $args cat <<-END_VERSIONS > versions.yml From d617a50371abf87bdb376844926088c478ae3f51 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:39:25 +0200 Subject: [PATCH 05/16] add extra test --- tests/modules/bamtools/split/main.nf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9f30c4f9..2fc16d67 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -4,11 +4,21 @@ nextflow.enable.dsl = 2 include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' -workflow test_bamtools_split { +workflow test_bamtools_split_single_input { input = [ [ 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 ) +} + +workflow test_bamtools_split_multiple_input { + + input = [ + [ 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']['test2_paired_end_sorted_bam'], checkIfExists: true)] + [ + + BAMTOOLS_SPLIT ( input ) } From d293cffc6a3beb7f1ef9bab6e95ea421f622b2a5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:42:43 +0200 Subject: [PATCH 06/16] update tests --- tests/modules/bamtools/split/main.nf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 2fc16d67..ef4b9d59 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -2,15 +2,17 @@ nextflow.enable.dsl = 2 -include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf' workflow test_bamtools_split_single_input { input = [ [ 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_SINGLE ( input ) } workflow test_bamtools_split_multiple_input { @@ -20,5 +22,5 @@ workflow test_bamtools_split_multiple_input { [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] [ - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_MULTIPLE ( input ) } From 7e883da90460f77b3745468452b4c549327dde13 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:50:50 +0200 Subject: [PATCH 07/16] Revert "make use of dependent on input array size" This reverts commit 413980e93a9cb8ba51f430d8a794cb25c43e9305. --- modules/bamtools/split/main.nf | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7d69a824..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,6 +9,7 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -20,22 +21,18 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = bam.collect{"-in $it"}.join(' ') - def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" - - if (size(bam) > 1){ - def bamtools_merge_cmd = "bamtools merge ${input_list} |" - } else { - def split_input = input_list + if (bam_list) { + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } - """ - ${bamtools_merge_cmd} \\ - bamtools split \\ - $split_input \\ - $stub_cmd \\ + bamtools merge \\ + ${input_list} \\ + | bamtools split \\ $args cat <<-END_VERSIONS > versions.yml From b4af3f1475b91d0c411e901d6126515babcdafec Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:02:41 +0200 Subject: [PATCH 08/16] test fixes --- modules/bamtools/split/main.nf | 9 ++------- tests/modules/bamtools/split/main.nf | 9 ++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7184261e 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -22,17 +21,13 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" - } + def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ bamtools merge \\ ${input_list} \\ | bamtools split \\ + $stub \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ef4b9d59..ff0cb748 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -15,12 +15,15 @@ workflow test_bamtools_split_single_input { BAMTOOLS_SPLIT_SINGLE ( input ) } -workflow test_bamtools_split_multiple_input { +workflow test_bamtools_split_multiple { input = [ [ 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']['test2_paired_end_sorted_bam'], checkIfExists: true)] - [ + [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_MULTIPLE ( input ) } + From 3bcae8e71e705f289ec3786e7b6255eb5e0d56af Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:19:52 +0200 Subject: [PATCH 09/16] fix testing errors --- tests/modules/bamtools/split/main.nf | 2 +- tests/modules/bamtools/split/test.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ff0cb748..9787b4ed 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -20,7 +20,7 @@ workflow test_bamtools_split_multiple { input = [ [ 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)] + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] ] diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index b52cc9ee..63ecac57 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ -- name: bamtools split test_bamtools_split - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config +- name: bamtools split test_bamtools_split_single_input + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config tags: - bamtools - bamtools/split @@ -9,3 +9,15 @@ - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb - path: output/bamtools/versions.yml + +- name: bamtools split test_bamtools_split_multiple + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/split + files: + - path: output/bamtools/test.REF_chr22.bam + md5sum: 585675bea34c48ebe9db06a561d4b4fa + - path: output/bamtools/test.REF_unmapped.bam + md5sum: 16ad644c87b9471f3026bc87c98b4963 + - path: output/bamtools/versions.yml From 2a2ac290c37fbbd6caa41b06993818491131e0f2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:00 +0200 Subject: [PATCH 10/16] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0fd5d5ca..badc6974 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,7 +23,7 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A list of BAM files to merge and then split + description: A list of one or more BAM files to merge and then split pattern: "*.bam" - bam_list: type: file From 7bcede747411d77f85dde0c33e3599e81c0cdb14 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:14 +0200 Subject: [PATCH 11/16] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index badc6974..8af701f0 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -25,11 +25,6 @@ input: type: file description: A list of one or more BAM files to merge and then split pattern: "*.bam" - - bam_list: - type: file - description: | - Optional input file containing bam files to merge before splitting, - one line per file output: - meta: From b73662c8d9b5a770904ae9f3b1a79c878f125c6c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:32 +0200 Subject: [PATCH 12/16] Update tests/modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/main.nf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9787b4ed..e5c15c32 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -19,9 +19,10 @@ workflow test_bamtools_split_multiple { input = [ [ 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']['test2_paired_end_sorted_bam'], checkIfExists: true)] - + [ + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] ] BAMTOOLS_SPLIT_MULTIPLE ( input ) From 6efb022f6943ff67421b46359b38582a36278fe5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:44 +0200 Subject: [PATCH 13/16] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 63ecac57..5747aa25 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -11,7 +11,7 @@ - path: output/bamtools/versions.yml - name: bamtools split test_bamtools_split_multiple - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From e9c44f3d85b731add02680fa6a246c0675e1aac7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:35:34 +0200 Subject: [PATCH 14/16] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 5747aa25..af639b43 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ - name: bamtools split test_bamtools_split_single_input - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From 2d32267fcdce945375294cb776ca129038d2b903 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:01 +0200 Subject: [PATCH 15/16] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7184261e..9c643b84 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -24,11 +24,13 @@ process BAMTOOLS_SPLIT { def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ - $stub \\ - $args + bamtools \\ + merge \\ + $input_list \\ + | bamtools \\ + split \\ + -stub $prefix \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": From da56a2d50968f12ff2aa1a6d6b05fae083ba26c3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:08 +0200 Subject: [PATCH 16/16] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 9c643b84..aaa5b663 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -21,8 +21,6 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" - """ bamtools \\ merge \\