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

join(remainder:true,by:[0,1]) operator (nf 24.10.4) returns a string instead of a tuple. #5737

Open
lindenb opened this issue Feb 3, 2025 · 0 comments

Comments

@lindenb
Copy link
Contributor

lindenb commented Feb 3, 2025

Bug report

join(remainder:true,by:[0,1]) operator (nf 24.10.4)

see https://nextflow.slack.com/archives/C02T98A23U7/p1738431084540439

Expected behavior and actual behavior

Steps to reproduce the problem

in the following script

workflow {
	ch1 = Channel.of(["chr1",file("tmp1.bam"),"A"])
	ch2 = Channel.of(["chr1",file("tmp1.bam")])
	ch1.join(ch2,remainder:true,by:[0,1]).view()
}

the output, as expected, is a tuple
[chr1,/path/to/tmp1.bam, A]

but if the ch1 channel is by chance, filtered and then empty:

workflow {
	ch1 = Channel.of(["chr1",file("tmp1.bam"),"A"]).filter{it[0].equals("chrX")}
	ch2 = Channel.of(["chr1",file("tmp1.bam")])	
        ch1.join(ch2,remainder:true,by:[0,1]).view()
}

the output is a string

chr1

while I expected a tuple like:

[chr1,/path/to/tmp1.bam,null]

Environment

  • Nextflow version: 24.10.4
  • Operating system: .Linux
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