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

Cover use of multiple input channels #359

Open
vdauwera opened this issue Aug 29, 2024 · 1 comment
Open

Cover use of multiple input channels #359

vdauwera opened this issue Aug 29, 2024 · 1 comment

Comments

@vdauwera
Copy link
Collaborator

Either in Hello World or a generic Part 2 (before Hello GATK)

@adamrtalbot
Copy link
Collaborator

adamrtalbot commented Sep 6, 2024

One idea here is to replace the UPPER process in hello-world with a ${greeting} ${name}:

e.g.

greetings = Channel.of("hello", "bonjour", "hola")
names = Channel.of("Adam", "Geraldine", "Marcel", "Chris")

greetings.combine(names)

(becomes):

[hello, Adam]
[hello, Geraldine]
[bonjour, Adam]
[bonjour, Geraldine]
[hola, Adam]
[hola, Geraldine]
[hello, Marcel]
[bonjour, Marcel]
[hola, Marcel]
[hello, Chris]
[bonjour, Chris]
[hola, Chris]

The flow could be:

  • Introduce name as an idea, with process having two inputs (run: 'hello yourName')
  • Run with 1 greeting + 1 name, using 2 channel inputs ✅
  • Try and run multiple names, only run 1 because of values vs queue
  • Resolve with channels:
    • Change to tuple of val(greeting), val(name)
    • Make a tuple input to process instead of two channels (run: "hello yourName")
    • Use combine to create every combination as above

But this adds considerable time and effort, essentially replacing the existing hello-nextflow module. We could make it a separate module called hello-you between hello-nextflow and hello-gatk.

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