Skip to content
Discussion options

You must be logged in to vote

Isn't the following what you want?

params.ref = 'ref_file'
params.input = 'input.txt'

process FOO {
  debug true

  input:
  tuple val(name), val(value)
  path ref
  path input

  output:
  stdout

  script:
  """
  echo $name $value with $ref and $input
  """
}

workflow {
  Channel
    .fromPath('file.csv')
    .splitCsv(header: true)
    .set { csv_ch }

  FOO(csv_ch, file(params.ref), file(params.input))
}

If you have multiple files, you can always use globbing to get all of them and map+groupTuple to group them by index and do what I did above.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@LindoNkambule
Comment options

@mribeirodantas
Comment options

Answer selected by LindoNkambule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants