perf: speed up binning by not waiting for all mapping jobs - #1061
Merged
Conversation
dialvarezs
requested review from
d4straub,
jfy133,
muabnezor and
prototaxites
as code owners
June 27, 2026 04:47
Joon-Klaps
approved these changes
Jun 27, 2026
11 tasks
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.
This is performance/QoL improvement.
Right now, binners have to wait for every
BOWTIE2_ASSEMBLY_ALIGN / MINIMAP2_ASSEMBLY_ALIGNto finish, becausegroupTuple(by:0)doesn't know how many elements will be in the tuple.In practice this means a couple of straggler alignment jobs stall the entire shortread (or longread) binning path, even for assemblies whose mappings already completed. This inflates runtimes and makes resource usage suboptimal.
Fix: the mappings per assembly are predictable from
binning_map_mode(own -> 1, group -> samples in group, all -> total samples). We compute that count and wrap the key withgroupKey(key, count), so each group is released as soon as it's complete.PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).