From 0ed87085a90b711f8a886cf4932d1cc05a4e741d Mon Sep 17 00:00:00 2001 From: atrigila <18577080+atrigila@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:23:47 +0000 Subject: [PATCH] index concat files --- conf/quilt_subworkflow.config | 13 +++++++++++++ .../vcf_concatenate_bcftools.nf | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/conf/quilt_subworkflow.config b/conf/quilt_subworkflow.config index ef309039..6f237032 100644 --- a/conf/quilt_subworkflow.config +++ b/conf/quilt_subworkflow.config @@ -119,4 +119,17 @@ process { ] } + withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CONCATENATE_BCFTOOLS:BCFTOOLS_INDEX' { + ext.args = {[ + "--tbi", + ].join(" ").trim()} + + publishDir = [ + [ + path: { "${params.outdir}/quilt_impute/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}/concat" }, + mode: params.publish_dir_mode, + ], + ] + } + } diff --git a/subworkflows/local/vcf_concatenate_bcftools/vcf_concatenate_bcftools.nf b/subworkflows/local/vcf_concatenate_bcftools/vcf_concatenate_bcftools.nf index fd02a40b..6653d765 100644 --- a/subworkflows/local/vcf_concatenate_bcftools/vcf_concatenate_bcftools.nf +++ b/subworkflows/local/vcf_concatenate_bcftools/vcf_concatenate_bcftools.nf @@ -1,4 +1,5 @@ include { BCFTOOLS_CONCAT } from '../../../modules/nf-core/bcftools/concat/main' +include { BCFTOOLS_INDEX } from '../../../modules/nf-core/bcftools/index/main' workflow VCF_CONCATENATE_BCFTOOLS { @@ -17,7 +18,13 @@ workflow VCF_CONCATENATE_BCFTOOLS { // Ligate and concatenate chunks BCFTOOLS_CONCAT(ch_vcf_tbi_grouped) + // Index concatenated VCF + BCFTOOLS_INDEX(BCFTOOLS_CONCAT.out.vcf) + + // Join VCFs and TBIs + ch_imputed_vcf_tbi = BCFTOOLS_CONCAT.out.vcf.join(BCFTOOLS_INDEX.out.tbi) + emit: - ch_concat_vcf = BCFTOOLS_CONCAT.out.vcf + ch_imputed_vcf_tbi // channel: [ meta, vcf, tbi ] }