Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Channel join behaving in surprising (incorrect?) ways #1971

Closed
antoniofabio opened this issue Mar 16, 2021 · 0 comments
Closed

Channel join behaving in surprising (incorrect?) ways #1971

antoniofabio opened this issue Mar 16, 2021 · 0 comments

Comments

@antoniofabio
Copy link

join seems to drop duplicate keys, and gives inconsistent results when used with remainder: true.
There's a similar (stale) issue which I don't think got to the core of the problem, which is not about outer vs inner join.

Given this code:

left = Channel.from(
  ['k1', 'l1'],
  ['k1', 'l2'],
  ['k2', 'l3']
  )
right = Channel.from(
  ['k1', 'r1'],
  ['k2', 'r2']
  )

left.join(right).view()

I get this output:

[k1, l1, r1]
[k2, l3, r2]

while I would have expected this:

[k1, l1, r1]
[k1, l2, r1]
[k2, l3, r2]

The result of using 'remainder: true' is even more puzzling. This code:

left = Channel.from(['k1', 'l1'], ['k1', 'l2'], ['k2', 'l3'], ['k3', 'l4'])
right = Channel.from(['k1', 'r1'], ['k2', 'r2'])

left.join(right, remainder: true).view()

results into this:

[k1, l1, r1]
[k2, l3, r2]
[k1, l2, null]
[k3, l4, null]

The same behavior is shown by the 'cross' operator.

@nextflow-io nextflow-io locked and limited conversation to collaborators Mar 17, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants