fix: EPICORE runs only once when --fasta is used#446
Merged
Conversation
ch_fasta is a queue channel with one item when --fasta is set. Paired positionally with SUMMARIZE_RESULTS.out.epicore_input (N items), EPICORE runs only once instead of per sample. Convert ch_fasta to a value channel with .first() so it broadcasts. Symptom: with --epicore, only one results/<sample>.tsv file is produced regardless of sample count.
Member
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
Contributor
Author
|
Just confirmed the fix works as intended. |
jonasscheid
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
When running the pipeline with
--epicoreand--fasta <file>, only oneresults/<sample>.tsvfile is produced, regardless of how many samples were processed. For an N-sample run, only the first sample to reachSUMMARIZE_RESULTSgets an EPICORE output; the rest are silently dropped. No error is raised.Confirmed on a user run: 14
SUMMARIZE_RESULTStasks completed, but only 1EPICOREtask was ever submitted.Root cause
In
subworkflows/local/utils_nfcore_mhcquant_pipeline/main.nf(~line 139), when--fastais set,ch_fastais built withchannel.fromPath(params.fasta, ...)— a queue channel carrying a single item, not a value channel.In
workflows/mhcquant.nf:207, that one-item queue channel is paired withSUMMARIZE_RESULTS.out.epicore_input(an N-item queue channel, one item per sample/condition group). Nextflow pairs queue-to-queue positionally: the fasta channel drains after the first iteration and the remaining N-1epicore_inputitems never trigger anEPICOREtask.Because
conf/modules.configsetsSUMMARIZE_RESULTS.publishDir.enabled = !params.epicore, EPICORE's TSV is what the user sees inresults/when--epicoreis on — so the missing runs translate directly into missing output files.Introduced in the
fix/summarize-result-quantmerge (#444, commitb046949), which first wiredEPICOREin with this call signature.Fix
One character —
.first()converts the single-item queue channel into a value channel, which broadcasts to every matching item in the other channel:Behavior
--fasta --epicore: now produces oneresults/<sample>.tsvper sample (previously one total).--fasta): unchanged — this code path constructsch_fastadifferently and is not affected by this fix.Files changed
workflows/mhcquant.nf— one-character fix on line 207CHANGELOG.md—### Fixedentry under3.2.0dev