Concatenate several VCF files using bcftools concat. Especially works well with the scatter subworkflows in nf-core. An additional option can be given to sort the concatenated VCF.


Name (Type)

meta (map)

Groovy Map containing at least two fields: ‘id’ and a common field for each VCF that needs to be merged
e.g. [ id:‘test.001’, common_meta:‘test’ ]

ch_vcfs (file(s))

VCF files and their indices that should be concatenated
Structure: [ meta, vcf, tbi ]

ch_scatter_output (file and integer)

The output created from a scatter subworkflow (contains a BED file and scatter_count).
The BED file isn’t actually used in the pipeline so can remain empty if you manually set this input channel
Structure: [ meta, bed, scatter_count ]

common_meta (string)

The string of the common meta to use as the new ‘id’.
Please make sure all VCFs that need to be concatenated have the same value in the
the meta field specified. (and that only the ID is different between these files)

sort (boolean)

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


Name (Type)

meta (map)

Groovy Map containing sample information
e.g. [ id:‘test’ ]

vcf (file)

The concatenated (and possible sorted) VCF file
Structure: [ meta, vcf ]


tbi (file)

The indices of the output VCFs
Structure: [ meta, tbi ]


versions (file)

File containing software versions