Closed mahesh-panchal closed 5 months ago
I just managed to explain this with a pipes and marbles extraction that seemed to work nicely.
There is a distinction between the channel itself ( think of a pipe ), and what goes through it ( e.g. marbles - path objects/ files for instance )
The workflow
block shows how to connect the "pipes", while the process
input:
/output:
block tells you the type of "marble" it's expecting (e.g. blue marble = val
type ). Each line in the input:
corresponds to the order of the "pipes" in the workflow
(include code with line numbers as demo).
I'm not sure where to record this yet, so I decided to store it as an issue here for now.
I was just demonstrating how to use Nextflow and I came across this difficulty one had in building their mental model. Might be useful for review later.
script:
The confusion was why did we need both
input_ch
andnums
in the script ( solution was explained by their colleague - peer instruction ). Their explanation:input_ch
is a variable that has all the inputs, whilenums
only takes one value.nums
is like ani
in a bash for loop.