Combine output after code review

This commit is contained in:
Rike 2022-05-09 16:04:58 +02:00
parent 24d5e7feed
commit 1de1c2253e
2 changed files with 6 additions and 11 deletions

View file

@ -13,16 +13,15 @@ process SAMTOOLS_CONVERT {
path fai path fai
output: output:
tuple val(meta), path("*.cram"), path("*.crai") , emit: cram_crai, optional: true tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: aligned_index
tuple val(meta), path("*.bam"), path("*.bai") , emit: bam_bai, optional:true path "versions.yml" , emit: versions
path "versions.yml" , emit: versions
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"
def file_type = input.getExtension() == "bam" ? "cram" : "bam" def file_type = input.getExtension() == "bam" ? "cram" : "bam"
""" """

View file

@ -39,14 +39,10 @@ output:
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- cram_crai: - aligned_index:
type: file type: file
description: filtered/converted CRAM file + index description: filtered/converted BAM/CRAM file + index
pattern: "*{.cram,.crai}" pattern: "*{.bam/cram,.bai/crai}"
- bam_bai:
type: file
description: filtered/converted BAM file + index
pattern: "*{.bam,.bai}"
- version: - version:
type: file type: file
description: File containing software version description: File containing software version