Reputation: 309
I want to run an analysis multiple times with different variables on the same input from a previous processes on Nextflow:
process a {
output:
file id, "{id}.out" into a
}
metadata = Channel.fromPath("metadata.tsv")
vars_to_analyze = Channel.from(["var_a", "var_b"])
process b {
input:
tuple id, file from a
file m from metadata
val var from vars_to_analyze
output:
tuple id, path("${id}-${var}.out") into b
"""
command --var ${var} --metadata ${m} ${file} > ${id}-${var}.out
"""
}
Which is the correct way to re-use metadata and file with different values?
Upvotes: 1
Views: 1557
Reputation: 3381
Don't use a channel for the metadata file, just declare as
metadata = file("metadata.tsv")
Upvotes: 2