diff --git a/modules/bcftools/concat/main.nf b/modules/bcftools/concat/main.nf index c0633ef7..257ee36f 100644 --- a/modules/bcftools/concat/main.nf +++ b/modules/bcftools/concat/main.nf @@ -8,7 +8,7 @@ process BCFTOOLS_CONCAT { 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: - tuple val(meta), path(vcfs) + tuple val(meta), path(vcfs), path(tbi) output: tuple val(meta), path("*.gz"), emit: vcf diff --git a/modules/bcftools/concat/meta.yml b/modules/bcftools/concat/meta.yml index 3984276f..167dbe5a 100644 --- a/modules/bcftools/concat/meta.yml +++ b/modules/bcftools/concat/meta.yml @@ -25,6 +25,11 @@ input: description: | List containing 2 or more vcf files e.g. [ 'file1.vcf', 'file2.vcf' ] + - tbi: + type: files + description: | + List containing 2 or more index files (optional) + e.g. [ 'file1.tbi', 'file2.tbi' ] output: - meta: type: map diff --git a/tests/modules/bcftools/concat/main.nf b/tests/modules/bcftools/concat/main.nf index 8441d488..777dc5b8 100644 --- a/tests/modules/bcftools/concat/main.nf +++ b/tests/modules/bcftools/concat/main.nf @@ -4,13 +4,25 @@ nextflow.enable.dsl = 2 include { BCFTOOLS_CONCAT } from '../../../../modules/bcftools/concat/main.nf' -workflow test_bcftools_concat { +workflow test_bcftools_concat_tbi { input = [ [ id:'test3' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) ], + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) ] + ] + + BCFTOOLS_CONCAT ( input ) +} + +workflow test_bcftools_concat_no_tbi { + + input = [ [ id:'test3' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) ], + [] ] - BCFTOOLS_CONCAT ( input ) } diff --git a/tests/modules/bcftools/concat/test.yml b/tests/modules/bcftools/concat/test.yml index 7d04ebc6..0d12badc 100644 --- a/tests/modules/bcftools/concat/test.yml +++ b/tests/modules/bcftools/concat/test.yml @@ -1,8 +1,17 @@ -- name: bcftools concat test_bcftools_concat - command: nextflow run ./tests/modules/bcftools/concat -entry test_bcftools_concat -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/concat/nextflow.config +- name: bcftools concat test_bcftools_concat_tbi + command: nextflow run ./tests/modules/bcftools/concat -entry test_bcftools_concat_tbi -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/concat/nextflow.config tags: - - bcftools/concat - bcftools + - bcftools/concat + files: + - path: output/bcftools/test3.vcf.gz + md5sum: 35c88bfaad20101062e98beb217d7137 + +- name: bcftools concat test_bcftools_concat_no_tbi + command: nextflow run ./tests/modules/bcftools/concat -entry test_bcftools_concat_no_tbi -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/concat/nextflow.config + tags: + - bcftools + - bcftools/concat files: - path: output/bcftools/test3.vcf.gz md5sum: 35c88bfaad20101062e98beb217d7137