Description

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.

Input

name
description
pattern

meta

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

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

ch_scatter_output

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

OPTIONAL:
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

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

meta

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

vcf

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

*.vcf.gz

tbi

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

*.vcf.gz.tbi

versions

File containing software versions

versions.yml