From e0a8af869324765ec0c6a375703bfa68f5ba4e77 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:42:14 +0200 Subject: [PATCH] fix outputs --- subworkflows/nf-core/bam_qc_picard/main.nf | 14 ++++++++------ subworkflows/nf-core/bam_qc_picard/meta.yml | 8 ++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 747d5995..13f4a845 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -8,7 +8,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecth workflow BAM_QC_PICARD { take: - ch_bam_bai // channel: [ val(meta), [ bam ], [bai/csi] ] + ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] @@ -16,7 +16,7 @@ workflow BAM_QC_PICARD { main: ch_versions = Channel.empty() - PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { @@ -25,16 +25,18 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { - PICARD_COLLECTWGSMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) } + ch_coverage_metrics = Channel.empty() + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first(), PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) + emit: - hs_metrics = PICARD_COLLECTHSMETRICS.out.hs_metrics // channel: [ val(meta), [ hs_metrics ] ] - wgs_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ wgs_metrics ] ] + coverage_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ coverage_metrics ] ] multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] versions = ch_versions // channel: [ versions.yml ] diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index c4422150..67d3496e 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -44,14 +44,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - hs_metrics: + - coverage_metrics: type: file - description: Alignment metrics files generated by picard CollectHsMetrics + description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics pattern: "*_metrics.txt" - - wgs_metrics: - type: file - description: Alignment metrics files generated by picard CollectWgsMetrics - pattern: "*_{metrics}" - multiple_metrics: type: file description: Alignment metrics files generated by picard CollectMultipleMetrics