One of the more annoying things is when you add a ...
# nf-test
a
One of the more annoying things is when you add a new input channel or value to a workflow/subworkflow/process and you have to renumber all your inputs (the
input[0]
etc). Can inputs just be declared as an array? Should I have been doing this all along anyway?
n
You could just reassign the inputs variable to an array 😛
a
Yeah, so:
Copy code
input = [
    Channel.of(...),
    Channel.of(...),
    Channel.value(...)
]
vs
Copy code
input[0] = Channel.of(...)
input[1] = Channel.of(...)
input[2] = Channel.value(...)
?
n
Yes that should work
👍 1
a
I assume I just copied the other style from nf-core at some point, but was never sure if it was that way for a reason
n
It's explained like that in the nf-test docs so that's probably why