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

DSL-2 Named output channels #1181

Closed
zanieb opened this issue Jun 11, 2019 · 2 comments
Closed

DSL-2 Named output channels #1181

zanieb opened this issue Jun 11, 2019 · 2 comments

Comments

@zanieb
Copy link

zanieb commented Jun 11, 2019

Named output channels in DSL-2

Hi! I'd like if, instead of accessing output channels from import processes in DSL2 as a list, the output channels could be accessed by a map.

Usage scenario

You have a process with multiple output channels e.g.

    output:
    set val(sample_name), file('*_trimmed.fastq')
    set val('trimmed'), file('*_trimmed.fastq')
    file '*.log'

Accessing these as process_x[0], [1], [2].. is not clear what is being accessed.

Alternatively

    output:
    set val(sample_name), file('*_trimmed.fastq') as named_fastq
    set val('trimmed'), file('*_trimmed.fastq') as flagged_fastq
    file '*.log' as logs

Accessing these as process_x['named_fastq'], process_x['logs']

Suggest implementation

  • Store all outputs in a list as before
  • Also store all named outputs in a map
  • Add a keyword to define the name of an output (perhaps reuse into or use as)
@pditommaso
Copy link
Member

pditommaso commented Jun 12, 2019

Yes, I was brainstorming on something similar. Like the idea of using as to associate a name to the output.

@pditommaso
Copy link
Member

Closed in favour of #1290.

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