Skip to content

Why won't my workflow work when I use the syntax labels? (take and main) #5334

Answered by bentsherman
julia-luz asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @julia-luz , it's an understandable mistake as some of these rules are not clearly documented. I will make a note to expand the workflow docs on this point

The entry workflow can't have take: or emit: because you can't call it. Meanwhile, the take: inputs can be channels or even just regular values, so you have some flexibility in how you define the interface for your named workflow.

You could construct the input channels in the entry workflow:

workflow {
    reads_ch = Channel.fromPath(params.reads_tsv, checkIfExists: true )
        .splitCsv( header: true, sep: '\t' )
        .map { row -> tuple( row.sample_name, file(row.fq1, checkIfExists: true) ) }
    NAMED(reads_ch)
}

workflow N…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@julia-luz
Comment options

@bentsherman
Comment options

Answer selected by julia-luz
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