Standardized channel output for different files
Open
Nobody has claimed this yet.
wishlist
- Dominant language
- Nextflow
- Stars
- 429
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 153
Description
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.
- BAMTOOLS_CONVERT:
output:
tuple val(meta), path("*.{bed,fasta,fastq,json,pileup,sam,yaml}"), emit: data
- BCFTOOLS_VIEW:
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
- SAMTOOLS_VIEW:
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
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:
- group every similar file in one channel:
tuple val(meta), path("*.{tbi,csi}") , emit: index, optional: true - spread them with one file type per channel and put them all optional (same as samtools)
Additional context
This decision has huge consequence on the management of the output channel and their aggregation afterwards.
- group everything:
BCFTOOLS_VIEW.out.vcf.join(BCFTOOLS_VIEW.out.index)
- spread by file type:
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the output declarations shown for BAMTOOLS_CONVERT, BCFTOOLS_VIEW, and SAMTOOLS_VIEW, then review how their channels are joined or mixed in downstream aggregation. The issue is done only after one output-channel guideline is decided and consistently applied across the affected modules.
Written by the indexing model from the issue text.
Assessment
- Domain
- bioinformatics, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100