Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning when groupTuple is not complete #4592

Open
adamrtalbot opened this issue Dec 15, 2023 · 0 comments
Open

Add warning when groupTuple is not complete #4592

adamrtalbot opened this issue Dec 15, 2023 · 0 comments

Comments

@adamrtalbot
Copy link
Collaborator

New feature

When using groupTuple, it's a good idea to use a size parameter to make sure the channel proceeds to the next step once you have all the elements. However, if the size is set too large, the channel will never be satisfied and the channel never emits the new element. This is expected behaviour, but it happens silently which can be confusing and not obvious for developers (myself and @maxulysse were stumped for a while by this).

Usage scenario

workflow one {
    Channel.fromList([
        [[id: "1"], [shard: 1]],
        [[id: "1"], [shard: 2]],
        [[id: "1"], [shard: 3]],
    ])
    | groupTuple(size: 4)
    | view
}

Output:

nextflow run .
N E X T F L O W  ~  version 23.10.0
Launching `./main.nf` [reverent_archimedes] DSL2 - revision: 55b759f45d

Suggest implementation

nextflow run .
N E X T F L O W  ~  version 23.10.0
Launching `./main.nf` [reverent_archimedes] DSL2 - revision: 55b759f45d
WARNING: groupTuple never grouped the following elements 
[[id:1], [shard:1]]
[[id:1], [shard:2]]
[[id:1], [shard:3]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants