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 · 2 comments
Open

Cover use of multiple input channels #359

vdauwera opened this issue Aug 29, 2024 · 2 comments

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.

@vdauwera
Copy link
Collaborator Author

I think I'd rather illustrate this functionality in the context of one or more scientific use cases. I often find myself a little baffled by this type of example because it's so far removed from 'real work' that I have a hard time envisioning how it would apply in a real analysis context.

Generally speaking I'm not keen on putting "here's a thing you can do" exercises into the 'critical path' of the newcomer learning experience unless we can make it obvious why it's a useful/important thing to learn early on.

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