mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 18:58:16 +00:00
fix outputs
This commit is contained in:
parent
dee8ec9e91
commit
e0a8af8693
2 changed files with 10 additions and 12 deletions
|
@ -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 ]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue