Open LouisLeNezet opened 1 month ago
If we take as example the bamtools, samtools and bcftools the output channel are inconsistent.
output: tuple val(meta), path("*.{bed,fasta,fastq,json,pileup,sam,yaml}"), emit: data
output: tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf tuple val(meta), path("*.tbi") , emit: tbi, optional: true tuple val(meta), path("*.csi") , emit: csi, optional: true
output: tuple val(meta), path("${prefix}.bam"), emit: bam, optional: true tuple val(meta), path("${prefix}.cram"), emit: cram, optional: true tuple val(meta), path("${prefix}.sam"), emit: sam, optional: true tuple val(meta), path("${prefix}.${file_type}.bai"), emit: bai, optional: true tuple val(meta), path("${prefix}.${file_type}.csi"), emit: csi, optional: true tuple val(meta), path("${prefix}.${file_type}.crai"), emit: crai, optional: true tuple val(meta), path("${prefix}.unselected.${file_type}"), emit: unselected, optional: true tuple val(meta), path("${prefix}.unselected.${file_type}.{bai,csi,crsi}"), emit: unselected_index, optional: true
We should stick to one guidelines across all modules. There is two solutions each one with it's inconvenient:
tuple val(meta), path("*.{tbi,csi}") , emit: index, optional: true
This decision has huge consequence on the management of the output channel and their aggregation afterwards.
BCFTOOLS_VIEW.out.vcf.join(BCFTOOLS_VIEW.out.index)
ch_vcf = BCFTOOLS_VIEW.out.vcf.mix(BCFTOOLS_VIEW.out.bcf, BCFTOOLS_VIEW.ou.vcfgz) ch_index = BCFTOOLS_VIEW.out.csi.mix(BCFTOOLS_VIEW.out.tbi) ch_vcf_index = ch_vcf.join(ch_index)
I like this as it will make implementation a lot simpler :partying_face:
Is your feature request related to a problem? Please describe
If we take as example the bamtools, samtools and bcftools the output channel are inconsistent.
Describe the solution you'd like
We should stick to one guidelines across all modules. There is two solutions each one with it's inconvenient:
tuple val(meta), path("*.{tbi,csi}") , emit: index, optional: true
Additional context
This decision has huge consequence on the management of the output channel and their aggregation afterwards.