diff --git a/modules/biobambam/bamsormadup/main.nf b/modules/biobambam/bamsormadup/main.nf index cc0de395..18406ede 100644 --- a/modules/biobambam/bamsormadup/main.nf +++ b/modules/biobambam/bamsormadup/main.nf @@ -22,8 +22,7 @@ process BIOBAMBAM_BAMSORMADUP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def suffix = args.contains("outputformat=cram") ? "cram" : "bam" - def input_string = bams.join(" I=") - + def input_string = bams instanceof List ? bams.join(" I=") : bams if (args.contains("outputformat=cram") && reference == null) error "Reference required for CRAM output." """ diff --git a/tests/modules/biobambam/bamsormadup/main.nf b/tests/modules/biobambam/bamsormadup/main.nf index 741a4433..9bcb1cf3 100644 --- a/tests/modules/biobambam/bamsormadup/main.nf +++ b/tests/modules/biobambam/bamsormadup/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { BIOBAMBAM_BAMSORMADUP } from '../../../../modules/biobambam/bamsormadup/main.nf' -workflow test_biobambam_bamsormadup { +workflow test_biobambam_bamsormadup_multi_input { input = [ [ id:'test', single_end:false ], // meta map @@ -13,3 +13,13 @@ workflow test_biobambam_bamsormadup { BIOBAMBAM_BAMSORMADUP ( input, [] ) } + +workflow test_biobambam_bamsormadup_single_input { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)], + ] + + BIOBAMBAM_BAMSORMADUP ( input, [] ) +} diff --git a/tests/modules/biobambam/bamsormadup/test.yml b/tests/modules/biobambam/bamsormadup/test.yml index 7b9d3a49..d197038e 100644 --- a/tests/modules/biobambam/bamsormadup/test.yml +++ b/tests/modules/biobambam/bamsormadup/test.yml @@ -1,5 +1,5 @@ -- name: biobambam bamsormadup test_biobambam_bamsormadup - command: nextflow run ./tests/modules/biobambam/bamsormadup -entry test_biobambam_bamsormadup -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bamsormadup/nextflow.config +- name: biobambam bamsormadup test_biobambam_bamsormadup_multi_input + command: nextflow run ./tests/modules/biobambam/bamsormadup -entry test_biobambam_bamsormadup_multi_input -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bamsormadup/nextflow.config tags: - biobambam - biobambam/bamsormadup @@ -8,3 +8,14 @@ md5sum: 1d549a00b065584c298594180ca9f3bc - path: output/biobambam/test.metrics.txt md5sum: 1721879bea1f3888ecd33b35e6ee0e72 + +- name: biobambam bamsormadup test_biobambam_bamsormadup_single_input + command: nextflow run ./tests/modules/biobambam/bamsormadup -entry test_biobambam_bamsormadup_single_input -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bamsormadup/nextflow.config + tags: + - biobambam + - biobambam/bamsormadup + files: + - path: output/biobambam/test.bam + md5sum: 48e01431daec7fb17471d930a6d1d587 + - path: output/biobambam/test.metrics.txt + md5sum: b97458eff0d4b259055e4902849ee53b