How to get the list in a channel from input file (yaml) as an argument? #4288
-
Hi, I need to run this through an argument Reason being I'm submitting the jobs to aws batch from
Workflow works well in the following code by getting the list from the channel
...
Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Here is how you can load the yaml file into a channel: import groovy.yaml.YamlSlurper
params.inputs_list = "inputs.yaml"
workflow {
inputs = new YamlSlurper().parse(params.inputs_list as File)
Channel.fromList(inputs['samples'])
| view
} |
Beta Was this translation helpful? Give feedback.
Oh I think I know... my original code assumed a local file, but if it's an S3 object then you should replace:
with
file(params.inputs_list)
Actually the second one should work in both cases.