Description

Concatenate several VCF files using bcftools concat. An additional option can be given to sort the concatenated VCF.

Input

name
description
pattern

ch_vcfs

VCF files and their indices that should be concatenated, as well as the
expected number of VCFs per group. The meta map must contain at least a
common field for each VCF that needs to be merged,
e.g. [ id:‘test.001’, common_meta:‘test’ ]

Structure: [ val(meta), path(vcf), path(tbi), val(count) ]

arr_common_meta

OPTIONAL:
A string array of the common meta keys to use to group the vcfs.
Please make sure all VCFs that need to be concatenated have the same value in the
the meta fields specified - the subworkflow will error if a required key is missing from a meta map.

val_sort

Whether or not to sort the output VCF,
this can be useful if this subworkflow isn’t used in a scatter/gather workflow

Output

name
description
pattern

vcf

The concatenated (and possibly sorted) VCF file
Structure: [ val(meta), path(vcf) ]

*.vcf.gz

index

The indices of the output VCFs
Structure: [ val(meta), path(index) ]

*.vcf.gz.{tbi,csi}

vcf_index

Aggregated channel with the vcf and indices
Structure: [ val(meta), path(vcf), path(index) ]